From here.
First, resize the VDI disk file.
1 | # Using Linux as a Host: |
Second, expend the partition of your VM with the increased disk space.
In Ubuntu, this can be done by “Disk Utility”. In Windows 7, this can be done by “Contol Panel -> Administrative Tools -> Computer Management -> Disk Management”.
If you can’t expend the partition where the OS is, please use GParted live CD to do so.