VirtualBox

Ticket #5595 (new enhancement)

Opened 10 years ago

Last modified 16 months ago

Request: built in VDI disk-size optimization routine

Reported by: DrD 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

comment:1 Changed 10 years ago by frank

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 Changed 10 years ago by klaus

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 Changed 10 years ago by klaus

  • Component changed from other to virtual disk

comment:4 Changed 10 years ago by DrD

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 follow-up: ↓ 6 Changed 16 months ago by a1anw2

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.

comment:6 in reply to: ↑ 5 Changed 16 months ago by socratis

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.

www.oracle.com
ContactPrivacy policyTerms of Use