Virtual PC Guy's Blog

-- Ben Armstrong, Virtualization Program Manager

Talking about core virtualization at Microsoft (Hyper-V, Virtual PC and Virtual Server).

Welcome to MSDN Blogs Sign in | Join | Help

Tips for compacting virtual hard disks

A couple of weeks ago Guoqiang Wu posted an article on compacting virtual hard disks (http://blogs.msdn.com/guowu/archive/2005/05/17/418457.aspx).  The main issue he addresses is that in order to efficiently compact a virtual hard disk - you need to defragment both the files and free space on the virtual hard disk before running the Virtual Disk Pre-compactor.  The problem here is that the built in Windows defragmentation tool does not defragment free space.

Guoqiang recommends this free defragmentation tool: http://www.whitneyfamily.org/Hacks/?item=Defrag which I have used in the past with much success.  However these days I prefer to use DisKeeper (http://www.diskeeper.com/defrag.asp) as I find that this is a much more user friendly solution and find that I always get smaller virtual hard disks as a result.

Cheers,
Ben

Published Thursday, July 07, 2005 10:00 PM by Virtual PC Guy

Comments

# re: Tips for compacting virtual hard disks

We had a problem with this a while back. Someone was trying to figure out how to compress the disk and accidentally ran a disk striping tool (overwrites free space on the disk to make it less vulnerable to undeletion or something) and thereafter the VPC disk compression tool would do nothing, and the hard disk file was gigantic. I don't suppose defragmenting the free space would be the solution in this case?
Friday, July 08, 2005 2:31 PM by Chris

# re: Tips for compacting virtual hard disks

If you use the precompactor first, you should be able to then defrag and compact the disk down.
Friday, July 08, 2005 3:13 PM by SJ

# re: Tips for compacting virtual hard disks

I get the best results using imaging software like Norton Ghost to copy the data to a fresh vhd-file. On QNX 6.3 I just used tar for the transfer after making the hd bootable.
Tuesday, July 12, 2005 12:40 PM by SvOlli

# re: Tips for compacting virtual hard disks

Hi
I also have some problems with free space with vhd images. Like SvOlli I think the best method is using imaging - its very good!! I have image vhd file 7GB of size! after imaging and restoring the system this file was only 1.2 GB in size.
BR
Mariusz
Wednesday, July 13, 2005 5:24 PM by mariusz

# re: Tips for compacting virtual hard disks

That is my experience too, Ghost'ing to another VHD is both faster and better.

And the "old" Ghost before version 9 is also to be prefered in this process, since it really copies file-for-file (and do not preserve the drive's sector layout). The new Ghost is not Ghost but uses the DriveImage technology Symantec got when they bought PowerQuest.

One feature I would like to have is an explorer add-on so you can right-click to create a new VHD, and with a single dialog interface instead to the wizard. Drag'n'drop of VHD files into the settings page would also be nice, so you don't need to browse.
Friday, July 29, 2005 9:42 AM by opresterud
New Comments to this post are disabled
 
Page view tracker