Some installation and update operations that use live install require the host to be in maintenance mode.

To determine whether an upgrade operation requires the host to be in maintenance mode, see Determine Whether an Update Requires the Host to Be in Maintenance Mode or to Be Rebooted

When you specify a target server by using --server=server_name in the procedure, the specified server prompts you for a user name and password. Other connection options, such as a configuration file or session file, are supported. For a list of connection options, see Getting Started with vSphere Command-Line Interfaces, or run esxcli --help at the vCLI command prompt.

Install vCLI or deploy the vSphere Management Assistant (vMA) virtual machine. See Getting Started with vSphere Command-Line Interfaces. For troubleshooting, run esxcli commands in the ESXi Shell.

1

Check to determine whether the host is in maintenance mode.

vicfg-hostops --server=server_name --operation info

2

Run one of the following commands for each virtual machine to power off all virtual machines running on the ESXi host.

Option

Command

To have the system try to shut down the guest operating system

vmware-cmd --server=server_name path_to_vm stop soft

To force the power off operation

vmware-cmd --server=server_name path_to_vm stop hard

Alternatively, to avoid powering off virtual machines, you can migrate them to another host. See the topic Migrating Virtual Machines in the vCenter Server and Host Management documentation.

3

Place the host in maintenance mode.

vicfg-hostops --server=server_name --operation enter

4

Verify that the host is in maintenance mode.

vicfg-hostops --server=server_name --operation info