By Cameron Sturdevant  |  Posted 2010-09-21

Optimizing Windows 7 for VDI

One of the best ways to reduce costs in a virtual desktop infrastructure deployment is to optimize the guest operating system. I slimmed down a virtual machine guest running Windows 7 Enterprise edition to reduce the growth of the cloned desktops in my tests of VMware View 4.5. Besides reducing the amount of storage and CPU consumed by my test VDI systems, my guest VMs got a little performance boost along the way.

My tests showed that there are some limits IT managers should keep in mind when stripping down Windows 7 for use in a VDI deployment. Among other factors, it is easy to be too enthusiastic in removing services and applications that may be "little used" as opposed to "unneeded." There is no substitute for fine-tuning in your environment, but here are some milestones that I discovered on my way to creating a leaner, meaner Windows 7 reference clone.

I used the guidelines provided by the VMware View 4.5 Administrator's Guide to tune my Windows 7 systems for VDI. The first step in my optimization journey was to start with a version of Windows 7 that Microsoft provides that has already been slimmed down. I chose Windows 7 Enterprise on the assumption that only a volume license version of Windows makes sense in a VDI deployment. Specifically, I used Windows 7 Enterprise N x86, the European Union version of Windows 7, which has the unique advantage of not having Windows Media Player embedded in the code.

I also created a parallel reference system using Windows 7 Enterprise x86-the "regular" version. This system had no services or features fine-tuned for VDI but also had nothing added that wasn't part of the normal installation process.

Optimizing Windows 7 or any guest operating system can be viewed in terms of a series of modules: settings that are controlled when VMware creates the reference VM, settings you control in the guest VM that favor performance over prettiness, components and services that you disable, and finally services that you remove from the guest VM and perform instead in the virtual environment, such as antivirus protection.

In my optimized Windows 7 VM, I used VMware View 4.5 to reduce the virtual hardware footprint. I removed the floppy drive, USB controller and sound card but left the CD/DVD drive. The optimized .vmdk file was 5.87GB while the .vmdk for the regular installation was 6.2GB, making the optimized image 5.6 percent smaller.

To favor performance over prettiness, I set the sound scheme to "no sounds," set the screen saver to "none" and used a basic theme with a solid color background. Using system configuration I set my optimized VM to boot with no GUI and using only base video. I also disabled the file system utility that tracks the last time a file was accessed and set power usage to "performance."

Finally, I disabled a number of services and scheduled tasks in the optimized Windows 7 VM. I agree with the assumption that updates and patching will happen in the gold master and not in the virtual desktop systems. Therefore, I disabled Windows Application Experience (the service that generates the Windows Experience Score), and every diagnostic and customer experience reporting service I could find. I also axed Windows themes, indexing, event logs, Windows Defender, search and Windows Update.


In my side-by-side comparison, the optimized Windows 7 VM, when idle and with no applications running, consistently used between 0 and 3 percent of the CPU, very little (less than 2 percent) disk I/O and around 250MB of RAM. The non-optimized Windows 7 VM was about the same when idle.

However, during disk defragmentation, CPU utilization went up to around 40 to 50 percent and disk I/O went to around 3MB per second. Over time it's possible to see sizeable computing, disk and network savings by disabling services and handling updates and maintenance activities in the gold master image.

Slimming with the current

Optimization depends on several assumptions to work well. IT managers should spend most of their planning time putting together a desktop policy that balances user needs with VM optimization. Based on my tests, I would prioritize disabling scheduled tasks that are unnecessary over stripping out services that might hinder application workload execution.

It will likely be the case that your organization will use a handful of gold master images from which to clone desktop systems based on the basic workload types. A base operating system that includes the Windows Indexing service, for example, may be appropriate for some user workloads. However many gold master images you decide to make (and the number should be on the more conservative side), ensure that a bulletproof update plan is in place before production deployment begins.

Even though most VDI systems have the lifespan of a mayfly-and therefore a considerably shorter period of time in which to accumulate malware-consider that client security tools that get left out of individual desktop systems should be made up for in the virtual environment. VMware's vShield products are an emerging technology that should be considered for protecting your VDI systems.

Rocket Fuel