The Enter maintenance mode task for an ESXi host is stuck.
search cancel

The Enter maintenance mode task for an ESXi host is stuck.

book

Article ID: 412107

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

The Enter maintenance mode is stuck and the following conditions are met:

  • DRS is set to Fully Automated.
  • The Enter maintenance mode task made no further progress with powered-on virtual machines remaining on the host.
  • These virtual machines have affinity rules, and logs or the vSphere Client show the VMs can't migrate due to a rule violation.
    • vSphere Client - The Cluster [Monitor] > [vSphere DRS] > [Faults] tab:
      DRS Faults: Could not enter maintenance mode.
      DRS Faults Details: Virtual machine 'VM' on host 'HOST' would violate a virtual machine - host affinity rule.

    • From the vpxd.log:
      YYYY-MM-DDTHH:MM:SS.778Z info vpxd[2796052] [Originator@6876 sub=VmCheck opID=mfz9eeyv-62730-auto-1cej-h5:70006701-f] CompatCheck results: (vim.vm.check.Result) [
      -->    (vim.vm.check.Result) {
      -->       vm = 'vim.VirtualMachine:463aa672-3345-46c3-a5bb-b358d89db19b:vm-30014',
      -->       host = 'vim.HostSystem:463aa672-3345-46c3-a5bb-b358d89db19b:host-30026',
      -->       error = (vmodl.MethodFault) [
      -->          (vim.fault.VmHostAffinityRuleViolation) {
      -->             vmName = "VM1",
      -->             hostName = "192.168.1.13",
      -->             msg = "",
      -->          }
      -->       ],
      -->    }
      --> ]
      
      YYYY-MM-DDTHH:MM:SS.781Z warning vpxd[2796052] [Originator@6876 sub=MoHost opID=mfz9eeyv-62730-auto-1cej-h5:70006701-f] Host has powered-on VM; [vim.HostSystem:host-30015,192.168.1.11], [vim.VirtualMachine:vm-30014,VM1]

Environment

VMware vSphere ESXi

Cause

This occurs when there is no compatible destination host due to the affinity rules set by the user.
The maintenance mode transition task will not progress because powered-on virtual machines cannot be moved to another host.

Resolution

To evacuate the virtual machine, identify the affinity rule that is preventing the virtual machine from migrating and disable/edit the affinity rule.
Alternatively, you can power off the virtual machines on the target ESXi host to allow the Enter maintenance mode task to proceed.

Additional Information

For more information about affinity rules, see Using Affinity Rules with vSphere DRS.