Resizing a Fixed disk
Resizing can only be done on dynamically allocated disks. So one must first convert the disk to dynamic then resize.
In reality there is no way to change between Fixed-size and dynamic disks. However one may clone the existing Virtual Machine form one format to the other. This works with VHD (Virtual Hard Disk) format
The tool one needs for the said conversion and resizing is VBoxManage.exe and this can be found in:
C:\Program Files\Oracle\VirtualBox
Dynamic to fixed Cloning
VBoxManage clonehd [Current_VHD] [New-VHD] –variant Fixed
Fixed to Dynamic Cloning
VBoxManage clonehd [Current_VHD] [New-VHD] –variant Standard
Resizing
VBoxManage modifyhd [New-VHD] –resize [megabytes]
Note that resizing only works with increasing the size
Open a Command Prompt near the VHD (using Shift + Right Click)
C:\Program Files\Oracle\VirtualBox\VBoxManage clonehd Win7.vhd Win7D.vhd –variant Standard
And wait for it to finish.
“C:\Program Files\Oracle\VirtualBox\VboxManage” modifyhd Win7D.vhd –resize 40000
Importing the new Virtual Machine
Locate the new VM and Create and Power it up
The VM will still show the old size
That’s everything that is required