vSphere5 与 vSphere4 HA群集工作方式的改变

我们先来看一下vSphere 4的群集工作方式

在将主机添加到 VMware HA 群集时,代理将上载到主机,并配置为与群集内的其他代理通信。添加到群集的前五台主机将指定为首选主机,随后的所有主机将指定为辅助主机。首选主机维护和复制所有群集状况,并用
于启动故障切换操作。如果从群集内移除某台首选主机,则 VMware HA 会将另一台(辅助)主机提升为首选
状态。如果某台首选主机将长时间处于脱机状态,应从群集中移除该主机,以便它可以被辅助主机替代。
加入群集的任何主机必须与现有首选主机通信以完成其配置(当您正在将第一台主机添加到群集时除外)。必
须至少有一台首选主机运行正常,以便 VMware HA 正确进行操作。如果所有首选主机均不可用(不响应),
则无法为 VMware HA 成功配置任何主机。在规划群集的规模时,应考虑每个群集五台首选主机的限制。同样,
如果群集是在刀片服务器环境中实施的,则一个刀片机箱中最多只能容纳四台首选主机。 如果所有五台首选主
机位于同一机箱内,且该机箱出现了故障,则群集将失去 VMware HA 保护

vSphere4 HA群集这种情况虽然在服务器物理摆放设计上可以尽量避免同时5台首选主机都宕机的情况,但是不免有时候会因为agent的问题“闹崩”。

vSphere 5改进了这个构架,采用了一种新的HA群集工作方式,角色转变为Master和Slave,并且只有一台master负责群集的状态监控,如果master宕机,群集会马上选举新的Master主机,群集工作方式有点像路由协议OSPF的DR选举,不再是根据加入群集的时间,详见截取的官方文档

Master and Slave Hosts
When you add a host to a vSphere HA cluster, an agent is uploaded to the host and configured to communicate with other agents in the cluster. Each host in the cluster functions as a master host or a slave host. When vSphere HA is enabled for a cluster, all active hosts (those not in standby or maintenance mode, or not disconnected) participate in an election to choose the cluster's master host. The host that mounts the greatest number of datastores has an advantage in the election. Only one master host exists per cluster and all other hosts are slave hosts. If the master host fails, is shut down, or is removed from the cluster a new election is held.
The master host in a cluster has a number of responsibilities:
1. Monitoring the state of slave hosts. If a slave host fails or becomes unreachable, the master host identifies
which virtual machines need to be restarted.
2. Monitoring the power state of all protected virtual machines. If one virtual machine fails, the master host ensures that it is restarted. Using a local placement engine, the master host also determines where the restart should be done.
3. Managing the lists of cluster hosts and protected virtual machines.
4. Acting as vCenter Server management interface to the cluster and reporting the cluster health state.
The slave hosts primarily contribute to the cluster by running virtual machines locally, monitoring their runtime states, and reporting state updates to the master host. A master host can also run and monitor virtual machines. Both slave hosts and master hosts implement the VM and Application Monitoring features.
One of the functions performed by the master host is virtual machine protection. When a virtual machine is protected, vSphere HA guarantees that it attempts to power it back on after a failure. A master host commits to protecting a virtual machine when it observes that the power state of the virtual machine changes from powered off to powered on in response to a user action. If a failover occurs, the master host must restart the virtual machines that are protected and for which it is responsible. This responsibility is assigned to the master host that has exclusively locked a system-defined file on the datastore that contains a virtual machine's configuration file.
vCenter Server reports whether a host is a master host or a slave host using a vSphere HA host state. This state is reported on the host's Summary tab in the vSphere Client and in the Host List view for a cluster or datacenter, if the HA State column has been enabled. An HA state of "Running (Master)" indicates the host is serving as a vSphere HA master host. A state of "Connected (Slave)" indicates the host is serving as a vSphere HA slave host. Several other states are provided to indicate when an election is underway or an error condition has occurred. The host's Summary tab provides a link next to the vSphere HA state of the host that explains the
current state. For more information about the error states see the vSphere Troubleshooting documentation .

 

你可能感兴趣的:(vmware,andriod,虚拟化,vsphere,网络技术)