Place an ESX Host into maintenance mode using the command line.
2010 May 24
To enter maintenance mode using the command line interface,
vimsh -n -e /hostsvc/maintenance_mode_enter
To exit maintenance mode use
vimsh -n -e /hostsvc/maintenance_mode_exit
2 Responses
leave one →



Thanks for the tip.
I alternatively use vmware-vim-cmd instead of vimsh, so those commands would look like:
vmware-vim-cmd /hostsvc/maintenance_mode_enter
and
vmware-vim-cmd /hostsvc/maintenance_mode_exit
And to check if a host is already in maintenance mode:
vmware-vim-cmd hostsvc/hostsummary|grep -i maintenance
output should be something like:
inMaintenanceMode = false,
Cheers