To resize .vdi use command:
VBoxManage modifyhd {21691477-9419-40d9-b96c-e808157e66b7} –resize 61440
where
VBoxManage modifyhd UUID-machine –resize SizeInMB
i create new size of image that have 60 GB to make 20GB you should give number 20480. So if you want 5GB you can count this via multyply 5 * 1024 = 5120
Next after login to your machine you should change the wolumin size.