Ticket #11221 (closed defect: obsolete)

Opened 6 years ago

Last modified 3 years ago

Unable to compact virtual disk image

Reported by: Rafcio Owned by:
Component: virtual disk Version: VirtualBox 4.2.4
Keywords: Cc:
Guest type: Windows Host type: Windows


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.

Attachments Download (12.9 KB) - added by Rafcio 6 years ago.
Log file

Change History

Changed 6 years ago by Rafcio

Log file

comment:1 Changed 3 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to obsolete

Please reopen if still relevant with a recent VirtualBox release.

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use