Virtual PC / Virtual Server Tips & Tricks
Version 2.0 – 14.8.2006
This document is a assembly of tips and tricks about Virtual PC / Virtual Server
performance improvements of the Partner Technology Specialist Community.
The optimizations here are for demo and test purposes. In a production
environment other rules might apply.
The document is divided in 3 sections:
Host Preparation – how can you improve the settings of your host-
System – this works for all virtual PC Images
Image Preparation – how can you improve the settings of your image
Start Demo – what can you improve during your demo
Exclude „Virtual PC.exe‟ or these files from Antivirus realtime scans:
.vhd .vud .vsv .vfd .vmc
Always keep the Host PC updated & defragged
Hard disks play an important role. The faster the disk, the faster the
Virtual Environment. On a desktop HD are mostly of high speed, on
Laptops/tablets – what most of us use – Build-in HDs are rather
Adding fast external HDs on Firewire or USB 2.0 will help a lot
If possible dedicate one HDs for the VHD and VUD (undo) files.
Even better is to split the load of VHD / VUD of multiple Virtual
Machines over multiple HDs.
You might consider SCSI / IDE switching on desktop PCs – whatever
General rule: the minimum is 2 HDs: one for OS, one for virtual
Use NTFS compression for the VHD, VUD and VSV files. Seems
writing a big chunk to disk is slower than first compressing the
chunk and then write it to disk.
Start Virtual PC with the following option:
Virtual PC.exe –usehostdiskcache
(Best way is to create a shortcut on your desktop)
Using Virtual PC or Virtual Server: Basically there is no real
performance difference between the two – though the development
path of Virtual Server seems to be faster than the one on Virtual
PC; resulting in better performance improvements on Virtual
Comparison of VS & VPC
Virtual PC Virtual Server
Rich GUI client for local Thin web-based admin and VMRC
interactive use. client for remote/headless
Low security/High administrative use.
interactivity (Shared High security/Low
Folders, Drag/Drop, interactivity (nothing "shared"
Cut/Paste). between Guests and Host).
No Automation/Scripting Full Automation/Scripting
Interface. Interface with COM.
Client-oriented features Server-oriented features (Virtual
(Sound Card in VM). SCSI emulation, per VM CPU
All Guests use one CPU on throttling, VS Security model for
the host. delegation. But no Sound Card).
As of Virtual PC 2004, x86 Guests use all CPUs on the host, but
only each Guest still sees and uses only
As of Virtual Server 2005 R2, x86
and x64 supported
Virtual PC clearly targets the average interactive user with rich functionality and
features. However, it trades off security for some functionality, cannot be
scripted/automated, does not run as a service so requires a user login, and
cannot utilize all CPUs on the host. On the other hand, these are all factors that
Virtual Server perform well, but it also gives up on the rich, interactive user
experience for a more headless, lightweight, remoteable, but limited interactive
Install – if possible – Virtual PC and Virtual Server on the machine
Virtual PC and Virtual Server share some components and from time
to time a component is updated in one product, but not in the other
and you can have performance benefits on the other system.
A current example of this is that the Virtual Server 2005 Service
Pack 1 beta contains a number of performance improvements - and
many of these performance improvements can also be had under
Virtual PC 2004 simply by install Virtual Server Service Pack 1 beta
on the same system. Virtual Server can be installed without IIS.
o Recommended you install VPC and then VS, since they share
some binaries and you want the latest from VS on the system.
o If you un-install one, you may have to re-install the other
since the common binaries would have been un-installed.
o When you create your guest machines, install the Virtual
Server version of Additions. They are compatible with Virtual
PC and are newer.
/3GB should not be used on the host as it increases the user
memory space at the expense of Kernel space. Virtual machines use
more kernel memory than user memory – so enabling this switch on
the host will decrease the amount of virtual machines that you can
There have been issues where virtual machines (some or all active
on a host) freeze up every 10 to 15 seconds for as long as 20 or 30
This has been identified as being caused by Intels SpeedStep
technology; you have two options:
o Disable SpeedStep in the hosts BIOS.
o Install the QFE 889677
When you run Microsoft Virtual PC 2004 on a portable computer
that uses the Intel Centrino 915 chipset, Virtual PC performance is
reduced when compared to its performance on portable computers
that use older Centrino chipsets – Install Hotfix 899525
Size Does Matter! = Smaller VHDs are faster
Use Differencing & Undo Disks = Keep them in separate physical
drives if possible!
Always make sure the latest Virtual Machine additions are installed.
Create the VHD as fixed size disks so the space is allocated as one
big chunk – more fragments will slow down the system
Make sure the VMs have sufficient RAM allocated to them to avoid
they need to start swapping too much memory as this is HD
Always have the VMs connected to a network – even if it is the
The smaller (or less fragmented) the VHD files the faster. Steps to
o In the VM run defrag (a couple of times). It might take a
while (up to hours) but it is worth waiting for
o Run the VM precompactor – this is an ISO image. Just attach
it to the VM . The precompactor will zero all the unneeded
space in the VHD
Load the „Virtual Disk Pre-Compactor.iso‟ from the
Virtual Machine Additions Directory
Answer „Yes‟ to start the zeroing
Shutdown the VPC when done
Use Virtual PC Disk Wizard to edit and compact the pre-
o Some 3rd party tools like WinImage
(http://www.winimage.com/winimage.htm) or PerfectDisk
usually give a better result
Instant-on, fast start – whatever you name it. Booting a Virtual
Machine often take a lot of time. Therefore an instant-on (or fast
start) procedure is created. It is based on the fact that Virtual
Machines can be “hibernated” – called “Save State”
1. Run the machine with Undo-disks enabled.
2. Find a good starting point for your demo – this is where you‟re
demo actually starts, so being logged-in, have some software
3. Save-State the machine (and commit changes to the VHD)
4. Optional: you might choose now to let the VM in the future to
5. Now copy the VMC and VSV files to a separate directory.
Now you are prepared for fast start.
For every upcoming demo:
1. Copy the VSV and VMC files from the separate directory to the
“main” directory where they came from
2. Start the Virtual Machine
3. At the end of the demo: “turn-off-and-discard-the-undo-disk”
This can be repeated over and over again – consider to create a
batch file for this.
Do not swap virtual images between virtual server and virtual pc -
Running a virtual machine created in Virtual PC (with Virtual PC
Additions installed) in a Virtual Server environment may lead to
unpredictable results, performance degradation, failure of services,
and possible failure of the guest
Guest windows background tasks should be disabled to reduce the
virtual disk i/o, these include:
o The indexing service
o Automatic search for network folders and printers in explorer
o Displaying the size information in folder tips
o Switch off system restore
If you have to copy files from the host to the Guest, use the shared
folders. Copy with drag and drop is 50 % slower, copy through
network is only 16 % of the performance.
Configure performance settings on the Microsoft Windows XP or
Microsoft Windows Server 2003 virtual machine
o Start Virtual PC 2004, and then start the Windows XP or
Windows Server 2003 virtual machine that you want to
o Click Start, click Run, type sysdm.cpl, and then click OK.
o On the Advanced tab, click Settings under Performance.
o On the Advanced tab, click Programs under Processor
scheduling, and then click OK.
Note Before you modify this setting, you must verify that the
host is not running critical services in the background.
o On the Hardware tab, click Device Manager.
o Expand Disk Drives, right-click the drive that you want, and
then click Properties.
o On the Policies tab, click to clear the Enable write-caching on
the disk check box, and then click OK.
o On the File menu, click Exit to close Device Manager.
o Click Start, click Run, type desk.cpl, and then click OK.
o On the Settings tab, click Advanced.
o On the Troubleshoot tab, move the Hardware acceleration
slider to Full, and then click OK two times.
o Click Start, click Run, type regedit.exe, and then click OK.
o Locate and then click the following registry subkey:
o My Computer\HKEY_CURRENT_USER\Control Panel\Desktop
o In the right pane, right-click MenuShowDelay, click Modify,
type 400 in the Value data box, and then click OK.
o Quit Registry Editor.
When using multiple VMs, start them one after the other – not all at
Consider the creation of a local “virtual PC” user. This account has
no software like messenger, communicator, office, … installed –
resulting in less memory being used.
Otherwise stop all unneeded software and tools – specially those on
the system tray
Pre-run a demo; some cached information will not be in cache
anymore as the moment it is cached and the moment of demo is to
spread (couple of days, weeks, …). When there is a need to pre-
cache certain info (like web sites)
o Cache the info as late as possible – pre-run the demo and
“save-state-and-keep-undo-disk”, or run cache the info on
site (again as late as possible)
o If step 1 was needed, just wake the machine to “continue”
If this is needed then don‟t select “always stop-and-discard-undo-
disk” in the VM settings.
Note on AD enabled multi-machine demos: As AD keeps a time
stamp on the Security IDs of the computers make sure that all first
save states are created at the same time.
There is a pre-cache tool available (by Joris_Kalz) for CRM demos.
Additional lecture: (worth reading as well)
Two Batch files to switch between Demo and Operational mode – will start and
stop some services