Turn on your VMs when vCenter is down

If you don’t want to sit through connecting to all your 4.1 ESX hosts to find your vCenter server or your MS SQL server if they need help, you can do it through the command line.

ssh ESX-IP-Address
SSH to your ESX host

vim-cmd vmsvc/getallvms
This lists your VMs

vim-cmd vmsvc/power.on 64
This will power on Vmid 64. You can get your VM’s Vmid from the getallvms command.

vim-cmd vmsvc/power.reboot 64
This will reboot the VM having problems.

vim-cmd vmsvc
This will show you all the possible commands you can run. There’s quite a few.

This is way faster than to vSphere client and I’d recommend it for all your vCenter outage needs. Apparently it works with ESXi 5.0 according to the indomitable Boche here.

EDIT:
vim-cmd vmsvc/tools.cancelinstall 64
Also absurdly useful to stop a hung tools install

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s