Monday, April 30, 2012

Fix for Excessive VMWare Disk Activity On Host After Suspend or Shutdown

I use VMware to run 64-bit guest OS’s for development and testing on my laptop.  (Windows 7 only allows 32-bit guests, Windows 8 incorporates Hyper-V so this limitation will go away soon).  One of the nice benefits of running a VM is that I can suspend and bring it back online in a matter of seconds each time I want to use the VM.  Unfortunately, this comes with a negative side effect – the drive on the host that I am storing the VMs on thrashes for up to 15 minutes after VMWare was closed.  At the end of the day, if I had just suspended my VM and tried to shut down the Windows 7 host OS, it would take 15 minutes to shut down the laptop.

Fortunately I found the fix on a SharePoint blog.  Essentially you have add a setting to the VMWare config file.  For VMWare 7, the file is located here: C:\ProgramData\VMware\VMware Workstation\config.ini.  The setting that you need to add is mainMem.useNamedFile = “false”.  One thing to be careful of is if you copy/paste from the web, the quotes on the “false” will be curly directional style rather than the straight kind that are required for the config file.

One other setting that I changed was in the main preferences for VMWare under the Memory tab, I set the “How should the system allocate memory for virtual machines?’ to “Fit all virtual machine memory into reserved host RAM”.  I am able to do this since I have 16GB of RAM on my laptop, not sure if this is quite as feasible with less RAM.

3 comments:

jmr said...

thx very much!!!

I was having a very slow performace in a vmware guest since I had increased it memory setting up to 8gb (my laptop wich is the host has 16gb like yours).
The problem was that from then vmware where doing a lot of swap instead of allocating the whole mem amout.
Thaks again!

Anonymous said...

Doesn't work on Workstation 11.

Mike Jackson said...

Tried this on Workstation 12 and it works perfectly. This was driving me nuts. I purchased a new beefier laptop and was getting the same issue with the HDD at 100% for about 10-15 minutes after i suspended a VM. This would prevent me from staring another VM due to the slow performance.It could take up to 20-25 to start another VM right after suspending the first VM.
all good now!

Thanks for posting this.