Resizing a VDI in VirtualBox 3 with one command
Here’s a quick way to expand a (VDI) Virtual Disk Image in VirtualBox 3.
- Create a new VDI with the new size of your choice. (File / Virtual Media Manager / New…)
Run this command:
$ VBoxManage clonehd --existing old.vdi new.vdi
This may take a few minutes.
Simply replace the attached old.vdi with the new.vdi in your virtual machine’s storage settings.
- You will need to extend your partition from your guest OS. This can be done under Windows 7 from the control panel (Create and format hard disk partitions) and with GParted in Ubuntu and compatible Linux distributions.