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>.

1

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
2

Stop the virtual machine by running the following command.

esxcli <conn_options> vm process kill --type <kill_type> --world-id <ID>

The command supports three --type options. Try the types sequentially - soft before hard, hard before force. The following types are supported through the --type option.

Type

Description

soft

Gives the VMX process a chance to shut down cleanly, like kill or kill -SIGTERM.

hard

Stops the VMX process immediately, like kill -9 or kill -SIGKILL.

force

Stops the VMX process when other options do not work.

If all three options do not work, reboot your ESXi host to resolve the issue.