VirtualBox – Expand VDI

My virtual Windows 7 with 12GB of disk space, did not have enough free space for iTunes and my music. The VirtualBox GUI does not support disk-expansion and I couldn’t find any clues in the FAQ. Luckily I found this article, which describes the problem and a solution.

Create a new disk with the required size: VBoxManage createhd --filename new_disk.vdi --size 102400 --remember

Clone the old disk into the new: VBoxManage clonehd old_disk.vdi new_disk.vdi --existing

Now we replace the disk with the VirtualBox GUI and boot a Linux rescue CDROM with gparted and extends the partition. Remember that ntfsprogs must be available.

I had to boot the Windows 7 CD and select repair before I could boot normally.

More information on the subject.