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!
- Open an SSH session to the ESXi host running the VM
esxcli vm process listto see a list of running virtual machines.
- Look thru the output of the command and find the VM you want to turn off and take note of its World ID
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=hardfor a normal power-off