Virtual PC - Differencing Disks

Posted Tuesday, March 08, 2005 8:42 PM by CumpsD
During my internship I had to test against different kinds of products, and to be sure everything worked on a clean install of this product, I had to create multiple virtual PC’s. One method of doing this was to create one clean Windows 2003 installation inside Virtual PC and copy this image to a new folder for every different server I needed. This was the method I started with, but one disadvantage was that it required a lot of disk space, as the base image already required 1.8 GB.

A solution to this problem was to use a feature of Virtual PC, called Differencing Disks. This allows for the creating of a base read-only image, which is called the parent, which can be shared with unlimited other virtual machines, the children.



Every child stores their disk changes in a separate file, making it possible to have one clean Windows 2003 parent image, and having a child which only adds Windows SharePoint Services to a separate file. The combination of parent and child would then become a Windows 2003 machine running Windows SharePoint Services.

This way, having a lot of different children uses a lot less space than having to copy the complete base image each time.

Additionally this method also can be used on a network to provide complete base images to all network clients. Making it possible to create an archive of base images for each platform (Windows 98, 2000, XP, 2003, Linux, BSD, …) and placing them on a read-only network share, ready to be consumed by all users creating their own local child disks.

Comments

# re: Virtual PC - Differencing Disks

Tuesday, March 08, 2005 3:06 PM by Jason Nadal

I'd love to hear more on this topic! For example, how does it play with auto-updates by windows? Does this mean the base image is then "locked" from changes? Or would changes just break the child images? Also, can I use an existing image as a base, and just work from there?

# re: Virtual PC - Differencing Disks

Tuesday, March 08, 2005 3:14 PM by BertG

i have the same question here...
what if you update the parent images?

# re: Virtual PC - Differencing Disks

Tuesday, March 08, 2005 3:16 PM by Robert McLaws

It would probably be helpful to talk about how you set that up in VPC.

# re: Virtual PC - Differencing Disks

Tuesday, March 08, 2005 3:46 PM by David Cumps

Good questions, and I planned to just give a small overview about it :p (this is 2 pages already ;))

But here is the answer exclusive for blog readers:

Auto-updates: you're basicly screwed with this, which is a shame, you'll have to update each individual child, no more touching of the parent.

Changing the parent BREAKS all childs!

You can use an exisiting image as base, even better, you HAVE TO use an existing image as base :) (as you can see on my picture, i have a windows 2003 virtual pc (described in another blog post) with a clean install, which I used as a base for the differencing disk of the child.

But I have a solution! ;) You see that Software Update Services child? That's a differencing disk child which runs only SUS, and which I synced today with Windows Update, so now this one Virtual PC contains all patches needed.

Now if I want to patch another child I get the patches from the SUS Virtual PC instead of downloading it from Windows Update again (which is lightning fast because it's local :p)

Setting up a differencing disk, good remark, totally forgot, basicly because it's just following the wizard :p

You create a new Virtual machine, you go to the settings, to the hard disk, throw out the existing one it created (dynamically increasing one), and then push the wizard button Create a new disk.

Then in the wizard you get a radio button list allowing you to select "Differencing", and then it will ask for the parent, and where to store the new disk. And "Finish' and it's done, you have a differencing disk which you now can use in your virtual machine as hard disk.

# Virtual PC Base Image technique

Wednesday, March 09, 2005 6:10 AM by TrackBack

Virtual PC Base Image technique

# re: Virtual PC - Differencing Disks

Wednesday, March 09, 2005 8:30 AM by John Schroedl

Thanks for writing this up!

I do have a question: For the situation where you have a network share of base images, do the consumers' hardware all need to match the machine which originally created the base images?

# re: Virtual PC - Differencing Disks

Wednesday, March 09, 2005 8:45 AM by David Cumps

No, that is the Virtual part of virtual pc :)

You run it on any hardware you like (that can run Virtual PC) and vpc then runs the image on EMULATED hardware

That's the whole virtual idea, to emulate a computer inside a computer independant from the hardware used to run the Virtual PC application.

# re: Virtual PC - Differencing Disks

Wednesday, March 09, 2005 1:37 PM by Jan Tielens

Hi David, I'm using this technique some time, it works great (see my blog post: http://weblogs.asp.net/jan/archive/2004/12/27/332760.aspx). One note: "A final caveat: you can't compact a differenciated (is this an English word?) disk. A recommendation which I've read quite a few times in the newsgroups, related to this issue is to place the differenciated disk into a compressed folder on a NTFS partition."

# re: Virtual PC - Differencing Disks

Wednesday, March 09, 2005 4:10 PM by Pieter Gheysens

cool stuff!

# re: Virtual PC - Differencing Disks

Wednesday, March 09, 2005 4:36 PM by David Cumps

Jan, indeed, I just was told this evening as well. Somebody used NTFS compression and reduced a 2GB image to 300MB on disk :)

# re: Virtual PC - Differencing Disks

Sunday, March 13, 2005 9:46 AM by Rich Denis

So what about the names of the child servers. This method sounds very interesting because I used to just copy over the diskimage and rename it. With this I could just do the difference but would I have the problem of two of the computer names being the same on the network? In the past I would fire up the other and run sysinternals "newsid" on the machine renaming it in the process. Any thoughts here?

Rich

# re: Virtual PC - Differencing Disks

Sunday, March 13, 2005 11:24 AM by David Cumps

What I did after differencing was the following:

If you copy the vmc file, make sure the MAC address entry is empty! (it will generate a new mac address upon first start) otherwise your machines have the same MAC

If you just create a new vmc this isn't a problem.

The first thing I did on a new machine was in the config screen, system, rename the computer :)

Don't know if this will help, I guess you still can do newsid now, because it's a NEW machine, but it's HD starts from a base image, but you can change everything on it

# re: Virtual PC - Differencing Disks

Tuesday, March 15, 2005 2:32 PM by AW

Does this still play nice with 'undo disks'?

I.e. can you have 3 levels, like this:
1 read only base image
2 local diff to the base image
3 undo disk for this sessions changes

or is this just a different way virtual pc uses the possibility to have one disk that contains diffs against one other disk?

In fact, what version of virtual pc are you talking about, mine doesn't seem to have this option...

# re: Virtual PC - Differencing Disks

Tuesday, March 15, 2005 3:04 PM by David Cumps

Indeed, 3 levels. Undo disks still work for a differencing harddisk, very nice isn't it? :)

I'm using Microsoft Virtual PC 5.3.582.27 (from the about box), which probably is VPC 2004

# re: How to use virtual PC and still save lots of room: differencing disks

Saturday, March 19, 2005 7:44 AM by TrackBack

# re: Virtual PC - Differencing Disks

Thursday, March 24, 2005 12:20 PM by AW

Thanks David for the version info, that is my version too and looking a little further I just found the option.

# Virtual PC Differencing Disks Hierarchy

Saturday, October 21, 2006 2:36 PM by David Cumps

A long time ago, I talked about Differencing Disks in Virtual PC. Most people just have a base imagine

# Adventures installing Orcas Beta 2

Saturday, August 18, 2007 2:48 AM by Technical Thoughts

I have spent the last few days trying to install Visual Studio 2008 a.k.a. Orcas Beta 2. The download

# re: Virtual PC - Differencing Disks

Monday, October 22, 2007 8:39 AM by crm

I don't know if my question is really related on this, but...I need some help....I have to install WSS over VMWare and I don't know if hosting disks have to be "dedicated" exclusivetely to SharePoint or they could be shared with other applications?