Increasing is nearly trivial:
VBoxManage modifyhd virtualBoxUbuntu.vdi --resize 15000
for a 15G drive. Then inside the running VM use gparted to increast the main partition size to use all the newly added space.
To decrease, one can only reduce the amount of variable space used by the image by freeing up all unused space, apparently one cannot reduce the upper limit.
To free up space, delete unwanted files on the VM, install the zerofree package, then reboot into recovery mode and mount the root (main) partition ro:
mount -n -o remount,ro -t ext3 /dev/sda1 /
Then zero out the unused space in the partition:
zerofree -v /dev/sda1
And compact the image:
VBoxManage modifyhd virtualBoxUbuntu.vdi --compact
You should find the file system that the vdi is located in now has a lot more free space.