Recently, I got to see something I haven’t had to experience in a while. I had a VM that wouldn’t power down in the GUI even after I vMotion it to another host. I had to go back into my old school archive for the procedure of bringing down a VM via CLI from the ESXi host it lives on.
Log into ESXi hosts that VM lives on as root
You need to list out all VMs and get their Vmid number
Grab the VMs Vmid from the far left side of screen
See the current state of the VM
#vim-cmd vmsvc/powergetstate vmid#
Power off the VM or if you are looking to reboot move to step 6.
#vim-cmd vmsvc/power.off vmid#
If you need to power on the VM
#vim-cmd vmsvc/power.on vmid#
If you need to reboot the VM use the following command
#vim-cmd vmsvc/power.reboot vmid#
There are still times even in the VMWare 6.7 world where you may need to still use CLI to power on/off or reboot a VM. I hope y’all find this article useful.