To manage a VMware virtual server from the command line.
- November 13th, 2008
- Posted in Documentation
- Write comment
This works in VMware server 1.0.x for linux.
Check status (up or down):
vmware-cmd /pathtoyourvmxfile/vmxfile.vmx getstate
Start virtual server:
vmware-cmd /pathtoyourvmxfile/vmxfile.vmx start
Shutdown virtual server:
vmware-cmd /pathtoyourvmxfile/vmxfile.vmx stop
Here is how to start a VMware Workstation guest from the command line:
vmrun -T ws start “/opt1/Virtual Machines/CentOS5x/CentOS/CentOS.vmx”
I used this to start a VMware Workstation 7.x guest. I was trying to do this remotely. I logged into the host with: “ssh -X” and then entered the command above. At which point, the VMware Workstation UI came up on my remote machine. From here, I was able to start the guest, since for some reason it did not automatically start. Then, I was able to close the VMware Workstation window and allow the guest to run in the background. Not clean, but it worked. The vmrun command has a nogui parameter, but this kept giving error that was rather generic (I can’t remember it now.). My host was running Fedora 13.