- VMware disk modes: Which one is best? - Wed, Aug 5 2020
- vSphere 7.0 – Upgrade virtual VM hardware and VMware Tools - Fri, Jul 31 2020
- How to restore corrupted VMware VCSA 7.0 to a clean state - Fri, Jul 24 2020
In my previous post, we configured VMware vSphere storage networking and we are now ready to configure the HA cluster. After activating HA, our cluster will become fully resilient in case we have a hardware failure on one of our hosts. This can be a faulty NIC, CPU, or motherboard, or any other part of the host. Without HA, the VMs running on a failed host would just “die,” but with HA enabled, those VMs will restart automatically on another host within our cluster.
vSphere requirements ^
Before I discuss the final configuration steps, I want to recap what’s necessary to activate the HA successfully:
- A minimum of two hosts in the cluster – You can have up to 64 hosts in vSphere cluster.
- Shared Storage – Every server that is part of the HA cluster needs to have access to at least one shared storage.
- Network – You must connect all hosts to at least one management network. The VMkernel network with the Management Networkcheckbox has to be enabled; by default, the HA needs an accessible default gateway.
- Licensing – All hosts must have licenses for HA. HA won’t work with an ESXi free license. You need at least vSphere Essentials.
- VMware tools – It is highly recommended that you install VMware tools on all hosts, and it is required if you want to work with the VM monitoring feature.
Creating a VMware HA cluster ^
You can configure the HA cluster either with the vSphere client or with the vSphere web client. The vSphere web client also can activate the VM component protection (VMCP). This feature does not appear in the vSphere client.
Note that you can configure all clustering capabilities, HA, Distributed Resources Scheduler (DRS), vMotion, and fault tolerance (FT) on the vCenter server. However, in case the vCenter server becomes unavailable, those functions continue to work. vCenter is there only to set things up and push the configuration to the hosts.
After the vCenter installation, which I’m not detailing here, you have to create a datacenter object:
Step 1: Create a datacenter object
The datacenter object is at the top-level object. Bellow you will have clusters, individual hosts, folders, VMs, etc.
Now, we are ready to create the cluster.
Step 2: Create a cluster.
Select the datacenter object first and then right click > New cluster.
For now, don’t activate any of the cluster’s features (HA, DRS). We’ll do this later. As you can see in the screenshot above, the wizard looks quite similar in both management clients. However, you can configure the VSAN only through the vSphere web client.
Step 3: Add a host to the cluster
It’s preferable to use DNS names for the hosts instead of IP addresses. But make sure that you create forward and reverse static DNS records on your DNS server first.
After you create the DNS records, you’ll have to clear the cache on the vCenter server’s network card; otherwise, the server will not be able to find those hosts via fully qualified domain name (FQDN). You’ll need to open the command prompt and enter those two commands:
You should now be able to ping the hosts using the FQDN, and you are ready to add the hosts to the cluster.
Select the newly created cluster and then right click > Add Host.
Enabling the vSphere HA cluster ^
You can now enable the HA cluster in the vSphere client: Right click the cluster > Edit settings > check box Turn On vSphere HA.
In the vSphere Web Client, you have to select cluster > Settings > vSphere HA > Edit Button. (Note: you can also navigate to this level manually by selecting the cluster on the left > Manage > vSphere HA > Edit).
vSphere HA cluster configuration options ^
Many options exist that allow you to adjust the behavior of the cluster in case of a hardware failure in one of your hosts. Only the vSphere web client offers the more advanced options:
Virtual Machine Options – The VM options allow you to configure the VM priority within the cluster. For instance, you could assign a high priority to database servers, a medium priority to file servers, and a low priority to web servers. This means that the database servers would be up and running before the file servers and webservers.
VM monitoring – If VM monitoring is enabled, the VM will restart if the VMware tools heartbeats are not received.
Datastore Heartbeating – In case the management network fails, Datastore Heartbeating allows you to determine if the host is in a failed state or just isolated from other hosts within the cluster.
VM Component Protection (VMCP) – VMCP protects virtual machines from storage-related events, specifically permanent device loss (PDL) and all paths down (APD) incidents.
When you enable VMCP, vSphere can detect Datastore accessibility failures, APD or PDL, and then recover affected virtual machines by restarting them on another host in the cluster that the Datastore failure did not affect.
VMCP allows the admin to determine how the vSphere HA reacts in case of a failure. This can be a simple alarm or the restart of VM on another host.
This completes my VMware Ha series. However, we didn't talk about admission control yet. I’ll cover this topic in one of my future posts. Stay tuned.