Enter and Exit
Maintenance Mode with vicfg-hostops
You place a host
in maintenance mode to service it, for example, to install more memory. A host
enters or leaves maintenance mode only as the result of a user request.
vicfg-hostops
suspends
virtual machines by default, or powers off the virtual machine if you run
vicfg-hostops --action poweroff
.
vicfg-hostops
does not
work with VMware DRS. Virtual machines are always suspended.
The host is in a state of
Entering Maintenance Mode until all running virtual machines are suspended or
migrated. When a host is entering maintenance mode, you cannot power on virtual
machines on it or migrate virtual machines to it.
When you run the
vicfg-hostops
vCLI
command, you can specify one of the options listed in
Connection Options for vCLI Host Management Commands
in place of
<conn_options>
.
- To enter maintenance mode, run the following command.vicfg-hostops <conn_options> --operation enter
- To check whether the host is in maintenance mode or in the Entering Maintenance Mode state, run the following command.vicfg-hostops <conn_options> --operation info
After all virtual machines on
the host have been suspended or migrated, the host enters maintenance mode. You
cannot deploy or power on a virtual machine on hosts in maintenance mode.
You can put all hosts in a
cluster or data center in maintenance mode by using the
--cluster
or
--datacenter
option. You must not use those options
unless suspending all virtual machines in that cluster or data center is no
problem.
You can later run
vicfg-hostops <conn_options> --operation exit
to
exit maintenance mode.