Home > Virtualisation, VMware > Power on/off VM via local ESXi Shell

Power on/off VM via local ESXi Shell

Enabling local shell access in direct console
  1. On ESXi host press the F2 button and log in with your credentials when prompted.
  2. In the list go on Troubleshooting Options and press Enter.
  3. Then choose Enable ESXi Shell and press Enter (On the right you will notice that ESXi Shell is Disabled changes to Enabled).
  4. To exit the menus and log out press ESC until you return to the main screen.

How to power on (or off) the VM (ESXi 5.x)

You need to know the id (VMID) of the VM you plan to turn on plus start up and shutdown commands

  1. Command to list the inventory ID of the VM
    vim-cmd vmsvc/getallvms | grep VM_NAME
  2. Check the VM state (Is it powered on?)
    vim-cmd vmsvc/power.getstate VMID
  3. Power on the VM
    vim-cmd vmsvc/power.on VMID
  4. Shutdown and power off the VM
    vim-cmd vmsvc/power.shutdown VMID
    vim-cmd vmsvc/power.off VMID


Source: VMware KB

  1. No comments yet.
  1. No trackbacks yet.

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 )

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s

%d bloggers like this: