Friday, April 22, 2011

Virtual PC and XPMode

Many of you may work in a corporate environment with Volume Licensed Mircosoft products. Moving to Windows 7 from Windows XP (nearly every company skipped Vista) can be difficult. The biggest headache is compatibility. The solution is often to include a Windows XP virtual machine with every new Windows 7 machine.

Install Virtual PC first, either x86 or x64 for your OS type...

Then install Windows XP Mode...

Update for Windows XP SP3 to enable RemoteApp (install on your VM)...

The first one is installed into Windows 7 to allow you to run a virtual machine. WindowsXPMode allows you to create a Windows XP virtual hard drive with Windows XP on it, and then to run applications inside the XP VM without manually launching VirtualPC.
This is a big download because the Windows XP CD is included within the installer. Every Vista and Windows 7 install comes with a Windows XP license at no extra charge. Microsoft did this to allow you to work around compatibility issues. When all else fails, run in from a virtual machine.

Copying your Volume Licensed XP Virtual Machine
In a corporate environment, with Volume Licensed products, there's a problem. The WndowsXPMode VHD that gets created automatically is an OEM license, not a VL license. So in a corporate environment, don't bother going through the XPMode wizard to create the image. You'll have a production-line of new computers anyway.
So one problem is your license, but another is that each VM has to be set up the way real, physical machines are set up, if they are going to be 100% functional. Our domain has quite a few web-based systems everyone needs access to. Some don't yet work with IE8, much less IE9. Some don't work on Windows 7. Many server-based applications automatically grab the logged-on user's credentials. This means an OEM license is not legal, and your VM will have to be joined to the domain like a real machine. So you need to build a VHD/VM using your Volume Licensed copy of Windows XP. Every Windows 7 machine will have to have Virtual PC and WindowsXPMode installed, and you'll have to copy your XP VM to every new Windows 7 machine.

I've decided, since multiple users sometimes use one machine, that I would store the VHD here: D:\VirtualMachines\WinXPMode\WinXPMode.vhd

Microsoft designed Virtual PC in a clunky per-user manner, storing the VHD within profiles. To me, this is crazy. On a multi-user computer, this means every user gets their own separate VHD that is several gigabytes in size! This might even be a license violation, since each Vista or Win7 machine is only allowed one XP license. But that depends on the fine-print (since only one person at a time can actually use a computer, only one VM will be running).
I move it to the D: partition where everyone can get to it.
Unfortunately, every user who logs on has to run the VPCWizard located here...
And Microsoft didn't bother to create a menu shortcut for you (did they really think this through?)

Setting up your XP VM
I unplug the network wire on my Win7 host machine and launch the VM. I run Sysinternals' NewSID (sorry folks, this is no longer included within Sysinternals' package because it ruins Windows 7 and Vista. Maybe you can still find it somewhere else? Or use something else.
I rename the VM the same as the computername, but with an extra "VM" tacked onto the end. That way, when looking at computers on a domain, and you see \\Q123456 and \\Q123456VM, you know the the latter is a VM being hosted by the former.

After the VM reboots with a new SID and name, I join it to the domain.
Every new user added to the VM has to run VPCWizard to create individual *.vmc and *.vmcx files. These will be stored in the individual user Profiles pointing at the common VHD on the D: drive.

No comments:

Post a Comment