Using Virtual PC for Development

Virtual machine technology is one of those great ideas that has been close to bearing
fruit in the Windows environment for some time now. The concept of a PC running inside
a PC has many obvious benefits for developers, including:

  • the ability to run multiple operating systems at once without dual booting (great
    for testing an application or for operating systems that don’t co-exist well)
  • the ease with which a fully configured environment can distributed as a file (most
    complex demos internally within Microsoft are now shared as a machine image, for instance)
  • testing or supporting different languages or versions of a product without them interfering
    with one another
  • installing early beta software or evaluating a product without affecting the integrity
    of a well-tuned environment
  • quickly rolling back changes to a known state or creating a “read-only” environment
    (perfect for hands on labs)
  • server consolidation, particularly for single-purpose servers that have low loads
  • creating a flexible and open development environment whilst keeping the primary OS
    compliant with a locked down IT policy.

Mainframe environments have offered virtualisation for a while now; it’s the primary
by which IBM offer Linux on a mainframe. Out on desktops and servers,
the technology has taken time to mature and offer the necessary performance, whilst
memory has only comparatively recently dropped in price to the point where machines
with 1GB or more are commonplace.

I’ve been using the latest builds of our newly acquired Virtual
software for some time now, and have got to the point where I’m comfortable
to make heavy reliance on it for demonstrations in front of an audience. It seems
that not many people realise that Virtual PC is already available for to MSDN subscribers
from the main MSDN
Subscriber Downloads
page. This is the original version 5.2 as acquired from Connectix and
is missing some neat features (such as XML-based configuration files) and performance
improvements that we’ve added to the new version, but it’s a good preview of the technology.
We’re on the final path to delivering the first Microsoft-branded release of this
technology now, and I believe we’ll be shipping a release to PDC attendees too.

There’s also a server edition in the pipeline, which will be called Microsoft
Virtual Server
. This is fully scriptable via a COM interface (hopefully there’ll
be a native .NET interface in the next release?) and should be invaluable for automating
software test matrices and consolidating old NT domain controllers together.

The key requirement for running all this stuff is plenty of memory: with 1GB installed
on my machine, I can run Windows XP Pro as the host and Windows Server 2003 on a guest
with several SQL Server instances active on each. Running the guest OS in full-screen
mode is painless and I’m usually able to forget that it’s not the primary OS running.

The only downside I’ve noticed is that it doesn’t presently support the new widescreen
screen ratios that are starting to appear on newer laptops such as this Dell
Latitude D800
, which will be an increasing nuisance as they gain market share.
Hopefully the next release will support this. One other issue is that each OS will
need to be maintained with the latest security patches, so the hassle of administering
this kind of environment is greater than a single OS. Software
Update Services
present one solution to this problem, but further work is I think
going to be necessary to make this really painless.

If you’ve not played with virtual machine software before, give Virtual PC a try.
The final release will be shipped as part of MSDN, from what I hear.

Comments (5)

  1. Anonymous says:

    I have started using this to run FreeBSD and Linux for testing Rotor builds. It works a treat but it would be nice if I could find a way of importing files off the host OS into the hosted OS’s image.

  2. Anonymous says:

    Andrew, that’s certainly possible. You can configure both host and guest OS to be on the same network, and then use something like FTP or SMB to copy files backward and forward – just as if they were two separate physical machines.

    For Windows, OS/2 and DOS guest operating systems, you can also use the Virtual PC additions, which enable you to create a shared folder or even drag and drop files between the two systems. (We don’t have anything similar for Unix- or Linux-based environments today, though.)

    Best wishes, Tim

  3. Anonymous says:


    What RAM split ratio do you find to be most effective for the scenario you outlined above (XP Pro Host and Server 2k3 Guest, 1GB RAM)

    What about running at 512MB total, would you still split it the same way?

  4. Anonymous says:

    Chris, I split it 50/50 between host and guest. (Actually, that’s not quite 50/50, because the guest has a total memory footprint of the 512MB memory + 32MB display memory + a few other bits of internal buffers etc. for VPC.) If I were more anal about it, I’d probably allocate about 450MB for the guest OS to even things out a little more.

    On a 512MB machine, things get trickier, depending on your usage profile. I’d be trying to shut down all unnecessary services before starting my VPC guest and only using one or the other at a time. Save states can be handy in this scenario – they act as a hibernate for the guest OS, allowing you to quickly free up some memory for a temporary activity on the host, and then jump right back in to the guest.

    The obvious caveat applies that the appropriate balance will vary hugely depending on how many apps you’ve got loaded in each scenario: in my case, the host OS (running XP) is mostly running Office and similar apps, where the guest OS is running as a SQL Server and VS.NET development workstation.

  5. Anonymous says:


    From your virtual PC topic I’m assuming that you are running VS.NET 2003 on your DELL Latitude D800. Have you run into any problems with windows forms and controls growing in size over time as one works on them.

    It would seem that as I open and close or build an application that uses windows forms they keep increasing in overall dimension every time they are open and closed. ?

    Any thoughts?

Skip to main content