vSphere HA slot sizes are used to calculate the number of VMs that can be powered on in an HA cluster with “Host failures cluster tolerates” selected. The slots size is calculated based on the size of reservations on the VMs in the cluster. HA Admission Control then prevents new VMs being powered on if it would not leave any slots available should a host fail.
The slot size for a cluster can be seen by going to the Summary Page for the cluster and clicking the “Advanced Runtime Info” link in the HA box.
If none of the VMs have CPU or RAM reservations, a default of 256MHz and 0GB is used.
The slots per host is derived by taking the total available CPU/RAM for the host and dividing by the slot size. Some CPU is reserved for the system so it will usually be a little lower than the full amount. So a host with 2xquad-core 2.4GHz CPUs (total 19.2GHz) and no VM CPU or RAM reservations has 73 slots and will only allow 73 VMs to be powered on if the cluster has two hosts and is set to protect against a single host failure.
Obviously this allows a very minimal amount of resource for each VM, so either reservations should be set for each VM, or slots size can be manually adjusted (see the VMware vSphere Availability Guide (pdf) for full details).
Note that the slot size is used for admission control calculations only. It has no direct effect on the resources available to VMs should an HA event occur.
There is a VMware Knowledgebase article (1010594) which has some details of the difference in VI3 and vSphere 4.x.
Last week I was working on an HA cluster of VMware ESXi hosts.
Whatever I tried I couldn’t get the hosts to play nicely when HA was turned on. Further investigation showed that the hosts were resolving their own names to a previous IP address.
Checking the console on each host showed the correct information, but the error messages when turning HA on indicated that they were still resolving to their old incorrect addresses.
The usual problem with HA is that DNS records don’t match what is actually set up, but in this case DNS checked out fine.
It would appear that:
- ESXi uses a local ‘/etc/hosts’ file for resolving names in preference to DNS. You can view this file by pointing a browser at http://youresxservername/host/hosts
- The local hosts file doesn’t get updated when you change the settings using the console interface. It keeps whatever was in there the first time you set up the hostname and IP address for the host
Most of the time this doesn’t matter much as the host doesn’t often need to look itself up, but when VMware HA is turned on, name resolution becomes much more important.
There are two ways to edit the /etc/hosts file. Because ESXi doesn’t have a normal Console Operating System (COS) that full ESX enjoys, both methods are relatively awkwards.
- Use ‘unsupported’ mode to get a local root shell and edit using ‘vi /etc/hosts’
- Use the Remote CLI to change the file remotely.
- vifs.pl –sessionfile <yoursessionfile> –get /host/hosts C:\temp
- Edit the file with notepad
- vifs.pl –sessionfile <yoursessionfile> –put C:\temp\hosts /host/hosts
With that done HA started working again. Probably worth doing a reboot just to make sure it’s ‘taken’.