Windows 7 XP Mode and Windows Virtual PC: How it works

This content is 16 years old. I don't routinely update old blog posts as they are only intended to represent a view at a particular point in time. Please be warned that the information here may be out of date.

For the last couple of weeks the news sites have been full of speculation and gossip about what is now referred to as Windows 7 XP Mode and Windows Virtual PC. Most of the reporting so far has focused on the high level concepts and, as the beta went live to millions of Windows 7 release candidate testers, this post attempts to give a little more detail about how Windows XP Mode works.

Before diving in to the technology, let’s have a look at why Microsoft felt the need to provide this functionality. Their vision is to drive the overall adoption of Windows 7 by eliminating legacy application compatibility issues in the enterprise, mid-market, and small-medium business sectors.

This is not a developer workstation solution; nor is it for consumers. It’s basically providing functionality to run legacy applications “seamlessly”, meaning that a typical end user will be unaware that their application is actually running virtualised. It draws heavily from MED-V in that IT administrators create a pre-configured virtual machine with a legacy operating system and applications to run isolated from the host operating system; however, unlike Microsoft Enterprise Desktop Virtualization (MED-V), which remains part of the Microsoft Desktop Optimisation Pack, Windows XP Mode will be more broadly available. In an interview with Mary Jo Foley, Microsoft’s Scott Woodgate gave the following description as to the differences between the two products:

Top-level answer:

  • Windows XP Mode is designed to support SMB customers who do not use management infrastructure and need to run Windows XP applications on their windows 7 desktops.
  • MED-V is designed for larger organizations who use management infrastructure and need to deploy a virtual Windows XP environment on Windows Vista or Windows 7 desktops.

He then continued with the following details:

Windows 7 XP Mode with Windows Virtual PC Microsoft Enterprise Desktop Virtualization (MED-V)
Designed to help small businesses users to run their Windows XP applications on their Windows 7 desktop. Designed for IT Professionals.
Available as part of Windows 7 Professional, Enterprise and Ultimate Editions. Enables Virtual PC deployment in larger organizations.
Enables users to launch many older applications seamlessly in a virtual Windows XP environment from the Windows 7 start menu. Provides important centralized management, policy-based provisioning and virtual image delivery to reduce the cost of Virtual PC deployment.
Includes support for USB devices and is based on a new core that includes multi-threading support. Is part of the Microsoft Desktop Optimization Pack (MDOP)
Is best experienced on new PCs from OEMs but will also be available for customers as a separate download. v1 builds on Microsoft Virtual PC 2007 to help enterprises with their upgrade to Windows Vista when applications are not yet compatible. v2 will add support for enterprises upgrading to Windows 7 (both 32 bit and 64bit) and will support Windows Virtual PC on Windows 7.
v2 beta will be available within 90 days of Windows 7 GA.

More information may be found in Microsoft’s Windows XP Mode press release.

To enable Windows XP Mode, Microsoft has produced a new version of Virtual PC – Windows Virtual PC (VPC) 7 – a client-side virtualisation product that runs on Windows 7 (32- or 64-bit versions). As Jason Perlow describes, it’s not using a type-1 (native/bare metal) hypervisor like Hyper-V (sadly, as if there were to be a client side virtualisation product based on Hyper-V it would be great for developer workstations) but instead uses a type-2 hypervisor (hosted) model. Unlike previous versions of Virtual PC though, the new version requires hardware assisted virtualisation capabilities (AMD-V or Intel VT), which are prevalent in many recently-purchased PCs (even if switched off in the BIOS).

Officially, VPC7 only supports Windows XP, Vista and 7 guests but, just like earlier versions of Virtual PC, there is the option of using emulated hardware so it’s still possible to run other operating systems – it’s just not supported. It’s also worth noting that not all Windows Vista and 7 SKUs are supported in a virtual environment. Something else that’s not supported is the ability to run 64-bit or multi-processor guest operating systems, nor is snapshotting. And, because the virtualisation components are incompatible, there’s still no support for moving virtual machines between Hyper-V and VPC7 either. I’ve already been fairly vocal in my feedback to the product team on this; their response is that the priority is on application compatibility (and, on that basis, I can see the reasons for concentrating on single-processor 32-bit Windows XP support) but continuing to maintain incompatibility between client and server virtualisation platforms seems a little strange to me.

VPC7 features include:

  • Desktop mode – enhancing the traditional Virtual PC functionality using Terminal Services technologies (e.g. for drive redirection and smartcard sharing as well as video improvements that enable large resolutions), and still maintaining the functionality for Virtual machine windows to support arbitrary resolutions. For those applications that experience issues working through the terminal services drive redirection etc., it is possible to disable integration features, after which the Virtual PC will operate as Virtual PC has done previously.
  • Seamless application mode – allowing virtual applications to use Terminal Services application remoting capabilities (RemoteApp) to appear as though they are running locally. Applications retain the chrome of the guest operating system rather than the Windows 7 host but, to all intents and purposes, they are integrated with the native desktop.
  • Tight Windows shell integration and a simplified user interface. In the same way that Windows has special folders for Pictures, Music, etc. a Virtual Machines folder is provided, with Windows Explorer integration for creation of virtual machines and editing virtual machine settings (no more Virtual PC Console). Where a supported operating system is used, applications in the virtual machine may be published to the host’s Start Menu and there’s also integration with the Windows 7 superbar. By default, all new applications installed in the virtual machine (whilst running in full desktop mode) are published to the Windows 7 Start Menu (each virtual machine has its own folder) but this can be disabled if required; however, publishing applications that are built into Windows XP (Internet Explorer, Outlook Express, etc.) requires some registry editing.
  • Full USB support is available for supported operating systems: for any USB device where both host and guest drivers are available then there is integrated USB support but for those devices where there are no Windows 7 drivers they are redirected to and controlled from the guest operating system. Microsoft is also advising that certain device types (e.g. mass storage, printers and smart cards) should not be directly connected to the virtual machines and are better redirected using the Terminal Services functionality built into Virtual PC.
  • A simplified virtual machine creation process with three steps: name and location (remembering the last used location); memory and networking options; disk settings (dynamically expanding by default, or optionally launching a wizard for other disk types such as fixed sized and differencing disks). Once built, new hard disks can be added in the virtual machine settings and control over undo disks is also moved to the virtual machine settings. Other new virtual machine settings relate to integration features, logon credentials and auto publishing.

From a technical standpoint, there are three main VPC7 processes to be aware of:

  • vpc.exe is the base process for Virtual PC functionality.
  • vmsal.exe is the seamless application launcher, which waits for a new application request and launches it. Once the application is closed it sets a timer before saving the VM state and exiting. This means that, when the application is closed, the virtual machine is kept up for a few minutes in case the user launches an application that requires it but after a short while it will be put into a saved state. In addition, because undo disk settings are managed within the virtual machine settings, logging off/shutting down/hibernation is handled as normal, with no virtual machine prompts about undo disks and saving state.
  • vmwindow.exe is launched when VPC is not running in integrated mode.

VPC7 will not run on the Windows 7 beta (build 7000) as it requires the RC (or one of the interim builds – I’ve seen it running on builds 7057 and 7068). I haven’t tried this personally but I’m told that it cannot be installed on Windows Server 2008 R2 either; however something similar is possible with Hyper-V by installing the Terminal Services Remote Applications Integrated Locally (RAIL) components (RemoteApp). Certain Windows 7 editions will include the Windows XP virtual machine, so there is no requirement to build a separate Windows XP image.

Architecturally, VPC looks like a hybrid between Virtual Server and Hyper-V: it uses the Virtual Server engine, including a scriptable COM interface for VM automation (and the security model has been modified so it can be called from PowerShell without needing to make security interoperability tweaks); it also uses the VSP/VSC/VPCBus model from Hyper-V; and it integrates RAIL components from Terminal Services but, because the Terminal Services technologies for integrated applications and enhanced desktop support run over the VPCBus, connectivity is available even if there is no network communication between the guest and the host. Because it’s built on the Virtual Server/Virtual PC codebase, VPC7 is limited to 4GB of RAM and 128GB VHDs.

Windows 7 XP Mode and Windows Virtual PC form a neat solution for application compatibility in Windows 7, drawing on established MED-V (from the Kidaro acquisition), Terminal Services (through partnership with Citrix) and Virtual PC/Virtual Server (formerly from Connectix) technologies. They are very much a point solution for application compatibility though and Microsoft still does not have a decent client-side virtualisation solution for high-end users (developer workstations, IT professionals with several desktop variants, etc.). Whether this is enough to allay concerns from Microsoft’s customers who baulked at a move to Vista as a result of the application compatibility issues is yet to be seen but with the general perception of Windows 7 riding high, this might be just the insurance policy that IT managers want to ensure that legacy applications continue to function. My main concerns with this solution are support (Windows XP is still end of life – and legacy applications may not be supported in a virtual environment), the overall complexity of the solution (however much it’s hidden from the end user, there are still two operating systems running on the hardware) and performance (virtualisation typically requires increased memory and CPU requirements – together with the need for hardware assisted virtualisation, this is certainly not a solution for legacy PCs). Whatever the situation, I’m sure there will be plenty more written on this topic over the coming months.

14 thoughts on “Windows 7 XP Mode and Windows Virtual PC: How it works

  1. What are the display sizes available under XP Mode?

    For example my system has 2 Nvidia 7300 GT cards supporting 3 monitors at 1280 x 1024 each. The first adapter provides 2560 x 1024 and the second is just 1280 x 1024.

    Virtual PC 2007 has a S3 Trio 32/64 adapter that provides up to 1600 x 1200. I’m running it at 935 high so it will fit onto a 1024 high display. However the 1600 wide is a far cry from 2560. Is there a way to get this larger than 1600?

    With Windows Virtual PC and XP Mode what is the display driver and what is the maximum size that you can configure it to?

    I need to get closer to the 2560 or even better would be to use all 3 monitors (3,840 x 1024) as I have large XLS’ that require 2 monitors to view.

  2. Thanks for the explanation.

    Still somehow it’s hard to understand (offcourse because i use indonesian languange), but after learning from this article, i found this article is very usefull.

    Thank you so much

  3. I wrote an article in german about this topic on my blog. The xp-mode is very usefull, a great feature in Windows 7. I use it especially for making XP-Iso’s with S-ATA drivers. This not possible under Win 7. Thanks for the good post.

  4. I have been using the virtual xp mode for about two months with no problem, know when i try to use it a vm windows.exe box appears that says the RPC server is unavailable. do you know whats going on?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.