If you find unresponsiveness behavior of a virtual machine, you can use ESXCLI command to turn off or power off a virtual machine.
- Connect to console of your ESXi host, you can use putty to establish a ssh session.
- To find a list of all the virtual machines running on the host, use the below command:
excli vm process list
[root@localhost:~] esxcli vm process list
LAB-001
World ID: 893271
Process ID: 0
VMX Cartel ID: 893211
UUID: 42 03 3d 76 5f 80 32 3e- c8 4h 6y f5 3v 89 b6 08
Display Name: LAB-001
Config File: /vmfs/volumes/592ja3hh-oa8970h1-bn9z-1988fa58heyt/LAB-001/LAB-001.vmx
LAB-002
World ID: 984807
Process ID: 0
VMX Cartel ID: 984509
UUID: 43 08 3h ut 4f 77 43 4f- b9 3j 7h h5 2g 67 b7 99
Display Name: LAB-002
Config File: /vmfs/volumes/592ja3hh-oa8970h1-bn9z-1988fa58heyt/LAB-002/LAB-002.vmx
- Make a note of World ID of an unresponsive virtual machine.
- Now, run this command to kill/power off the virtual machine
esxcli vm process kill –type=soft -w=WorldID
[for type you can select soft, hard or force ]
In our example, the world ID of LAB-001 is 893271 and the world ID of LAB-002 is 984807
[root@localhost:~] esxcli vm process kill –type=soft -w=893271
[root@localhost:~] esxcli vm process kill –type=soft -w=984807