Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save d4rkm3z/69e60459adb75c6d2ad76f20fce5c468 to your computer and use it in GitHub Desktop.
Save d4rkm3z/69e60459adb75c6d2ad76f20fce5c468 to your computer and use it in GitHub Desktop.
VirtualBox clone fixed size vm to dynamic, resize dynamic vm, expand partition

http://brainwreckedtech.wordpress.com/2012/01/08/howto-convert-vdis-between-fixed-sized-and-dynamic-in-virtualbox/ http://www.webdesignblog.asia/software/linux-software/resize-virtualbox-disk-image-manipulate-vdi/#comment-474

While there is no way to actually switch a VDI between fixed-size and dynamic, you can clone the existing VDI into a new one with different settings with VBoxManage.

VBoxManage clonehd [old-VDI] [new-VDI] --variant Standard
VBoxManage clonehd [old-VDI] [new-VDI] --variant Fixed

If you want to expand the capacity of a VDI, you can do so with

VBoxManage modifyhd [VDI] --resize [megabytes] 

Ex. VBoxManage modifyhd Ubuntu12.vdi --resize 30000 (30GB)

http://kamaths.org/virtualbox-increase-hard-disk-size-of-linux-guest/

On a linux guest you need to resize the partion to take advantage of the resized disk.

Examples:

VBoxManage clonehd Ubuntu12.vdi Ubuntu12Dynamic.vdi --variant Standard
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment