Increasing Max vCPUS per core in VMware ESX
When creating a large number of Virtual Machines on a not-so-powerful hardware (in my case it was 6 core CPU), you might see the following error when trying to power on the virtual machines.
An error was received from the ESX host while powering on VM TestRHEL6_B90.
Failed to start the virtual machine.
Failed to power on VM.
Could not power on VM : msg.vmk.status.VMK_VCPU_LIMIT_EXCEEDED.
Max VCPUs limit reached: 192 (32768 worlds)
An error was received from the ESX host while powering on VM TestRHEL6_B90.
Failed to start the virtual machine.
Failed to power on VM.
Could not power on VM : msg.vmk.status.VMK_VCPU_LIMIT_EXCEEDED.
Max VCPUs limit reached: 192 (32768 worlds)
- Check what's the default maxVCPUsPerCore
esxcli system settings kernel list -o maxVCPUsPerCore
Name Type Description Configured Runtime Default
--------------- ------ -------------------------------------------------------------------------- ---------- ------- -------
maxVCPUsPerCore uint32 Max number of VCPUs should run on a single core. 0 == determine at runtime 85 0 0
Looks like by default there is max no.of vCPUS per core, decided internally by VMWare.
- Increase the vCPUS per core to a value that suits you. In my case around 85VMs per core.
esxcli system settings kernel set -s maxVCPUsPerCore -v 85
- Reboot the ESX host (sadly, yes). So ensure you set this param before you create your bulk VMs. Then check the value, to ensure it is set right.
esxcli system settings kernel list -o maxVCPUsPerCore
Name Type Description Configured Runtime Default
--------------- ------ -------------------------------------------------------------------------- ---------- ------- -------
maxVCPUsPerCore uint32 Max number of VCPUs should run on a single core. 0 == determine at runtime 85 85 0
This still didn't guarantee that all VMs you create will power ON. I still hit a ceiling and didn't manage to power ON many VMs. No, this was below 512 VMs, which is the max VMs you can run on any ESX host.
Labels: maxVCPUsPerCore, VMK_VCPU_LIMIT_EXCEEDED, VMware ESX