Thursday, 18 July 2013

How to launch VMware Player VMs without GUI

How to launch VMware Player VMs without GUI

 

I assume that you have already created a VM using VMware Player, and so have *.vmx files ready somewhere. Now you want to start/stop the VM using vmrun. You don’t need root permission to use vmrun command.
First, download VMware VIX for Linux, and then install it on the VMware host as follows.
$ chmod 755 ./VMware-VIX-1.11.0-471780.x86_64
$ sudo ./VMware-VIX-1.11.0-471780.x86_64
To start VM:
$ vmrun -T player start /path/to/vm/my.vmx nogui
To reboot VM:
$ vmrun -T player reset /path/to/vm/my.vmx soft
To power off VM:
$ vmrun -T player stop /path/to/vm/my.vmx soft
VMware Player does not support VM snapshot operations. So you cannot take a snapshot of VMware Player VMs using vmrun. But if your VM was created using VMware Workstation or VMware Fusion, you can take a snapshot of a running VM as follows.
$ vmrun -T ws (or fusion) snapshot /path/to/vm/my.vmx my_snapshot

 

 

0 comments: