I am running Oracle VM Virtual Box (Ver: 3.2.8). Inside my virtual box, I use to run a Ubuntu OS. Whenever I create a file or folder of containing large data(some times the size goes upto 1GB). During creation, the disk space increases automatically. If I check the file size(the vdi file size which is kept in a separate partition) from wondows XP - it shows the incremented size of the vdi file. But if I delete(permanently) any folder of size 1GB, it is not reflected in disk space. Means, from Windows, if I get the vdi file properties it does not show the increase in free space though I have deleted a 1GB folder permanently from Ubuntu OS. If a issue the command "df -h" in Ubuntu, it is showing the right thing. So, is issue related to Virtual Box? Can you please suggest how to fix this?
|
I've done the same thing and observed the same behavior. I believe that this behavior is by design. Dynamic expansion is promisedThe "Create new disk" wizard states, under the "Fixed-size storage" section:
One reason for the dynamically expanding partition is that creating, say, a 32 GB file on the host for the virtual machine takes a long time. Dynamic expansion is usefulTherefore, pretending that the file is actually 32 GB until it actually needs to be that large is useful; you don't want to wait a long time to create a new machine if you're only going to use the first 2 or 3 GB when you install the OS and start it up. Dynamic expansion does happenThis works as expected, as you and I have observed. Dynamic shrinking is not promisedAgain, the wizard states:
Nowhere in this paragraph does the software suggest that the disk will ever shrink. Dynamic shrinking is not usefulHaving a dynamically shrinking partition is less useful. It would not result in a significant space or time savings. When you create a dynamic partition, you're making a contract with the guest OS that the hard drive will expand to the stated maximum size if and when it needs it. Dynamically resizing the drive to be smaller and using the space savings would create a conflict later when the guest OS needs to create a large file, perhaps when building a swap space for hibernation. Dynamic shrinking does not happenAgain, you and I have both observed that this does not occur. ConclusionFor these reasons, I conclude that you are getting the correct file size, and it's almost certainly correct. You can create 1 GB files as often as you like, but their removal will not decrease the size of the virtual disk. | |||
|
feedback
|