Start/Stop/Reset/Reboot ESX 5x VM from command line

To power on a virtual machine from the command line:

  1. Get VM ID with the command:
    1
    
    vim-cmd vmsvc/getallvms
  2. Check the power state of the virtual machine with the command:
    1
    
    vim-cmd vmsvc/power.getstate <vmid>
  3. Power-on/Restart/Reset/Poweroff using:
    1
    2
    3
    4
    
    vim-cmd vmsvc/power.on <vmid>
    vim-cmd vmsvc/power.off <vmid>
    vim-cmd vmsvc/power.reset <vmid>
    vim-cmd vmsvc/power.reboot <vmid>

Leave a Reply

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