Home > Commands, Virtualisation, VMware > VMware – Commands to power on VMs from command line

VMware – Commands to power on VMs from command line

November 10, 2016 Leave a comment Go to comments

ESXi 5.x and 6.0

List the inventory ID of the virtual machine with the command:

vim-cmd vmsvc/getallvms | grep <vm name>

Note: The first column of the output shows the vmid.

Check the power state of the virtual machine with the command:

vim-cmd vmsvc/power.getstate <vmid>

Power-on the virtual machine with the command:

vim-cmd vmsvc/power.on <vmid>

ESX 4.0 and ESX 4.1

To list the path of all the virtual machines on the host:

vmware-cmd –l

Get the state of the virtual machine with the command:

vmware-cmd <path to the VMX file> getstate

Power on the virtual machine with the command:

vmware-cmd <path to the VMX file> start
    
-Eric

Advertisements
  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 )

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

%d bloggers like this: