Using the ESXi esxcli command to power off a virtual machine
esxcli command can be used locally or remotely to power off a virtual machine running on ESXi 5.x or later. For more information, see the esxcli vm Commands section in the vSphere Command-Line Interface Reference.
- Open a console session where the
esxclitool is available, either in the ESXi Shell, the vSphere Management Assistant (vMA), or the location where the vSphere Command-Line Interface (vCLI) is installed.
- Get a list of running virtual machines, identified by World ID, UUID, Display Name, and path to the
.vmxconfiguration file by running this command:
esxcli vm process list
- Power off the virtual machine from the list by running this command:
esxcli vm process kill --type= [soft,hard,force] --world-id= WorldNumber
- Three power-off methods are available. Soft is the most graceful, hard performs an immediate shutdown, and force should be used as a last resort.
- alternate power off command syntax is: esxcli vm process kill -t [ soft,hard,force] -w WorldNumber
- Repeat Step 2 and validate that the virtual machine is no longer running.