How does VMware HA work

Here’s a quick summary of how High Availability (HA) works in VMware ESX hosts-

VMware HA continuously monitors all ESX Server hosts in a cluster and detects failures. An agent placed on each host maintains a “heartbeat” with the other hosts in the cluster and loss of a heartbeat initiates the process of restarting all affected virtual machines on other hosts. You create and manage clusters using VirtualCenter.

vmware shared storage

The VirtualCenter Management Server places an agent on each host in the cluster so each host can communicate with other hosts to maintain state information and know what to do in case of another host’s failure. (The VirtualCenter Management Server does not provide a single point of failure.) If the VirtualCenter Management Server host goes down, VMware HA functionality changes as follows.

HA clusters can still restart virtual machines on other hosts in case of failure; however, the information about what extra resources are available will be based on the state of the cluster before the VirtualCenter Management Server went down. HA monitors whether sufficient resources are available in the cluster at all times in order to be able to restart virtual machines on different physical host machines in the event of a host failure.

A safe restart of virtual machines is made possible by the locking technology in the ESX Server storage stack, which allows multiple ESX Servers to have access to the same virtual machines file simultaneously.

What does a VMware Engineer do?

Host failure detection occurs 15 seconds after the HA service on a host has stopped sending heartbeats to the other hosts in the cluster. A host stops sending heartbeats if it is isolated from the network. At that time, other hosts in the cluster treat this host as failed, while this host declares itself as isolated from the network. By default, the isolated host powers off its virtual machines. These virtual machines can then successfully failover to other hosts in the cluster. If the isolated host has SAN access, it retains the disk lock on the virtual machine files and attempts to fail over the virtual machine to another host fails. The virtual machine continues to run on the isolated host. VMFS disk locking prevents simultaneous write operations to the virtual machine disk files and potential corruption.

A lot of folks forget that the default behavior for VMs in a host which becomes isolated is to power down.  We get a lot of calls asking “Why did my VMs power down unexpectedly?”

If the network connection is restored before 12 seconds have elapsed, other hosts in the cluster will not treat this as a host failure. In addition, the host with the transient network connection problem does not declare itself isolated from the network and continues running. In the window between 12 and 14 seconds, the clustering service on the isolated host declares itself as isolated and starts powering off virtual machines with default isolation response settings.

If the network connection is restored during that time, the virtual machine that had been powered off is not restarted on other hosts because the HA services on the other hosts do not consider this host as failed yet. As a result, if the network connection is restored in this window between 12 and 14 seconds after the host has lost connectivity, the virtual machines are powered off but not failed over.

Recommended reading on VMware HA

5 thoughts on “How does VMware HA work”

  1. Hi everybody… Which is the default setting for this HA working fine?? I have my cluster with Host Isolation response set to “Leave VM Powered on”… This is because we have many loops on the network, and when many ESX nodes lost network then it was a complete mess due to failover… but VMs dont really fail is just a network outage… so, my concern is, if we really have a host outage, the failover to other node will really work with this selection I made?? also, we need to consider that maybe I only lost the console NIC my VMs still up and running, what does the cluster will do in this case ?? Thanks !!

  2. I am very grateful for your efforts put into this report.
    This guide is transparent, updated and very informative.
    Can I expect you may post this sort of some other article in the near future?

    Kind regards,
    Dinesen Duke

Comments are closed.