This article explains how to stop a virtual machine in an ESXi environment.
Note : When attempting to troubleshoot the cause of an unresponsive virtual machine, it is usually a good idea to collect performance metrics and then suspend or crash the virtual machine to gather additional troubleshooting information.
For more information, see:
esxcli
can be used to locally or remotely power off virtual machines running on ESXi 5.x and later.
.vmx
to get a list of running virtual machines, identified by their World ID, UUID, display name, and path to their configuration file:esxcli vm process list
esxcli vm process kill --type= [soft,hard,force] --world-id= WorldNumber
esxtop
sendk
esxtop
Run the utility by executing the following command :esxtop
LWID
Identify the target virtual machine by its name and leader world ID ( ).World to kill
At the prompt, enter the Leader World ID from step 7 and press Enter..vmx
to get a list of all registered virtual machines, identified by their VMID, display name, and path to their configuration file:vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.getstate VMID
vim-cmd vmsvc/power.shutdown VMID
vim-cmd vmsvc/power.off VMID
Send a signal to ESXi to power off the virtual machine
A virtual machine can be stopped from the command line by sending a signal to the process.
WARNING: This procedure can be dangerous for your ESXi host. Not identifying the correct process ID (PID) and killing the wrong process can lead to unexpected results. If the issue persists after performing these steps, file a support request with VMware Technical Support and note this Knowledge Base article ID (1014165) in the problem description. For more information, see https://knowledge.broadcom.com/external/article/142884
kill
You can use a command to send a signal to a running virtual machine process to stop it.
ps | grep vmx
7662 7662 vmx /bin/vmx
7667 7662 vmx /bin/vmx
7668 7662 mks:VirtualMachineName /bin/vmx
7669 7662 vcpu-0:VirtualMachineName /bin/vmx
vmx
vmx
vmx
If the process is listed, end it by running the following command:kill ProcessID
kill -9 ProcessID