Windows 7 logo.

I am working on setting up my first VPC in Windows 7 and I found a couple of things had changed from Vista and wanted to share here.  I realize that for application virtualization, ITPros would most often be using Windows 2008 Server, however, developers would more commonly use Windows 7.  That’s why I decided to blog that use case here.

To use virtual hard disks as VPCs on machines with Windows 7 installed, you’ll first have to check /set the BIOS to make sure that virtualization is supported.  Here are some sample instructions for some common hardware vendors. 

After you’ve done that, then you’ll need to download the free add-in named ‘Windows Virtual PC’.  You must select the appropriate type based on your processor – either 32 or 64 bit. Note that this is DIFFERENT from Virtual PC 2007 (which you may have used with Vista).  If you have installed Virtual PC 2007, you’ll need to remove it before installing Windows Virtual PC.  Then you’ll need to re-boot.  After you install this application, the quickest way to find the executable is via the start menu, just type in ‘Windows Virtual PC’, then right click and click on ‘open file location’.  You may be surprised to see the 4 executable files associated with Windows Virtual PC are in the ..\Windows\system32 directory as shown below in the screenshot.  Remember that XP Virtualization is a new feature of some editions of Windows 7 (XP virtualization uses this set of virtualization technologies), so this is one of the reasons for the location change.

Windows Virtual PC executables

Probably the easiest way to get started is to click the VMWindow.exe executable.  This will open the Virtual Machines folder, note the ‘Create virtual machine’ command on the folder toolbar.  Click this to open the wizard which walks you through the configuration steps to create a VPC (or virtual machine).  VPCs can be created using new or existing VHDs.

Create Virtual Machine
After you click ‘Create virtual machine’ a dialog box will open as shown below.

create virtual machine dialog
After you name the virtual machine and set the location in the dialog, then you’ll next have to set the allocated memory (up to 2550 MB) and whether or not you’ll need to set up networking as shown in the dialog box below.

Create a VM II - memory allocation
In the next dialog of the wizard you’ll either create a new VHD file or associate the VPC with an existing VPC file.  You can also choose to enable undo disks and / or to use advanced options when creating your VPC.

create a VPD - set VHD file

If you use advanced options, your choices are to select the type of VHD.  Types include ‘dynamically expanding’, ‘fixed size’ or ‘differencing’.  The wizard warns you in a subsequent dialog box that if you’ve chosen ‘differencing’, then the parent (or original VHD) should be marked as ‘read-only’, since the all changes will be accumulated on the differencing VHD only.

create VHD - advanced options
After you’ve successfully completed the wizard steps, then your new VPC will appear in the ‘Virtual Machines’ folder for the currently logged on user as shown below.  The virtual machine will have a file name ending with a *.vmcx extension.  Your .vhd file (or files) will be associated with this .vmcx file.  Also there will be a *.vmc file associated.  The latter holds the configuration information for the virtual machine.
new VPC

To start your VPC, simply double-click the <VPCname>.vmcx file.  You will first see the dialog as shown below, then your VPC will start.

starting the VPC

If you’d like to view or to adjust the settings for your VPC, you can do so from within the VPC itself, by clicking on the Tools menu>Settings.  Or you can access the Settings from the Virtual Machines folder by clicking on the <VPCname>.vmcx file to select the particular virtual machine of interest and then by clicking on the Settings item on the folder toolbar.  The Settings dialog is quite similar to that of Virtual PC 2007 (shown below).

VPC settings dialog

You are presented with three options on shut down of your Virtual PC.  These are hibernate, shut down, or turn off.  This dialog is shown below.

VPC 'end' options

Also, from the Tools menu (inside an open VPC) you can optionally select to ‘install the Windows Virtual PC integration components’.  These components are similar to the VPC additions that were available for Virtual PC 2007 and allow integration of hardware components such as sound.

As an alternative to using Windows Virtual PC, Windows 7 also supports booting from a VHD.  That process is covered in detail in this TechNet article.

As usual, I’d be interested to hear about your experience(s) working with ‘Windows Virtual PC’ – let me know how it goes for you!