3

I have a centos vm and I was wondering if there is a way to turn that vm into headless mode.

I found this information on different site

If you want to run a headless VM under VMPlayer simply add the following to your vmware preferences file ($HOME/.vmware/preferences):

pref.vmplayer.exit.vmAction = "disconnect"

but I couldn't find the $HOME/.vmware/preferences directory.

Gnawk
  • 335
  • 1
  • 5
  • 16

2 Answers2

0

You can start a VM in headless mode by using vmrun with the nogui flag:

vmrun start <PATH TO VM> nogui

Similarly, to later suspend machine:

vmrun suspend <PATH TO VM>

To see a list of running VMs:

vmrun list
Etheryte
  • 24,589
  • 11
  • 71
  • 116
-1

Assuming your VM Host is Windows

Short answer:

Edit this file: %HOMEPATH%\AppData\Roaming\VMWare\preferences.ini


Slightly longer answer:

If you haven't set Hidden Folders as visible in Windows File Explorer, you may have trouble finding the AppData folder.

To view Hidden Folders:

  1. Open Windows Explorer (the folder icon)
  2. Select the view tab
  3. tick the box next to Hidden items

Add the new setting:

  1. Shut down any running VMs and close VMWare Player
  2. Open your home folder:
    • Press WINKEY + R
    • Type %HOMEPATH% in the box and hit [ENTER]
  3. Open AppData -> Roaming -> VMware
  4. Right click preferences.ini and choose Edit
  5. Add pref.vmplayer.exit.vmAction = "disconnect" on a new line at the bottom.
  6. Save and close. Then start VMWare.
  7. If everything went right, you should be able to close a running VM window and it will continue on in the background.

note: This didn't actually cause the intended effect for me under VMWare Player 15.5.1 - YMMV