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

Discussions related to using VirtualBox on Mac OS X hosts.
Post Reply
mr93
Posts: 2
Joined: 4. Oct 2010, 21:47
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows XP

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

Post 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?
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

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

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
mr93
Posts: 2
Joined: 4. Oct 2010, 21:47
Primary OS: Mac OS X Leopard
VBox Version: OSE other
Guest OSses: Windows XP

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

Post 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.
Post Reply