Read on
VMware for Beginners – Overview of vSphere: Part 1
VMware for Beginners – vSphere Installation Requirements: Part 2
VMware for Beginners – How to Install vSphere: Part 3
Read More
In the last VMware for Beginners, we discussed about VMware vSphere HA. This is a continuation and last part about vSphere HA.
vSphere HA is a vital component of the vSphere platform, providing cost-effective high availability for
business-critical applications.
In the second part, we discussed about how to enable vSphere HA in our Cluster. In this third part, we will continue with the configuration of the vSphere HA and all its options and features.
To start and enable vSphere High Availability, go to vCenter – Cluster – Configure – vSphere Availability and click Edit, then enable vSphere HA.
After finishing the Failures and Responses tab option in the previous article, we can now check the option in the tab Admission Control.
What is Admission Control in vSphere HA?
In a VMware vSphere HA cluster, admission control is a feature that ensures enough resources are available to restart virtual machines on other hosts in the event of a host failure.
Admission control also prevents the over-commitment of resources in a cluster. There are two types of admission control:
- Host Failures Cluster Tolerates – This setting ensures that a certain number of hosts can fail, and there will still be enough resources to restart all the virtual machines on those hosts. The number of hosts that can fail is determined by the number of spare capacity slots that are calculated by the admission control algorithm.
- Percentages Of Cluster Resources Reserved – With this setting, you specify a percentage of cluster resources that must be reserved for failover. This takes into account not only host failures but also capacity contention within the Cluster itself.
You can configure admission control using either settings or a combination of both. In most cases, it is recommended to use a combination of both settings to provide the best protection for your environment.
1. Host failures cluster tolerates
In a vSphere HA cluster, host failures are tolerable.
For example, if you have a three-node cluster, vSphere HA can tolerate a single-host failure.
How does vSphere HA calculate how many Hosts failures can the Cluster tolerate?
It uses slots to calculate how many slots you have available to run your VMs.
Slot size is comprised of two components, CPU and Memory.
– A memory component is calculated by obtaining each powered-on virtual machine’s memory reservation, plus memory overhead, and selecting the largest value.
– A CPU component is calculated by obtaining the CPU reservation of each virtual machine that is powered on and selecting the largest one. The default CPU reservation for a virtual machine is 32MHz if you have not specified it. In advanced settings, you can change this value by changing the value das.vmcpuminmhz
How is calculated?
- The first size Slot is Calculated
- vSphere HA determines how many slots can be held by each ESXi Host within a Cluster
- Calculates the Current Failover Capacity of the Cluster(how many ESXi hosts)
- Compares the Current Failover Capacity of the Cluster with the Configured Failover Capacity
Now vSphere HA will check what is the size of one slot. It takes the biggest vCPU(in GHz) VM and the biggest vMemory VM and registers them as one slot.
Example:
We have a VM-01 with 4GHz but only with 2Gb of vMemory, and another VM-02 with only 2Ghz and 4Gb of vMemory. In this case, a slot for this Cluster will be 4GHz + 4Gb(plus memory overhead).
Then divide this slot for each ESXi host resource.
An example host with 68GHz(26 Cores with 2,6GHz each) CPU and 192Gb of Memory will be divided by the slot size.
Since we need to consider the CPU, we only have 17 slots on this type of Host. Meaning, you can only Power on 17 VMs on each ESXi Host when Admission Control is enabled.
So every Power ON VM declared as a slot will be divided by the slots that we have in our ESXi host.
If we have 3 ESXi hosts and let us say we have a maximum of 6 VMs Powered on in one Host, and we will have 11 slots free on that Host. If that Host fails, it will move those 6 VMs to the next 2 ESXi hosts and those hosts must have free slots to store those 6 VMs.
In the following image example, we see that Host 1 and moving the 6 VMs into Host 2 with 9 slots free and Host 3 with 7 slots free.
So in this Cluster, we can afford one ESXi failure without any problem. Since vSphere HA needs a minimum of 2 ESXi hosts to work, we cannot afford a second ESXi failure.
But if we had 4 ESXi hosts and lost 2 and had 30 VMs Powered on those failed ESXi hosts, then we could have a problem. Even if we have free slots for all VMs, we need to add 20% to the overhead. vSphere HA, by default, reserves 33% for any host failures.
So always divide your VMs per slot and divide again per Host, and you will get the number of Host failures that your Cluster can tolerate.
2. Define host failover capacity by
- Cluster resource percentage
In this option, you select if you want to use the above calculation using the Custer resource percentage(default). By default, vSphere HA will reserve 33% of the Cluster resources for the Host failures when using override calculation.
If the percentage is very high, you will not have enough resources to Power on VMs, since it will reduce the number of free slots.
- Slot Policy (powered-on VMs)
This option will use the calculation we have done above to check how many slots and how many VMs are allowed to Power ON on each ESXi Host.
Don’t forget, Power ON VMs = used Slots. You can also calculate how many VMs require multiple slots(in the same Host or different hosts).
- Dedicated failover hosts
As the option indicates, this will reserve a specific ESXi host for any host failure. vSphere HA will put the ESXi Host on standby and only be used if there is any host failure.
This option is only for situations when we have many hosts and resources. We can put one(or more) hosts on standby for ESXi Host failure.
The Host cannot be used for anything else than vSphere HA host failures. No VMs can be Powered ON in this ESXi host(unless there is a Host failure).
When you try to move a VM to this Standby ESXi host, you get the following error: “The current operation cannot be performed on the host ‘esxi-01.domain.local’ because it has been configured as a failover host for a cluster.”
- Disable
Select this option to deactivate admission control and allow virtual machine power on that violates availability constraints.
Disabling will allow you to Power ON any VMs regardless if you are violating the Host failures that a Cluster can tolerate.
Note: Use this option very carefully and only if you are sure you are breaking any company’s SLA or High Availability policy. Because if a ESXi host fails and there are not enough resources for the vSphere HA restart the VMs from the failures host, VMs will not be accessible while the Host failure is not fixed.
3. Performance degradation VMs tolerate
This setting determines the percentage of performance degradation the VMs in the Cluster can tolerate during a failure. If there is a high resource request from VMs, Cluster cannot provide proper CPU or Memory, and VMs performance will be impacted.
Note: Always do your math. Check Cluster resources and how many VMs you have, how many slots you have, and how many ESXi hosts you can afford to lose in case of a host failure.
If you wrongly calculate your settings and how many Host failures your Cluster can tolerate, you get an error like: “Insufficient resources to satisfy vSphere HA failover level on cluster”.
The last part of vSphere HA Cluster settings is the tab Heartbeat Datastores.
In this option, there is nothing special to set. As we discussed above, vSphere HA uses Datastores Heatbeat to check if a Host is failing or if we have an APD or PDL.
So here we leave the vSphere HA to select automatically any Datastore connected to the ESXi hosts in the Cluster, or you can select manually.
By default vSphere HA will use the automatic option, and unless you want to use specific Datastores for the heartbeat, you should leave it in automatic.
The last tab in the vSphere HA is the advanced options, where you can set different settings, as discussed above, for the maximum slot resources.
This is a very advanced option and is out of the scope of our VMware for Benningers since it needs more advanced knowledge to set this type of option.
And we finished our third part of the VMware for Beginners – vSphere HA and this subject.
As I said, vSphere HA is a very complex subject with many features, options and ways to configure your High Availability for your VMware Cluster.
We could explain more in detail about the Admission Control and other options, but I think the most important options are covered.
VMware for Beginners – vSphere Networking: Part 4
VMware for Beginners – vSphere Datastores: Part 5
VMware for Beginners – vSphere Virtual Machines: Part 6
VMware for Beginners – How to Install vCenter: Part 7
VMware for Beginners – Datacenter and Clusters: Part 8
VMware for Beginners – How to Create and Configure iSCSI Datastores: Part 9(a)
VMware for Beginners – How to Create and Configure iSCSI Datastores : Part 9(b)
VMware for Beginners – How to Create NFS Datastores: Part 10(a)
VMware for Beginners – How to Create NFS Datastores: Part 10(b)
VMware for Beginners – vMotion and DRS: Part 11
VMware for Beginners – vSphere HA Configuration: Part 12(a)
VMware for Beginners – vSphere HA Configuration: Part 12(b)
Follow our Twitter and Facebook feeds for new releases, updates, insightful posts and more.