≡ Menu

Start VMWare Guest OS

You can easily start / stop / pause or take a snapshot from a shell prompt under a Linux / Windows host using vmrun command. This is useful if you do not want to run web interface for starting and/or stopping VMs.

vmrun commands

vmrun -u USER -h 'https://vmware.server.com:8333/sdk' -p PASSWORD COMMAND [PARAMETERS]
OR
vmrun -u USER -h 'https://vmware.server.com:8333/sdk' -p PASSWORD start "[storage] Path/to/.vmx"

Where,
=> -u USER : VMWare server username

=> -h 'https://vmware.server.com:8333/sdk' : Local or remote server FQDN / IP address

=> -p PASSWORD : VMWare server password

=> COMMAND [PARAMETERS] : Command can be any one of the following:

POWER COMMANDS           PARAMETERS           DESCRIPTION
--------------           ----------           -----------
start                    Path to vmx file     Start a VM
                         [gui|nogui]
stop                     Path to vmx file     Stop a VM
                         [hard|soft]
reset                    Path to vmx file     Reset a VM
                         [hard|soft]
suspend                  Path to vmx file     Suspend a VM
                         [hard|soft]
pause                    Path to vmx file     Pause a VM
unpause                  Path to vmx file     Unpause a VM

Start a VM called CentOS

To start a virtual machine with Vmware server 2.0 on a Linux host, stored on storage called iscsi:
vmrun -T server -h 'https://vms.nixcraft.in:8333/sdk' -u root -p 'secrete' start "[iSCSI] CentOS52_64/CentOS52_64.vmx"
To start a virtual machine with Workstation on a Windows host (open command prompt by visiting Start > Run > cmd > [enter] key):
vmrun -T ws start "c:\My VMs\centos\centos.vmx"

Stop a VM called CentOS

To stop a virtual machine with Vmware server 2.0 on a Linux host, stored on storage called iscsi:
vmrun -T server -h 'https://vms.nixcraft.in:8333/sdk' -u root -p 'secrete' stop "[iSCSI] CentOS52_64/CentOS52_64.vmx"

Reset a VM called Debian

To reset a virtual machine with Vmware server 2.0 on a Linux host, stored on storage called DISK3:
vmrun -T server -h 'https://sun4k.nixcraft.co.in:8333/sdk' -u root -p 'secrete' reset "[DISK3] Debian5/Debian5.vmx"