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
mechanism
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
PC
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.