The Enter maintenance mode is stuck and the following conditions are met:
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]
VMware vSphere ESXi
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.
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.
For more information about affinity rules, see Using Affinity Rules with vSphere DRS.