Help, VMware ESXi will not turn off my VM!

Labeling things in a consistent and accurate matter is important. When naming a LUN on the SAN and in VMWare, you want their names/numbers to be identical. But what happens when someone flip-flops and names something wrong and you delete the wrong LUN?

This happened to me and while we had backups ready to go, I ran into an issue that slowed me down a lot - the VMs wouldn't power off! Despite not having a disconnected datastore, the VMs appeared up and running - except any command you sent them would fail, including turning off the VM so I could overwrite with a backup.

Luckily there's a very simple way to force them to turn off using the esxcli!

  1. Open an SSH session to the ESXi host running the VM
  2. Run esxcli vm process list to see a list of running virtual machines.
  3. Look thru the output of the command and find the VM you want to turn off and take note of its World ID
  4. Run esxcli vm process kill --type=force --world-id=<your world id> - this will forcibly kill the VM instantly, though you're only supposed to do this in an emergency situation. Otherwise, you should use type=hard for a normal power-off
Posted on
Tagged in vmware
Chris Reinking

comments powered by Disqus