HA (High Availability), as the name implies is a feature to protect the hosts and its virtual machines from unplanned downtime. Else, HA minimizes downtime. Though by definition it is simple, this has got a number of process to get this done in a very effective way.
A group of hosts forms a cluster and HA is enabled cluster wise. When HA is turned on in a cluster, the hosts associated within this cluster are either turned into a master host or a slave host. Normally, there would be only one master host in a cluster whereas all the other hosts are slave hosts. When a host is added to a HA cluster, an agent is uploaded to the host and is configured to communicate with other agents in the cluster.
When HA is enabled on a cluster, all active hosts participate in an election to choose the master host for that cluster. Host with the greater number of datastores mounted will be selected as the master host. A new election is held only if the existing master host is shut down or put in maintenance mode or removed from the cluster.
Master host communicates with vCenter server and monitors the state of all protected VM’s and the slave hosts. As different types of host failures are possible, the master host must detect the type and have to deal accordingly.
The responsibilities of the master host include:
- Monitor the state of slave hosts. If a host is failed or becomes unreachable, it identifies the VM’s to be restarted. The same case is applied with the failure of VM’s also.
- Manages the list of associated hosts and protected VM’s in a cluster.
The slave hosts monitors the state of its VM’s and report the same to the master host.
Read more about types and detections here.