Today I deployed an OVF image to vCenter and on attempting to start the virtual machine (VM) I encountered the error message below –
vCenter was unable to find a suitable host to power on the virtual machine for the reasons listed below. DRS Cannot find a host to power on or migrate the virtual machine. Insufficient capacity on each physical CPU.
Initially this left me a little confused as I was pretty certain we had sufficient resource to start this VM. I checked the configuration and found it had been configured with 4 vCPUs (virtual CPUs). Reducing the number of vCPUs had no effect on the ability to start the machine so I knew it had to be something else. At this point my brain kicked in and I considered whether the VM had been configured with a CPU reservation on the resource tab of it’s settings.
I opened the ‘Edit Settings’ menu and clicked on the ‘Resources tab. The CPU resource allocation menu clearly shows that a reservation has been set – 9572Mhz.
What does this actually mean?
VMware resource reservations, in this case for CPU capacity allow us to specify a guaranteed minimum allocation for the VM. If the VM is idle or not using the full reservation those clock cycles will be made available to other processes so as not to waste the resource. If the VM with a reservation requires the CPU cycles it has reserved they will be returned to it as soon as possible which is typically very fast as CPU instructions will move through the pipeline quickly.
The issue we have therefore is that our ESXi hosts are checking to see if they have this amount of CPU capacity unreserved and in my case they do not therefore the VM will not power on.
The solution in my instance is to remove the reservation – I tend not to use reservations anyway and this only happened as the OVF file comes preconfigured with this setting. I dragged the ‘Reservation’ slider to the far left to set a value of 0, you can of course enter 0 into the box or use the ‘up/down’ arrows. The VM also had a memory reservation, I removed this as well.
Once I had finished modifying the reservations I tried starting the virtual machine and it worked.
VMware have a KB article which covers the error message and there are extensive resources on how reservations work.