Tips for compacting virtual hard disks

Rate This
  • Comments 5

A couple of weeks ago Guoqiang Wu posted an article on compacting virtual hard disks (  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: which I have used in the past with much success.  However these days I prefer to use DisKeeper ( 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.


Leave a Comment
  • Please add 4 and 8 and type the answer here:
  • Post
  • 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?
  • If you use the precompactor first, you should be able to then defrag and compact the disk down.
  • 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.
  • 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.
  • 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.
Page 1 of 1 (5 items)

Tips for compacting virtual hard disks