VirtualBox

Opened 14 years ago

Last modified 6 years ago

#5595 new enhancement

Request: built in VDI disk-size optimization routine

Reported by: DGF Owned by:
Component: virtual disk Version: VirtualBox 3.0.12
Keywords: VDI compress Cc:
Guest type: Linux Host type: Mac OS X

Description

Currently there are few available routes for shrinking a VDI image file successfully. Zeroing unused space is an unsupported requirement which requires software outside of virtualbox. Additionally, third party utilities can be flakey, or may not exist for the platform at hand. A terrific addition would be an integrated solution to the problem of dynamically expanding storage. Perhaps an all encompassing routine a user can run to clean up wasted space in a VDI file (i.e. shrink them in place), incorporated directly into virtualbox, without the need to run third party software.

Change History (6)

comment:1 by Frank Mehnert, 14 years ago

This would be indeed convenient. However, this would require to develop such tools for many guest file systems which is quite a big effort.

comment:2 by Klaus Espenlaub, 14 years ago

I also think that this isn't feasible in the near future - there lots of filesystems already, and there's at least one new filesystem per year in Linux. Very few filesystems have documentation which allows writing code which safely detects free space without spending months (per filesystem) on understanding how the internals of the filesystem works.

comment:3 by Klaus Espenlaub, 14 years ago

Component: othervirtual disk

comment:4 by DGF, 14 years ago

If a compression routine is indeed overly difficult, then how about a simple utility that just copies actual files over to a newer VDI? It could be an automated process which could then delete the old VDI file and replace it with the new, slim VDI upon completion.

comment:5 by a1anw2, 6 years ago

It has been over 9 years since this was last updated. It is a shame that this is still an issue that exists.

I have a 4GB file on the host file system, but inside Linux is only reporting 600MB being used. The file management process seems to always want to grab new space instead of reusing what has already been allocated.

It would be wonderful not to have to go through the song'n'dance of the "hacks" that have been documented by blogs.

in reply to:  5 comment:6 by Socratis, 6 years ago

Replying to a1anw2:

It has been over 9 years since this was last updated. It is a shame that this is still an issue that exists.

As it has been mentioned, you'd have to have a routine for every possible filesystem out there. Not an easy thing to do, not a wise investment of time and resources. Especially when there are workarounds out there.

The file management process seems to always want to grab new space instead of reusing what has already been allocated.

That would be true for every filesystem/allocation scheme, that has some self-respect. The reason? Wear out equally all parts of the hard drive, don't keep on reusing the same sectors over and over again.

It would be wonderful not to have to go through the song'n'dance of the "hacks" that have been documented by blogs.

What's wrong with the User Manual? Why do you have to go to "blogs" left and right, with questionable quality of content, when the User Manual has the suggestions?

Ch. 8.23 VBoxManage modifymedium, at the "--compact" option.

Note: See TracTickets for help on using tickets.

© 2023 Oracle
ContactPrivacy policyTerms of Use