Changes

Jump to: navigation, search
The Basics and Syntax of vmrun
The ''guest password flags'' are specified if ''vmrun'' is required to log into the guest operating system to perform tasks such as work with guest files or execute commands. If such operations are not required, these flags may be omitted from the command line:
- * '''-gu''' - A suitable user name via which vmrun may log into the specified guest operating system
- * '''-gp''' - The corresponding password for the guest user specified using the ''-gu'' flag.
The ''command'' argument instructs ''vmrun'' on the task to be performed. For example, ''start'', ''stop'' and ''reset'' are all valid commands. As are the commands to perform tasks within a guest operating system, such as ''runProgramInGuest'' and ''deleteFileInGuest''.
<pre>
vmrun -T server -h https://vmhost:8333/sdk -u root -p mypassword stop "[Vol1] win2008/win2008.vmx"
</pre>
 
== Controlling Virtual Machine Power States with vmrun ==
 
The power states of virtual machines can be controlled either locally or remotely using the ''vmrun'' tool. The commands associated with these tasks are as follows:
 
* '''start'''' - Powers on the specified virtual machine
 
* '''stop'''' - Powers off the specified virtual machine
 
* '''reset''' - Reboots the specified virtual machine
 
* '''pause''' - Pauses the specified virtual machine
 
* '''unpause''' - Unpauses a paused virtual machine
 
For example, to start a specific virtual machine residing on host named ''vmhost'':
 
<pre>
vmrun -T server -h https://vmhost:8333/sdk -u root -p mypassword stop "[Vol1] win2008/win2008.vmx"
</pre>
 
Similarly, to subsequently reboot the same virtual machine:
 
<pre>
vmrun -T server -h https://vmhost:8333/sdk -u root -p mypassword reset "[Vol1] win2008/win2008.vmx"
</pre>
1,798
edits

Navigation menu