There are two ways to clone the disk, the first uses the terminal program cfdisk, which comes with most live CD distros; the later uses Clonezilla live CD. The latter is easier and faster because it does not clone empty space.
The instructions for the cfdisk method are here; I will write about how to do it with Clonezilla.
- Create a bigger dynamic virtual disk from VirtualBox Disk Manager
- Download Clonezilla
- Set up your virtual machine (VM) to mount Clonezilla ISO disk image and boot from it.
- Add the new bigger virtual disk image as the VM's primary slave hard disk
- Boot Clonezilla and choose the disk-to-disk cloning mode
- Deselect the option "Resintall Grub bootloader" if you want to preserve Linux Mint styled bootloader.
- When the cloning is done, shutdown the VM.
- Set up the VM to boot from a Linux Mint ISO image (if you have it) or from Linux Mint live CD, Gparted live CD, or any ISO image or live CD which includes Gparted.
- Unselect the use of the VM's primary slave hard disk and set the bigger virtual disk (which now contains the clone) as the primary master disk.
- Boot the live CD you chose and start Gparted (it's called Partition tool in Linux Mint).
- If Gparted shows a swap partition it must be moved all the way to the right (together with the extended partition it is on) before you are able to resize the root partition. First you have to enlarge the extended partition, then the swap, preserving their sizes. But before you can do that you must click the swap partition and click the option "swapoff". Gparted will close, that's OK, just run it again.
- When you have your partitions as you like, apply the changes and shut down the VM.
- Set up the VM to mount from the primary master disk and eventually remove your old primary master disk from the Virtual Disk Manager.