on Linux i resize my ( Win-VM ) partition on this way.
1) resize the vdi in commandline \ bash
VBoxManage modifyhd path/yourVMImage.vdi --resize 30000
( --resize, command to change the capacity in Megabyte )
( works only for VDI and VHD formats )
2) after this you have to extend your partition with an partition manager like gparted-live download it here
2.1) you have to start your virtual-machine with these live tool, then you can expand your partition using gparted-live.
2.1.1) for booting from gparted-live, you have to add another virtual hard disk,
follow the steps described here
To add another virtual hard disk, or a CD/DVD or floppy drive, select
the storage controller to which it should be added (IDE, SATA, SCSI,
SAS, floppy controller) and then click on the "add disk" button below
the tree. You can then either select "Add CD/DVD device" or "Add Hard
Disk". (If you clicked on a floppy controller, you can add a floppy
drive instead.) Alternatively, right-click on the storage controller
and select a menu item there.
On the right part of the window, you can then set the following:
...You can select which image file to use.