简介
本文档介绍如何在非HX ESXi主机上装载HyperFlex(HX)datastore。
场景
- 将虚拟机(VM)从传统ESXi群集迁移到HX群集。
- 虚拟机需要移动到HX Datastore,因为现有Datastore是要停用/改变用途的旧式存储阵列的一部分。
要求
- 对传统ESXi主机和HX融合节点的根访问。
- 对存储控制器的根访问权限。
- 确保端到端正确配置了服务质量(QoS)和巨型帧。
- 存储数据网络VLAN使用Platinum,服务类别(CoS)值为5。
- 传统ESXi主机必须能够访问存储数据网络VLAN。
- 传统ESXi主机必须使用巨型帧ping HX存储群集数据的IP地址(而不是管理IP地址)。
详细程序
Hyperflex节点
步骤 1:通过SSH连接到一个HX节点。
输入命esxcfg-nas -l
令以列出已装载的datastore。
[root@hx-esxi-01:~] esxcfg-nas -l
hx-nfs-1 is 192.168.255.254:hx-nfs-1 from 1234567890987654321-9876543210123456789 mounted available
hx-nfs-2 is 192.168.255.254:hx-nfs-2 from 1234567890987654321-9876543210123456789 mounted available
hx-nfs-3 is 192.168.255.254:hx-nfs-3 from 1234567890987654321-9876543210123456789 mounted available
步骤 2:
输入命令 cat /etc/hosts
,并注意HX集群通用唯一标识符(UUID)的输出。 查找包含单词springpath的行。
[root@hx-esxi-01:~] cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
172.16.255.101 hx-esxi-01.cnmi.local hx-esxi-01
127.0.0.1 1234567890987654321-9876543210123456789.springpath 1234567890987654321-9876543210123456789
注:HX集群UUID与命令的输出匹stcli cluster info
配。
root@SpringpathControllerABC7DEFGHI:~# stcli cluster info |less
entityRef:
type: cluster
id: 1234567890987654321-9876543210123456789
name: hx-cluster
config:
clusterUuid: 1234567890987654321-9876543210123456789
name: hx-cluster
步骤 3:
在所有esxcli network firewall unload
HX融合节点上输入命令。
[root@hx-esxi-01:~] esxcli network firewall unload
[root@hx-esxi-02:~] esxcli network firewall unload
[root@hx-esxi-03:~] esxcli network firewall unload
[root@hx-esxi-04:~] esxcli network firewall unload
存储控制器
步骤 4:SSH到其中一个存储控制器。
输入命stcli security whitelist add --ips <vmkernel IP Address on the storage data network for legacy ESXi Hosts>
令。
root@SpringpathControllerABC7DEFGHI:~# stcli security whitelist add --ips 192.168.255.201 192.168.255.202 192.168.255.203 192.168.255.204
上一个示例演示了如何将四个传统ESXi主机添加到白名单。
查看白名单。
root@SpringpathControllerABC7DEFGHI:~# stcli security whitelist list
----------------------------------------
192.168.255.201
----------------------------------------
192.168.255.202
----------------------------------------
192.168.255.203
----------------------------------------
192.168.255.204
----------------------------------------
传统ESXi主机
步骤 5:SSH连接到每个传统ESXi主机。
输入vi /etc/hosts
命令以编辑/etc/hosts文件。
[root@legacy-esxi-01:~] vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
172.16.255.201 legacy-esxi-01.cnmi.local legacy-esxi-01
步骤 6:
复制之前获取的HX节点的/etc/hosts文件中的条目,并将其粘贴到旧ESXi主机的/etc/hosts文件中,然后保存更改。
[root@legacy-esxi-01:~] vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
172.16.255.201 legacy-esxi-01.cnmi.local legacy-esxi-01
127.0.0.1 1234567890987654321-9876543210123456789.springpath 1234567890987654321-9876543210123456789
步骤 7:
将127.0.0.1更改为HX集群数据IP地址。
[root@legacy-esxi-01:~] vi /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1 localhost.localdomain localhost
::1 localhost.localdomain localhost
172.16.255.201 legacy-esxi-01.cnmi.local legacy-esxi-01
192.168.255.254 1234567890987654321-9876543210123456789.springpath 1234567890987654321-9876543210123456789
步骤 8::
输入命esxcfg-nas -a -o <host> -s <share_name> <datastore_name>
令。
[root@legacy-esxi-01:~] esxcfg-nas -a -o 1234567890987654321-9876543210123456789 -s 192.168.255.254:hx-nfs-1 hx-nfs-1
[root@legacy-esxi-01:~] esxcfg-nas -a -o 1234567890987654321-9876543210123456789 -s 192.168.255.254:hx-nfs-2 hx-nfs-2
[root@legacy-esxi-01:~] esxcfg-nas -a -o 1234567890987654321-9876543210123456789 -s 192.168.255.254:hx-nfs-3 hx-nfs-3
步骤 9:
输入命esxcfg-nas -l
令以确认HX Datastore已成功装载到传统ESXi主机上。
[root@legacy-esxi-01:~] esxcfg-nas -l
hx-nfs-1 is 192.168.255.254:hx-nfs-1 from 1234567890987654321-9876543210123456789 mounted available
hx-nfs-2 is 192.168.255.254:hx-nfs-2 from 1234567890987654321-9876543210123456789 mounted available
hx-nfs-3 is 192.168.255.254:hx-nfs-3 from 1234567890987654321-9876543210123456789 mounted available
HX datastore现在安装在传统ESXi主机上。
相关信息