When trying to change some settings on an ESXi host, I’ve experienced a problem with putting the host in “Maintenance mode”. Entering “Maintenance mode” stuck at 71%, and I tried exiting hung “Maintenance mode” but it wasn’t possible.

After checking on a node I also found that one of the vCLS residing on that host was powered off during entering “Maintenance mode”. I connected to the ESXi console with PuTTy and checked the status of “Maintenance mode” with the following command:

vim-cmd /hostsvc/hostsummary | grep inMaintenanceMode

and received the following output:

inMaintenanceMode = false

in vSphere Client status was still showing “in progress 71%”. Then I opened DCUI over iDRAC and restarted management agents like this:

  1. Connect to the console of your VMware ESXi host.
  2. Press F2 to customize the system.
  3. Log in as root user.
  4. Use the Up/Down arrows to navigate to Troubleshooting Options > Restart Management Agents.
  5. Press Enter.
  6. Press F11 to restart the services.
  7. When the service restarts, press Enter.
  8. Press Esc to log out.

Be aware that restarting the management agents may impact any tasks that are running on the VMware ESXi host at the time of the restart, and if LACP is configured on the vSAN network, do not restart management agents on VMware ESXi hosts running vSAN.

After successfully restarting the management agents, the process of entering “Maintenance Mode” was exited without placing the host in MM. Still, I had a second problem now, the vCLS residing on that host was still powered off and there wasn’t an option to power it on (was greyed out!). I disabled High Availability on the cluster and reenabled it again, but vCLS was still powered off. Rebooting the host didn’t help and I’ve received the following error:

“No host is compatible with the virtual machine”

so I turned vSphere HA off for the whole cluster again, and restarted host and Center agents using the following commands:

/etc/init.d/hostd restart
/etc/init.d/vpxa restart

now turned vSphere HA on for the whole cluster again. After that the vCLS residing on that host was powered on and I was finally able to put the host in “Maintenance mode”.