Ticket #3718 (closed enhancement: duplicate)

Opened 11 years ago

Last modified 10 years ago

Change the way vdi files are created to allow for later expansion

Reported by: GlennCoombs Owned by:
Component: virtual disk Version: VirtualBox 2.2.0
Keywords: vdi expand increase Cc:
Guest type: other Host type: other


From reading the forums it seems like I am just one of many who wants to be able to increase the size of an existing virtual disk image.

After reading I think there is an easy solution to the underlying problem of not being able to resize a virtual disk image. As I understand it the vdi consists of a 512 byte header followed by the block image map, followed by the image blocks. Currently the block image map is sized according to how large the user has said they want the image to be.

If the user later says they want the image to be larger then all the image blocks would need to be moved up in the file in order to make room for the extra blocks that are now required in the block image map. This could result in having to copy many gigabytes of data around and would be very slow.

What would happen if the vdi files were always created with a minimum size of 4M for the block image map (i.e. enough blocks to access 1 terabyte of image data) ? If an extra field was added to the header to specify the current size of the simulated disk then expanding the size of an existing vdi would be as simple as updating the new header entry to reflect the new larger disk size. Obviously this would only work so long as the new size is less than 1 terabyte but that would almost certainly be good enough for the majority of users who currently hit this problem.

Or have I missed something obvious here ?

Change History

comment:1 Changed 11 years ago by mduft

+1 for resizeable vdi's, that would be great

comment:2 Changed 10 years ago by aeichner

  • Status changed from new to closed
  • Resolution set to duplicate

Duplicate of #28. You can get a similar behavior by creating a 1TB dynamic disk and create a partition with the desired maximum size. To increase the size just add a new partition of resize the current one. Closing

Note: See TracTickets for help on using tickets.
ContactPrivacy policyTerms of Use