Ha Heartbeat Datastores

Now we have a vCenter Server configured and running with an external PSC but we are yet to add hosts to the vCenter and enable vSphere features like vSphere HA and DRS.

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. . vSphere HA uses approximately 3 MB of disk space on each heartbeat datastore, which is negligible for most environments. The vSphere HA datastore heartbeat mechanism adds a negligible overhead on the storage system that has no performance effect on other storage operations. You can also provide the amount of CPU & Memory of the cluster to be reserved for the HA failover. Heartbeat Datastores: HA uses the datastore heartbeat when the host management network has failed. You can configure the datastore to be used for heartbeats. Advanced Options: Here you can configure the Advanced Options for High Availability.

What is vSphere High Availability

vSphere HA is afeature enabled at the vSphere cluster level to reduce unplanned downtimes.vSphere HA can protect applications availability in following ways,

  • It can protect virtual machines against a server failure by restarting affected VMs on a another available host.
  • It can protect against an application failure by continuously monitoring a virtual machine and resetting it once a failure was detected.
  • vSphere HA can protect against a datastore accessibility failure by restarting the virtual machine on a host that datastore access is still available.
  • vSphere can protect virtual machines against a host network isolation (management network or VSAN network) by restarting them on another host.

In order to enablevSphere HA following requirements must be fulfilled.

  • All host must be licensed to use vSphere HA.
  • At least 2 hosts need to be in the cluster.
  • Every host should have access to at least 2 datastores to configure datastore heartbeat.
  • All hosts in the cluster must have access to same shared storage locations. This can be any type of datastores including VMFS, NFS and VSAN datastores.

With the version 6.5 VMware has introduce a new feature called Proactive HA. This feature enables the vCenter to have the awareness of underline hardware platform.

vCenter can detect health status of underline hardware devices and make decisions to provide high availability throughout the cluster.

What is vSphere Dynamic Resource Scheduler

As it name implies VMware DRS feature enables you to schedule resources available in your VMware cluster dynamically. So that one host in the cluster doesn’t need to run most of the workloads while others wait idly.

It can balance cluster resource consumption so workloads can be run on optimal performance.

Before we enable HA and DRS features we need to create a datacenter and a cluster.

Datacenter is a logical unit created inside the vCenter as a container for objects such as hosts and clusters. vCenter can have multiple datacenters representing multiple organizational units of an enterprise.

To create a datacenter right click on the vCenter and select new Datacenter.

Provide a name for the datacenter and click OK.

Then we can create a cluster within that datacenter. Right click on the datacenter again and click on new Cluster.

You can provide a name for the cluster. Also you will be able to enable features like HA, DRS, EVC and vSAN form this window.

For this articles purpose we will not enable any service from here. Simply click OK to create the cluster.

The Number Of Vsphere Ha Heartbeat Datastores

Now, select cluster you need to enable Ha and DRS settings. Go to configure and then select Edit. From the popup window you can enable HA and DRS services.

Configure vSphere HA

SelectvSphere availability to configure HA. Tick the checkbox “Turn ON vSphereHA” to enable HA.

There are severalconfiguration options under vSphere availability to customize HA protection.

Failures andresponses option offer ability to customize host failure responses, hostisolation responses and VM monitoring options.

Proactive HA failures and responses option allow you to configure responses according to health degradation of hosts.

In an event of full or partial failures of the host vCenter will take remediation actions accordingly.

This mode needs to be coupled with a host’s hardware health monitoring software. We will discuss more about this feature in a separate article.

Admission control allows you to set a resource reservation within the cluster. So that, during a failure event hosts will have adequate resources to take over the failed host’s workloads.

Ha Heartbeat Datastores

There are several ways an admission control policy can be set, so you can decide what is the best method for your environment.

Heartbeat datastores are used to monitor host and virtual machines when a failure occurs in management network. So the cluster can prevent unnecessary HA recovery actions.

vCenter needs at least two datastores to configure as heartbeat datastores. There are several options to choose how vCenter select those two datastores. You can choose one option as needed according to your environment.

Alsothere is a way to provide advanced parameters to configure your cluster’sbehavior but we will not be looking into those options in this article.

Configure vSphere DRS

After configuring vSphere Availability select vSphere DRS to configure DRS settings and related options. Check on “Turn ON vSphere DRS” to enable DRS.


Then, under the DRS automation option you can choose how you want to automate the DRS process. It can be Fully automated, partially automated or it can be a manual process, which the DRS service only suggest migration recommendations.


Migration Threshold specify how sensitive DRS automation should be. Sliding the pointer towards aggressive makes DRS service to consider more recommendations and initiate more migrations within the cluster.

Move Vsphere Ha Heartbeat Datastores

Also, when sliding the pointer towards conservative DRS limits priority levels it consider for workload rebalance.

Vsphere Ha Heartbeat Datastores Is 0

There are severalother options we can use to tweak DRS automation as needed for our environmentbut we will keep them as it is for now.

After configuringboth HA and DRS options click on OK to apply changes to the cluster.

Now we have acluster with HA and DRS configured so we can protect our workloads in an eventof host failure and our workloads will run be distributed among all hosts inthe cluster optimally.


Recently, there was an internal request where the Engineer wanted to change the Datastore Heartbeat Configuration on the HA cluster and he wanted to update the configuration using PowerCLI.

The task was to change the setting to Automatically select the datastores accessible from the hosts. There are three options available in the Web Client and can be seen below:

The same can be done through PowerCLI and the values will be as per the same order:

  • allFeasibleDs
  • userSelectedDs
  • allFeasibleDsWithUserPreference

Therefore, I decided to create PowerCLI functions which will get the current setting and also help you modify the settings and names the functions Get-DatastoreHeartbeatConfig and Set-DatastoreHeartbeatConfig.

Below are the functions and they also accept value from pipeline meaning you can use Get-Cluster cmdlet and pipe these functions to change the settings.