Ticket #11221 (new defect)
Opened 3 years ago
Unable to compact virtual disk image
|Reported by:||Rafcio||Owned by:|
I ran into a problem compacting virtual disk images. I tested this on several clients with the same result. Here is the scenario. First I use online defragmentation pass in PerfectDisk 12.5, then I follow it with offline (boot time) defragmentation to defragment metadata and other locked files (like pagefile.sys), then again an online defragmentation pass. That makes everything (or pretty much everything) moved to the beginning of virtual disk image. Then I use sdelete utility from SysInternals package to zero out the free space. I confirm with PerfectDisk that all the files are moved to the beginning of the drive, so the virtual drive should be compactable. Unfortunately, after that procedure the VDI file does not compact at all, or very little (like 1%). The virtual drive is less than 50% full, so it should be compactable close to that value. I believe that it is the offline defragmentation pass that prevents the image from being compacted. I'm not 100% sure about that, but when I was using the Windows XP built in defragmenter followed by sdelete pass I was able to compact virtual images quite a lot. For the record the the defrag method is smart placement and the free space seek method is short stroke. This should not matter much if the defrag is followed by sdelete pass, as it touches everything that is free space, actually growing the image to its maximum size. I noticed the same problem with XP guests on Linux host, so it is not a host issue. All the tested guests were running XP.