Techieshelp.com

Power off / Restart a VM – Command line

Problem

You need to restart or power off a vm from command line.

 

Resolution

For ESXi 4.0 run the following commands

To list all VM`s currently up run….

vim-cmd vmsvc/getallvms

To power off a specific VM run…

vim-cmd vmsvc/power.off <vm id>

To restart a VM then run..

vim-cmd vmsvc/power.restart <vm-id>