Search the VMware Knowledge Base (KB)
View by Article ID

Powering on virtual machines fails with the error: MAX VCPUs limit is reached (1020121)

  • 23 Ratings

Symptoms

  • Powering on virtual machines fails
  • When trying to power on a virtual machine, you see the error:

Failed to power on VM
Could not power on VM : Number of running VCPUs limit exceeded.
Max VCPUs limit reached: 200 (4096 worlds)

Resolution

vSphere 4.1 and vSphere 5.x have an algorithm that dynamically calculates the number of recommended vCPUs on a given host depending on the resources available. This prevents over-committing of resources.
 
Caution: ESX and ESXi 4.1 allow a maximum of 512 vCPUs and 320 virtual machines per host. In ESXi 5.x, this number was increased to 4096 vCPUs and 512 virtual machines per host. Modifying these values above the limit is unsupported and can lead to host crashing.

Increasing the MAXvCPU count using the vSphere CLI

Run this command to see the maximum number of vCPUs that are allowed:

# esxcfg-advcfg -j maxvCPUs
The output looks similar to:
# esxcfg-advcfg -j maxvCPUs
maxvCPUs = number_of_VCPUs

To increase the maximum number of vCPUs to 512, run the command:

# esxcfg-advcfg -k 512 maxvCPUs

If you rerun # esxcfg-advcfg -j maxvCPUs,  the output appears similar to:

# esxcfg-advcfg -j maxvCPUs
maxvCPUs = 512

Increasing the MAXvCPU count using the vSphere Client

To increase the maximum number of vCPUs to 512:
  1. Launch the vSphere Client.
  2. Click the host.
  3. Click the Configuration tab, then go to Advanced Settings.
  4. Go to Vmkernel > Boot > maxVCPUS.
  5. Modify the parameter to 512.
Note: For ESXi 5.x, the steps to adjusting the maximum number of vCPUs have changed.

To show the current value for maximum vCPUs allowed per core:
  1. Connect to the ESXi host with an SSH session.
  2. Run the following command:

    esxcli system settings kernel list -o maxVCPUsPerCore

To set a new configured value for maximum vCPUs allowed per core:

  1. To determine the number of vCPUs per core, take your maximum number of desired cores, divide by the number of physical cores on the host . Then round up to the nearest whole integer. Then set the per-core vCPU parameter.

    For example, you want a maximum of 450 vCPUs and have 12 physical cores in the ESXi host. 450 / 12 = 37.5 rounded to 38. Your maximum vCPUs per core should be 38.

  2. To set the new maximum vCPUs per core parameter, run the following command:

    esxcli system settings kernel set -s maxVCPUsPerCore -v yourMaxPerCore

    Where yourMaxPerCore is the number determined in Step 1.

  3. Reboot the ESXi host and check the parameter using this command:

    esxcli system settings kernel list -o maxVCPUsPerCore

Request a Product Feature

To request a new product feature or to provide feedback on a VMware product, please visit the Request a Product Feature page.

Feedback

  • 23 Ratings

Did this article help you?
This article resolved my issue.
This article did not resolve my issue.
This article helped but additional information was required to resolve my issue.

What can we do to improve this information? (4000 or fewer characters)




Please enter the Captcha code before clicking Submit.
  • 23 Ratings
Actions
KB: