VMware Virtual Machine Thrashing Hard Disk

April 22, 2010

In a previous post I discussed how I had been having issues with an incompatibility between the VMware “.vmem” file and antivirus software.

It turns out that a similar disk thrashing issue has been occurring while the VM is running… but this time is occurs randomly. For some reason, VMware decides to perform an almost endless number of reads from the “.vmem” file for at least 15 minutes and thus crippling system performance.

I solved this problem by disabling the usage of the “.vmem” file.

Unfortunately VMware Player does not have a UI setting for this, so I opened up my virtual machine’s VMware “.vmx” settings file and appended the following:

mainMem.useNamedFile = "FALSE"

With this setting, VMware no longer creates and uses the “.vmem” file, and instead relies on the Window’s host machine to use its own paging file, only if and when it is actually necessary.

The only time the “.vmem” file is temporarily created is if you save the virtual machine state (similar to hibernation) instead of shutting down the machine.

The virtual machine now has excellent performance characteristics!

VMware “.vmem” Files and Antivirus Program Incompatibility

December 16, 2009

I have been using a local virtual machine using WMware products on a Windows 7 host that also runs Microsoft Forefront Client Security (MFCS).

MFCS is configured to schedule a scan of the disk on a nightly basis from 2am. As I have painfully noticed however, if I allow the virtual machine to be in a running state overnight, then even by 10am MFCS is still thrashing the hard disk at 100% and thus making my host machine almost unresponsive.

After an investigation, I discovered that the disk was thrashing on a VMware virtual machine “.vmem” file. This file type is apparently a backup of the virtual machine’s paging file that only exists while the virtual machine is running, or if it has crashed.

So in order to solve the problem I added “*.vmem” to the list of files to exclude when MFCS performs a scan.