Virtual Machine stops unexpectedly when CPU Limit is configured to zero
search cancel

Virtual Machine stops unexpectedly when CPU Limit is configured to zero

book

Article ID: 373809

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

  • A Virtual Machine may stop or fail to remain powered on if a CPU limitation is set to 0. 
  • These log types can contain similar messages to the following:

    /var/log/hostd.log:
    YYYY-MM-DDTHH-MM-SS info hostd[#######] [Originator@#### sub=Vimsvc.ha-eventmgr] Event ####### : Issue detected on fqdn.hostname in ha-datacenter: CpuSched: ####: Container group(########): host/user/vm.######## is configured with 0 CPU max
    YYYY-MM-DDTHH-MM-SS info hostd[#######] [Originator@#### sub=Vimsvc.ha-eventmgr] Event ####### : Issue detected on fqdn.hostname in ha-datacenter: CpuSched: ####: Container group(########): host/user/vm.######## is configured with 0 CPU max
    YYYY-MM-DDTHH-MM-SS info hostd[#######] [Originator@#### sub=Vimsvc.ha-eventmgr] Event ####### : Issue detected on fqdn.hostname in ha-datacenter: CpuSched: ####: Container group(####): host/user/vm.####### is configured with 0 CPU max

/var/log/vmkernel.log:
YYYY-MM-DDTHH-MM-SS cpu23:####### opID=########)ALERT: CpuSched: ####: Container group(########): host/user/vm.######## is configured with 0 CPU max
YYYY-MM-DDTHH-MM-SS cpu12:#######)ALERT: CpuSched: ####: Container group(########): host/user/vm.######## is configured with 0 CPU max
YYYY-MM-DDTHH-MM-SS cpu36:####### opID=#######)ALERT: CpuSched: ####: Container group(#######): host/user/vm.####### is configured with 0 CPU max

/var/log/vmkwarning.log:
YYYY-MM-DDTHH-MM-SS cpu23:####### opID=#########)ALERT: CpuSched: ####: Container group(########): host/user/vm.######## is configured with 0 CPU max
YYYY-MM-DDTHH-MM-SS cpu12:#######)ALERT: CpuSched: ####: Container group(########): host/user/vm.######## is configured with 0 CPU max
YYYY-MM-DDTHH-MM-SS cpu36:####### opID=#########)ALERT: CpuSched: ####: Container group(#####): host/user/vm.######## is configured with 0 CPU max
                                                                                                                                                         

 

Environment

VMware vSphere ESXi

Cause

This is due to a manual or programmatic configuration of the CPU "Limit" (Maximum) value to 0 MHz. When the limit is set to zero, the ESXi CPU scheduler is instructed to allow no execution time for the VM, causing it to stop as it cannot process any instructions.

Resolution

To resolve this issue, the CPU limit must be set to "Unlimited" or a value greater than zero.

Step-by-step Instructions:

  1. Log in to the vSphere UI.

  2. Locate the affected Virtual Machine in the inventory.

  3. Right-click the VM and select Edit Settings.

  4. Expand the CPU section.

  5. Locate the Limit field.

  6. Change the value from 0 to Unlimited (check the "Unlimited" box) or enter a valid MHz value appropriate for the workload.

  7. Click OK to save the changes.

  8. Power on the Virtual Machine.

Additional Information

Ensure that any automated scripts or third-party management tools (e.g., automation for cost-saving or resource throttling) are audited to ensure they do not inadvertently set CPU limits to zero during resource reclamation tasks.