Powering on a virtual machine from the command line

I recently made a post about powering on virtual machines in bulk using PowerCLI. That process worked well to power on VMs in vCenter, but what if you need to turn on vCenter? In some cases (lockdown mode, firewall rules, etc) you may need to power on a VM from the tech support console of an ESXi host. vSphere has accountted for this through the use of vim-cmd commands in the local console. The first command will return the ID for each VM on a host. The second command accepts one of these IDs to execute a power on operation:

vim-cmd vmsvc/getallvms
vim-cmd vmsvc/power.on ##

VMware has a good KB article on the subject: 1038043 | Powering on a virtual machine from the command line when the host cannot be managed using vSphere Client.

This entry was posted in Virtualization. Bookmark the permalink.

Leave a Reply

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

*

Notify me of followup comments via e-mail. You can also subscribe without commenting.