Powering off/on a virtual machine on an ESXi host

Powering off/on a virtual machine on an ESXi host

Log on to the ESXi console. Or via SSH

Get a list of all registered virtual machines, identified by their VMID, Display Name, and path to the .vmx configuration file, using this command:

vim-cmd vmsvc/getallvms

To get the current state of a virtual machine:

vim-cmd vmsvc/power.getstate VMID

Shutdown the virtual machine using the VMID found in Step 2 and run:

vim-cmd vmsvc/power.shutdown VMID

Note: If the virtual machine fails to shut down, use this command:

vim-cmd vmsvc/power.off VMID

Leave a Reply

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

three × 1 =

This site uses Akismet to reduce spam. Learn how your comment data is processed.