Menu Close

How to shutdown a VMware VM by command

List all the VMs that are registered in this ESXi host:

vim-cmd vmsvc/getallvms

This will give us the VMID of all the VMs, take this above SHD VM as an example, the VMID is 2.

Verify the VM power status

vim-cmd vmsvc/power.getstate <Vmid>

Shutdown the VM by command:

vim-cmd vmsvc/power.shutdown VMID

Leave a Reply

Your email address will not be published. Required fields are marked *