Sun, Sep 12 2010 14:24
XP Mode and differencing disks, Creating Multiple Virtual Machines
You have multiple needs for Virtual Machines based on XP mode in Windows 7. You want to use the base XP Mode operating system as a reference and create other systems using differencing disks and new virtual machine setup files (.vmcx).
Differencing disks which reference the Windows XP Mode virtual hard disk and new virtual machine files will be used to create new environments which leverage the base configuration stored in the Windows XP Mode VHD file.
I want to be able to do a number of things with my XP mode virtual machines and most of all I want to be able to have multiple machines without taking up lots of Hard Drive space. Secondly, I want to be able to create virgin environments for testing.
Differencing disks allow you to reference a source disk and in this case I am using the XP mode disk found here
C:\Users\<USER>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vhd
(Where <USER> is your logged on user name. Use whoami if you are not sure).
- The Windows XP Mode.vhd file is a differencing disk which references the parent disk: C:\Program Files\Windows XP Mode\Windows XP Mode base.vhd
- Be sure to mark your XP Mode.vhd as read only. This step is required or else writes to the XP Mode VHD will corrupt the other differencing disks rendering them unusable. Read-only will cause your XP mode virtual machine to fail to start. Later after you have created a new differencing VHD file to reference the XP Mode.vhd you can set the XP Mode virtual machine hard drive 1 to the new differencing disk. You will be able to use XP Mode VPC again after that.
What is in my XP Mode base
The only thing I add to my XP mode base is Security Essentials. However another good option might be the Internet Explorer upgrades. It is a matter of personal preference bear in mind there is no problem creating another level of differencing disks.
Overview of three levels of differencing disks.
The image above describes how the differencing disk references the XP Mode VHD. The XP Mode VHD is a differencing disk itself and it references its parent disk the XP Mode Base VHD.
Step by Step Process to creating a new Virtual Machine which uses a differencing disk that references the XP Mode VHD.
Shutdown the XP Mode Virtual Machine.
- By default the XP Mode Virtual Machine hibernates. It needs to be in a shutdown state to be referenced as a differencing disk parent disk. From within the XP Mode environment:
- Go to Start > Windows Security
- Select Shutdown to shutdown the Virtual Machine
- From the host operating system navigate to the VHD file for XP Mode and set it as read only. (C:\Users\<USER>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vhd )
- Using windows explorer navigate to C:\Users\<USER>\AppData\Local\Microsoft\Windows Virtual PC\
- Right click on the Windows XP Mode.vhd file and select properties
- Click to enable Read-Only
Create a new virtual machine with a differencing disk.
- Go through the steps of creating a new virtual machine. When you get to the virtual hard disk section follow these screen shots.
- Select Create a virtual hard disk using advanced options
- Browse to the location of your XP Mode VHD file C:\Users\<USER>\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\Windows XP Mode.vhd
After you click create the virtual machine will complete.
To create other instances of the same base configuration you only need to choose the differencing disk portion while creating new virtual machines.
This article covers how to use differencing disks based on Windows XP mode to create multiple systems which have their own unique settings. As a consultant I find this useful for simulating other user experiences, simulating different client environments and isolating changes which may only be used temporarily.
This is an resource efficient method for saving disk space while giving you the flexibility to work according to your needs.
Now I am off to install my 32 bit Office 2010 so I can run the CRM 4.0 Outlook Client.
Suggestions for Windows 7 team
A great feature would be to give you Windows 7 Mode which would allow you to install a minimal Windows 7 environment as easily as XP mode installs an XP environment.
Filed under: VHD, Multiple Virtual Machines, XP Mode, Differencing Disks