Forcibly Stop a Virtual
Machine with ESXCLI
You can use ESXCLI
to stop a virtual machine forcibly.
In some cases, virtual
machines do not respond to the normal shutdown or stop commands. In these
cases, it might be necessary to forcibly shut down the virtual machines.
Forcibly shutting down a virtual machine might result in guest operating system
data loss and is similar to pulling the power cable on a physical machine.
You can forcibly stop virtual
machines that are not responding to normal stop operation with the
esxcli vm
process kill
command. Specify one of the options listed in
Connection Options for vCLI Host Management Commands
in place of
<conn_options>
.
- List all running virtual machines on the system to see the World ID of the virtual machine that you want to stop.esxcli <conn_options> vm process list
- Stop the virtual machine by running the following command.
The command supports threeesxcli <conn_options> vm process kill --type <kill_type> --world-id <ID>--typeoptions. Try the types sequentially -softbeforehard,hardbeforeforce. The following types are supported through the--typeoption.TypeDescriptionsoftGives the VMX process a chance to shut down cleanly, likekillorkill -SIGTERM.hardStops the VMX process immediately, likekill -9orkill -SIGKILL.forceStops the VMX process when other options do not work.
If all three options do not
work, reboot your
host to
resolve the issue.