1) SSH or get to the console of your ESXi host. I am assuming you know which host the VM currently resides. At the prompt type in "esxcli vm process list".
Running this command will list all the current running VM's as shown below. See if the one you wish to shut down is listed and make a note of the "world id"
2) Now for the command, to kill off the VM you would type in:
"esxcli vm process kill --type={soft,hard,force} --world-id={world id}"
The kill type "soft" means trying to shut down the OS like how you would normally shut down an OS, "hard" means shutting down the OS without giving a chance for the applications to shut down, "force" means it doesn't care what state it is in, it will force the VM to switch off just like pushing a power switch.
So with the example I have above I would type in "esxcli vm process kill --type=soft --world-id=9741765"
3) Once the command has run successfully it will return you back to the prompt. Type in:
"esxcli vm process list"
See if the VM that you are trying to power off is still listed. If you have selected kill type "soft" then it may take a few moments before it will be powered off so run the command "esxcli vm process list" a few times. If after a few times or you waited long enough and feel the VM is not doing anything then run the command in step 2 again but using hard type instead
No comments:
Post a Comment