This page describe command line options that are available when you launch VMware Workstation. There are two methods to operate virtual machines via command line, vmrun application or vmware itself.
VMRUN Application

VMware Workstation includes a separate application, vmrun. To launch the vmrun application, from the command prompt, enter:

vmrun COMMAND Parameters[]

Valid vmrun commands and options are described in the following :
Command Parameters Description
list list all running VMs
start path to vmx or vmtm file start a VM or Team
stop path to vmx or vmtm file stop a VM or Team
reset path to vmx or vmtm file reset a VM or Team
suspend path to vmx or vmtm file suspend a VM or Team
upgradevm path to vmx Upgrade a virtual machine to the current Workstation version
installtools Path to vmx file Install Tools in Guest OS
listSnapshots Path to vmx file List all snapshots in a VM
snapshot Path to vmx file Create a snapshot of a VM
deleteSnapshot Path to vmx file Remove a snapshot from a VM Snapshot name
revertToSnapshot Path to vmx file Set VM state to a snapshot

example:

to start a virtual machine
vmrun start c:\My Virtual Machines\.vmx

With virtual machines that require input through a VMware Workstation dialog box, vmrun may time out and fail. To disable Workstation dialog boxes, insert the following line into the .vmx configuration file for a virtual machine:

msg.autoAnswer = TRUE
VMware

VMware -x -X -q -s = -v / / .virtual machinex
Option Description
-x Automatically powers on the virtual machine when VMware Workstation starts
-X Automatically powers on the virtual machine, then switches the VMware Workstation window to full screen mode
-q Closes the virtual machine's tab when the virtual machine powers off. If no other virtual machine is open, it also exits VMware Workstation. This is particularly useful when the guest operating system is capable of powering off the virtual machine
-s Sets the specified variable to the specified value. Any variable names and values that are valid in the configuration file may be specified on the command line with the -s switch
-v Displays the product name, version and build number
//.vmx Launches a virtual machine using the specified configuration file

example:
launches the Windows Me virtual machine specified, powers it on automatically and switches to full screen mode
"C:\Program Files\VMware\VMware Workstation\Programs\VMware.exe -X C:\Documents and Settings\\My Documents\My Virtual Machines\Windows Me\Windows Me.vmx"

0 Responses to 'Operate Virtual machine from command line'