Wednesday, December 15, 2021

ESXi Host Kill VM

In this tutorial, we will stop a VM from the command line mode. We will stop the VM by killing that VM process. Three types of killing methods are available for the virtual machine. We can use any of the methods. By chance, the "Soft" and "Hard" method is failed to kill that VM process then we should use the "Force" method. It will definitely work.

To view the virtual machine list that is running on this host, we will use the below command.


esxcli vm process list


This command will output just like as the below. We will use the "World ID" number to identify the specific VM.




Now we will execute the VM process killing command using that "World ID" number. The command structure is given below.


esxcli vm process kill --type=[soft,hard,force] --world-id=[world-number]


One example for the VM process killing command is given below.


esxcli vm process kill --type=force --world-id=2188667


After executing this command, that virtual machine will be stopped whose "world-id" number is "2188667".

That's all. Using this way, we can turn off or shut down any virtual machine.

No comments:

Post a Comment