-->

How to power on/off the VM from command line in ESXi host

 Using the ESX command-line utility vim-cmd to power on/off the virtual machine
On the ESXi console, 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

for eg: VMID is 150

To get the current state of a virtual machine:

#vim-cmd vmsvc/power.getstate 150

Shutdown the virtual machine using the VMID.

#vim-cmd vmsvc/power.shutdown 150

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

#vim-cmd vmsvc/power.off 150

#vim-cmd vmsvc/power.on 150
How to power on/off the VM from command line in ESXi host How to power on/off the VM from command line in ESXi host Reviewed by Virtulization on April 28, 2021 Rating: 5

No comments:

Home - PageNavi (show/hide)

hide
Powered by Blogger.