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.

Desktop Virtual Machine Software Comparison

October 31, 2009

A few years ago I was using Microsoft Virtual PC at home, and I quickly transitioned to VMware Server and VMware Player due to my desire to use USB devices inside the VM.

Not fully satisfied, I tried other virtual machine software and subjectively determined that Sun VirtualBox ran my virtual machines faster and provided the USB support that I required. I have been a happy user of VirtualBox since then, and I have had no need to look elsewhere… until VirutalBox 3.0 started to support multiple CPUs.

The promise of multiple CPUs being used within a VM is a tempting feature that once embedded in one’s consciousness, becomes a mandatory requirement. For this reason, Microsoft Virtual PC (even the Windows 7 version) is unacceptable.

I have been experiencing stability issues in VirtualBox for many months now. In fact, I cannot use the multiple CPU feature in VirtualBox because after approximately 5 or 10 minutes of usage the graphics display corrupts and the virtual machine hangs. In addition, support for Direct X and graphics acceleration is experimental, and Windows Aero does not work within the VM. Multiple monitors are only partially supported through the ‘headless’ mode and using Remote Desktop with the /span option.

However on the positive side, VirtualBox supports Virtual PC, VMware and open hard disk formats, in addition to a seamless window mode, USB, and snapshots.

My recent investigations into virtual machine software have surprised me – and I must applaud VMware.

Both VMware Player 3 and Workstation 7 support multiple CPUs, multiple monitors, Windows Aero, DirectX and graphics acceleration, USB, Unity / seamless / integrated mode, and the ability to create virtual machines (previously Player did not have this ability).

VMware Workstation in addition provides snapshots and record/replay functionality – among other things.

Virtual PC does not support multiple CPUs, nor multiple monitors, nor graphics acceleration, nor Windows Aero, but it does now support USB (due to the concept of Windows 7 XP mode) and desktop integration.

So in conclusion, I have discarded VirtualBox and now prefer VMware Player.

Perhaps VirtualBox 4.0 will be stable with multiple CPUs, work fully with multiple monitors, support Windows Aero, and have non-experimental support for DirectX and graphics acceleration? (It would just be nice to have the option to use snapshots – which VMware Player doesn’t and probably will never have)…

Converting Between Virtual Disk Formats

October 29, 2009

In addition to its own native VDI virtual disk file format, Sun’s VirtualBox supports both Virtual PC’s VHD virtual disk file format and WMWare’s VMDK virtual disk file formats, AND has the ability to convert your virtual disks between these formats.

What they don’t tell you however, is that the virtual disk must be fully removed from the VirtualBox Virtual Media Manager before the command will run successfully (if you have been using the virtual disk previously in a virtual machine in VirtualBox).

For example, the command to convert a VMDK to a VHD is:

"c:\program files\sun\VirtualBox\VBoxManage.exe" clonehd "my.vhd" "my.vmdk" –format vmdk

Below is the documentation from section 8.16 VBoxManage clonehd:

VBoxManage clonehd         <uuid>|<filename> <outputfile>
                           [--format VDI|VMDK|VHD|RAW|<other>]
                           [--variant Standard,Fixed,Split2G,Stream,ESX]
                           [--type normal|writethrough|immutable]

where the parameters mean:


Allow to choose a file format for the output file different from the file format of the input file.


Allow to choose a file format variant for the output file. It is a comma-separated list of variant flags. Not all combinations are supported, and specifying inconsistent flags will result in an error message.


Only honored if –remember is also specified. Defines what kind of hard disk type this image should be.


Keep the destination image registered after it was successfully written.