7

I used to run VMware Player with no GUI by editing the .vmx file and disabling a preference to confirm before closing a virtual machine. The process was to disable that option in VMware Player preferences by adding two lines to the end of the .vmx file.

This will make closing VMware Player send the VM to background and close the Player GUI.

I searched the Internet to find out what those two lines were but have had no luck; all the posts just talk about using vmrun command or using VMware Server.


Edit 1

Headless is the terminology for the service not without GUI


Does any one know what those two lines are?

4
  • Exactly what do you mean by "no GUI"? How did you close VMware Player without a GUI?
    – jamesdlin
    Jan 16, 2019 at 15:46
  • Colse the vmware screen but not shutting down the OS
    – AnAs51993
    Jan 16, 2019 at 15:51
  • That doesn't explain exactly what "no GUI" means to you. What do you expect to see (and not see)? Do you still want a window with the guest screen? Do you still want a titlebar with minimize/maximize/close buttons? Are you just looking to hide the VMware Player menubar and toolbar?
    – jamesdlin
    Jan 16, 2019 at 15:57
  • No I don't want the guest screen,it sort of un link the process from the player window and close it but the guest remains running
    – AnAs51993
    Jan 16, 2019 at 16:06

3 Answers 3

12

The terminology you're looking for is to run VMs (not VMware Player, which is actually a UI to interact with the VM) headless.

Close all VMware Workstation and Player instances and try editing your preferences file (%USERPROFILE%\Application Data\VMware\preferences.ini on Windows, ~/.vmware/preferences on Linux) to add the lines:

pref.vmplayer.exit.vmAction = "disconnect"
pref.vmplayer.confirmOnExit = "FALSE"
3
  • this will make any instance of VMs headless there is an alternative code to be added to .vmx file to make only one VM headless maybe pref.exit.vmAction = "disconnect" or exit.vmAction = "disconnect" I tried them but did not work any way this is good for now thanks
    – AnAs51993
    Jan 17, 2019 at 3:18
  • No, there is no way to do this on a per-VM basis. The preferences file affects the UI behavior; the .vmx files affect VM behaviors.
    – jamesdlin
    Jan 17, 2019 at 7:54
  • Just to add, after doing this and launching a VM, it is safe to click the X and close your VM console window. It will continue to run in the background and not crash. Your sanity is secure. :)
    – G_Style
    May 6, 2020 at 18:34
0

Look for the VMware VIX API. You will need to create a login to download it but it is free. It installs a tool called 'vmrun' that you can use to start the VM without needing the GUI at all. It works fine with vmplayer (at least on Linux, I haven't tried Windows)

e.g.:

 vmrun -T player start myvm.vmx nogui
0

Maybe not the cleanest solution, but it works: you can use Xvfb to run Vmplayer (but any program, really) without GUI.

First, install Xvfb:

apt-get install xvfb
sudo apt-get install x11-xkb-utils xfonts-100dpi xfonts-75dpi xfonts-scalable xfonts-cyrillic x11-apps

After this, you can run Vmplayer without GUI:

Xvfb :19 -screen 0 1024x768x16 &
export DISPLAY=:19
sudo vmplayer path/to/vmx &

The idea came from this post

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .