Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a Windows XP VirtualPC machine with a virtual hard disk. It's a dynamic disk, which means it expands as needed.

Right now it's about 13.8GB, mostly because I've done a bunch of stuff to it.

There's really only about 9GB of stuff on there, less when I clean it up a bit more.

I tried to defragment the disk using the built-in defragmenter for XP and it shows an enormous gap in the layout of the disk - probably all that stuff I removed.

However, after defragmenting the giant gap is still there, although obviously some defragmenting did occur.

My thinking is - if I could get this disk to really defragment completely then I could compact the image and get that filesize back. And since the end goal is to distribute this to some coworkers, that would be a big plus.

So - are there any free defragmenting tools which do a thorough job?

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

I'm partial to jkdefrag to do my defragging work. I've never used it in a VM for exactly what you want to do, but it might be worth a shot.

share|improve this answer
add comment

Jeff blogged about making Smaller Virtual Machines and suggested using Whitney Defrag. In the comments John Mitchell suggested using SDelete, (to write zeros in the empty space to aid compression), as a free alternative to what Jeff recommends in his step 5.

share|improve this answer
add comment

The best windows defrag tool I have used is Diskeeper. It isn't cheap but it does the job well.


They have versions specifically for virtual environments but I have only used the stand alone versions.

share|improve this answer
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.