Harry Sukumar's Weblog

Control Virtual Machines from Command line

Posted by hsukumar on 20/04/2009

Vmware workstation and vmware server comes with a command called vmrun which can be used from command line to control the virtual machines, without having to use GUI such as vi web access

The vmtool gets installed in the host system as part of vmware workstation/server install on linux the executable is located under /usr/bin/

#vmrun vmrun start /vmware-machines/WinXP-VM2/WinXP-VM2.vmx ( basically you are specifying the vmx file of the virtual machine )

some of the controls are

start: Start VM

Stop: Stop VM

reset: restart or reboot the vm

suspend: suspends the vm based on fast restart via start

Pause: pause the machine

unpause: unpause the machine

And also if you want to control the vm from remote host you can type the following command

vmrun -T server -h https://vmwarehost.address:8333/sdk -u root -p mypassword stop "/vmware-machines/WinXP-VM2/WinXP-VM2.vmx"

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>