Programmer Tips‎ > ‎

VMWare Tweaks

posted Feb 25, 2012, 10:34 AM by Tyler Akins   [ updated Jun 8, 2012, 10:29 AM ]
I use a virtual machine at work.  I've tried using VirtualBox, but I like VMWare Player a little more, especially since I have tweaked some settings to make it work better and changed it to be less obtrusive.

Stopping Continual Writes To Disk

First and foremost, my largest complaint with VMWare is how it always writes to the hard drive.  At times my Windows laptop would hang or be severely bogged down.  My hard drive light would blink every second or two.  I thought it might be the anti-virus software scanning or noticing changes in the *.vmdk file where the virtual disk image is stored.  It turns out that VMWare is constantly writing out the contents of the virtual machine's memory to disk.  To disable this feature, we need to edit config.ini; on Windows 7 this file is located at "C:\Users\YourUsername\Application Data\VMWare\config.ini".  You will have a difficult time browsing to this location since the Application Data folder is hidden by Windows, but you could open Notepad, use File -> Open, then paste in the filename.

There might not be a config.ini that exists already.  If that's the case, you will need to make a new file.  Once you have this file open in notepad, add this line anywhere inside.

mainMem.useNamedFile = FALSE

Save the file and close Notepad.  If you had VMWare Player open, you will need to close that too before opening another virtual machine.  I've heard that this sort of option works for VMWare Workstation too, but you should reboot or restart all of the VMWare services.  Once you start up the next virtual machine, you shouldn't see the weird hard drive blinking going on any longer.

Hotkey and Fullscreen Preferences

There are a bunch of additional settings you can change which are not available in the VMWare Player's GUI, but are still honored by the program.  Your preferences file on Windows 7 is saved in "C:\Users\YourUsername\Application Data\VMWare\preferences.ini", and you can use Notepad (described above) to open this file as well.

pref.hotkey.gui = "true"
pref.hotkey.shift = "true"
pref.hotkey.control = "true"
pref.hotkey.alt = "true"

Setting these properties will change what you hotkey is.  By default it is control + alt, which is also how I switch desktops in my Ubuntu guest OS.  I switched it to use all four keys - the Widows key (gui), shift, control and alt.

pref.vmplayer.fullscreen.autohide = "TRUE"
pref.fullscreen.toolbarpixels = "0"

The above two properties will change the toolbar when you fullscreen the application into one that will automatically hide.  This gets almost all of the VMWare Player UI out of the way so you can focus entirely on the guest OS.  I also shrink the size of the hidden toolbar; I specify 0 pixels, but it still has a couple there on top.  It's hardly noticeable so I don't mind much.

hints.hideAll = "true"
pref.vmplayer.exit.vmAction = "poweroff"

Lastly, I hide all of the silly hints that VMWare Player likes to keep popping up, plus I like changing the close button's behavior to power off the machine instead of suspend.  Both of these are available in the GUI, but I thought I'd include them here since I use them all the time.
Comments