$ vboxmanage clonehd </path/to/disk.vmdk> <path/to/clone.vdi> --format vdi && \
> vboxmanage modifyhd /path/to/clone.vdi --resize XXXXXX && \
> vboxmanage clonehd /path/to/clone.vdi /path/to/disk.vmdk --format vmdk
- XXXXX is the desired size in MB
- Be sure to replace / by \ in paths on Windows
Make sure the disk is attached to the box and boot it, then extend the partition :
- In linux use parted or Gparted
- In Windows use Disk Management under My Computer