id,summary,reporter,owner,description,type,status,component,version,resolution,keywords,cc,guest,host 11221,Unable to compact virtual disk image,Rafcio,,"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.",defect,closed,virtual disk,VirtualBox 4.2.4,obsolete,,,Windows,Windows