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

Here's a great way to save some space on your hard drive with those big 'n nasty Virtual PC images:
Differencing disks.
 
The idea is simple: Start out with a hard drive image you're comfortable with, then create "differential" images based on that image, where the only space they take is the "difference" between the two. That ends up saving a lot of room.
 
So, for me this means I have a "base_XP" drive which I've created in the usual manner using VPC. I'll use this to create my own new "versions" of this drive where I install various builds of VS 2005 and so on.
The next step for me is to open the VPC console and click "file-Virtual Disk Wizard". In the wizard make sure you choose "differencing" disk when asked. You then have to point to the "base" drive (base_xp in my case) which you will be differencing upon. It's important that you make that base drive as good as you need because you don't want to touch it later when other drives are depending on it.
 
Now that you have finished making the drive, you just need to go to "file-new virtual machine wizard" and point to an existing virtual disk  - your new differencing drive.
 
voila. You've just saved at least a couple of Gigs for each machine you're going to install off of that base disk.
 
have fun.
 
 
 
Published Saturday, March 19, 2005 7:20 PM by RoyOsherove
Filed under:

Comments

Saturday, March 19, 2005 12:28 PM by Phil Scott

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

One thing I'd recommend doing is running sysprep on the base image to make sure the SIDs are unique for your virtual pcs.
Saturday, March 19, 2005 12:30 PM by Roy Osherove

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

Thanks for the tip Phil.
Saturday, March 19, 2005 12:50 PM by John Barone

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

TIP: Once you are happy with the base disk, you can make it read-only so that you don't change it by mistake.

THE BAD:
The one thing I've discovered using them that irritates me is that the various security updates are so fast and furious that the original base disk becomes alomst useless over time. So sometimes, if I just want to set up a quickie virutual box and don't need Internet access, I'll just set it up from a diff. disk, but set the network adaptor as "Not Connected." That way, I can get something quick set up w/o having to worry too much about security.
Saturday, March 19, 2005 1:44 PM by David Cumps

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

More stuff about differncing disks:
http://weblogs.asp.net/cumpsd/archive/2005/03/08/389738.aspx

They're great ;)
Monday, March 21, 2005 8:29 AM by Roy Sharon

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

I've been using both standard virtual disks and differencing ones for quite some time now, and found that differencing disks tend to end up using more disk space. There seems to be a fundemental difference between the two types of disks:

When you write a specific block to a standard virtual disk for the first time, it is being allocated (just-in-time), and then reused each time new data is written to it.

The diff disk is basically a log of all write operations. So if a block is being re-written, it consumes more space with each write.

So diff disks are great for undo disks, where you want to change stuff and then commit or rollback, causing the diff log to be cleared. But they are not so great for continuous operation.

For example, I was using both a diff disk and a standard virtual one for about 5 months, using both for Windows 2003 + SQL + doing some development on Visual Studio. They both spawned from the same root 5GB virtual disk. The diff disk reached 13.6GB when I quit using it. The standard disk used only 6.3GB.
Monday, March 28, 2005 2:55 PM by TrackBack

# VirtualPC bits...