I have
long been a fan of
Virtualization. Ever since the early days of
Virtual PC, I have been spinning off virtual machines to test and install software applications and code. It has even gotten to the point where I do very little on my host machine. I even do most of my web browsing within a
Virtual PC (you can't always be certain what sites will do to your host machine). The flexibility of being able to install, test and uninstall applications without affecting the host offers many benefits. There is also a bonus with the Undo Disk option within Virtual PC. With an Undo Disk you can start up a
Virtual PC and do
“your thing” and then have the option of committing or deleting the session changes upon shut down. Take the benefits of virtualization and the fact that
Microsoft Virtual PC 2007 is free and it is no wonder why
Virtualization is now mainstream.
One thing that I had noticed using
Virtual PCs is the disk size of the virtual hard disks. The virtual hard disks can be of fixed or variable size. If you opt for a variable sized hard disk, the disk will grow as you use it. The installation of application, copying of files and general processing use will cause the amount of space the virtual disk uses on the host machine to grow. As files are removed, applications are uninstalled and processing decreases I noticed that the virtual hard disk size doesn't decrease. In the help file there is a section that explains how to
"Compact a virtual hard disk". The steps are pretty straight forward as they explain how to use the
Virtual Disk Compaction option through the
Virtual Disk Wizard. I did this on a number of virtual hard disks and really wasn't impressed with the results. To be honest, I didn't notice any change in the size of the virtual hard disk after running this process.
After a little confusion I noticed one important note that is in the help file, "
Before compacting the disk, we recommend that you use a disk utility to zero out blank space, which should result in a smaller compacted virtual hard disk". After I thought about it, it did make a lot of sense. Now, where do I get one of these little utilities?
In the
Virtual Machine Additions folder (under the
Microsoft Virtual PC program folder) there is a Virtual Disk Precompactor.iso file (I found the
"Using Virtual Disk Precompactor" section of the help file afterwards). It didn’t take much for me to figure out that this utility probably should be used prior to compacting a Virtual Hard Disk. It was a simple enough test; after all I was only trying it within a virtual PC. If you capture this iso file from within the
Virtual PC and autoplay it, this utility will
"prepare the virtual hard disk for compacting". After you run this utility, close down the
Virutal PC and follow the steps for compacting a virtual hard disk found in the help file (you'll need to commit the changes if you are using an Undo disk). Take a look at the size of your vhd's before and after, the difference will be shocking. I know I reclaimed many many
gigabytes of space on my hard disk.
Another great feature that is worth looking into is a Differencing disk….
Labels: How-To, Information, Tech