Networking HowTos
Networking HowTos

Run VMware Workstation Virtual Machines in the Background

May 26, 2017 Virtualization, VMWare

VMware Workstation is a great tool for running virtual machines on a desktop computer/laptop. It allows you to run virtualized operating systems on your PC without having to go to the effort of setting up dual boot scenarios, or can be great for testing something in a hurry. Usually you would open VMware workstation, and run the virtual machine, which in turn, will start running, showing you the output from the console of the virtual machine. This is great for a virtual Windows machine, however if you are virtualizing something like a Linux server, you may not want to have the VMware Workstation window appearing, so the virtual machine can just be running in the background, and you can SSH in to work on it.
Thankfully you can do this with VMware Workstation, however it requires you to set up a shortcut or batch file to execute a custom vmware workstation command.
The following command will start the specified virtual machine (referenced by the .vmx file) in the background, and not open VMWare Workstation itself.
Note the “nogui” parameter at the end of the below command line

"C:\Program Files (x86)\VMware\VMware Workstation\VMRun.exe" -T ws start "C:\path\to\virtual machine.vmx" nogui

The key to starting the virtual machine in the background is the “nogui” parameter on the end of the command line. Make sure you include this. You may have to scroll across if you don’t see it at the end of the example line above. This “nogui” parameter starts the virtual machine in the background, and doesn’t open VMware Workstation itself.
Modify the path to vmrun.exe to suit your system, and obviously the path and filename for your VMware .vmx file for the virtual machine you want to start in the background.
Include quotes where needed if your file paths have spaces in them.
Once running, you should see the VMware Workstation icon in the system tray change to ‘virtual machines running’ icon with the play icon.

You Might Also Like