VMware HA通过在主(Primary)和从(Secondary)节点之间复制节点状态的方法,保证当某个节点失败或者处于孤岛的时候,其上的VM可以在其他Host上重启,以保证VM的可用性。

VMware HA本身很容易设置(几乎可以算是一键设置),但是当问题出现的时候,如何分辨一个节点是Primary还是Secondary呢?比如说,当一个较大的环境中有8台以上的Host分布在2个刀片服务器机箱内,而其中的一个机箱突然发生了故障,如何分辨这些节点状态呢?

可以用以下命令来查看哪些节点是Primary哪些又是Secondary
/opt/vmware/aam/bin/Cli
listnodes

如果可以用CLI,则可以用以下命令来提升一个节点
/opt/vmware/aam/bin/Cli
AAM> promotenode

或者,用这个命令来将一个节点从Primary降到Secondary
/opt/vmware/aam/bin/Cli (ftcli on earlier versions)
AAM> demotenode

注意:尽管以上手工提升或降低节点的方法被证实可用,但是这些命令是不受VMware技术支持的。请记住Primary节点的上限是5,这并不意味着不能提升第6个Primary节点,但是这不仅不被支持,也不推荐这么做。因为Primary节点越多,节点间的通讯数据量将多很多。

———-原文分割线———-
HA, Primary and Secondary nodes

VMware HA uses primary and secondary nodes for replicating the state of the nodes and restarting VMs in case of an isolation/failure. VMware HA is a one click setup but in case issues occur it will come in handy knowing which node is primary and which node is secondary. For instance in a large environment with 8+ hosts in a cluster divided over two blade chassis it can be useful to know which hosts are primary if and when a chassis fails:

/opt/vmware/aam/bin/Cli
listnodes
 
With the CLI it is also possible to promote a node:
/opt/vmware/aam/bin/Cli
AAM> promotenode

Or to demote a node to secondary:

/opt/vmware/aam/bin/Cli (ftcli on earlier versions)
AAM> demotenode

===============================
Although this is a proven method it is, as far as we know, unsupported. Also keep in mind that the supported limit of primary nodes is 5. This is a soft limit, so you can manually add a 6th, but this is not supported nor recommended as the traffic required to keep the Database up to date will also grow faster with 6 or more than with 5.