Page 1 of 1

VDI file is 32Gb, but guest OS is only 10Gb

Posted: 4. Oct 2010, 21:52
by mr93
Hi All,
I recently converted from from VMware, and converted my fixed VMDK to a fixed VDI.

After the conversion, my VDI was around 13Gb (acceptable, since my XP guest had about 10Gb used).

I haven't installed anything new - just browsed the web a few times (5-6 times) and shutdown and restarted the VM. Now the size of my VDI file on disk is 30Gb :shock: How come it jumped from 13Gb to 30Gb from doing nothing? I jumped to after 3-4th time powering on the machine.

I tried SDelete, and absolutely no change to the Host VDI file size.

any ideas?

Re: VDI file is 32Gb, but guest OS is only 10Gb

Posted: 4. Oct 2010, 22:50
by Sasquatch
If you converted the VMDK to a fixed size VDI, then the hard drive space was still being allocated. If you have a dynamic VDI, the space used by the VM OS will be allocated when needed and grow to the maximum size you specified upon creating the VDI (or VMDK).
Another possible cause for the growth is that you had some large files on the VDI and removed them again. This will not cause the VDI to shrink.

Using sdelete is only useful if you use VBoxManage modifyhd <VDI filename or UUID> compact.

Re: VDI file is 32Gb, but guest OS is only 10Gb

Posted: 5. Oct 2010, 02:15
by mr93
thanks for the response.

- The VMDK was "Growable" up 250Gb - with an actual file size of 50Gb (not sure why, again, nothing but a empty XP installation).
- Converted the VMDK to a pre-allocated 50Gb - resulting actual file size was around 13Gb, a reduction from the 50Gb VMDK
- Ran VM in VBox a few times, didin't install/move any files into it, and the .VDI is suddenly 30+Gb

- I ran SDelete -C c:\, and it reduced the VDI size to 28Gb.
- I then ran SDelete -z c:\ (to clean empty space), and the VDI enlarged to 52Gb

I'm going to attempt to run ModifyHD Compact tomorrow. I did this already, but before running sdelete so it didn't reduce the VDI in size at all.