vCenter HA Datastore Heartbeats

vCenter HA Datastore Heartbeats

March 3, 2014 2 By Eric Shanks

High Availability is a great reason to virtualize your servers.  It can help reduce downtime by automatically rebooting virtual machines in the case of a host failure.  But, a relatively minor host issue should not cause the reboot of all of your virtual machines.  This is where vCenter HA datastore heartbeats are useful. Let’s first look at a basic example of HA.  Below is our normal environment with no failures.  We have a few VMs on each host and the hosts are connected to a pair of datastores and a network switch. Heartbeats1     Now assume we have a host failure, we now need to have HA kick in and reboot the virtual machines on the failed host, over on the still working hosts. Heartbeats2     HA is working great and is a great feature, but lets take a look at what happens if the Management network were to fail.  Without datastore heartbeats involved, the two hosts wouldn’t be able to communicate with each other over the network so the two of them would assume that the other was failed.  But by looking at the example below we can see that even though the Management network is down, the virtual machines and their network is working just fine.  This means that no outages are being noticed by end users so we DON’T want HA to kick in because the virtual machines will restart. Heartbeats3

Enter Datastore Heartbeats

In the event that the management network is not available and the hosts are isolated from one another, the hosts can still look to the shared datastores.  Since the storage is available they can use the VMFS Locking capability to see if the other host is still actively using storage. If you look at your datastores, you may see files named “host-XX-hb”.  These are heartbeat files and one per host should be visible.  If the ESXi hosts are isolated, they can see if a lock is still placed on these files to determine if HA needs to kick in. Heartbeats5

Configure Datastore Heartbeats

If you would like more insight on what is happening with your datastore heartbeats, look at the HA Settings of your cluster.  By default, vCenter will automatically select two datastores to use, but you can select them yourself if you’re so inclined to do so. Heartbeats4