
Method 1
Shutdown the Virtual Machine before proceed to this activity.
Locate the VDI file which you wanted to increase. You can track the location by looking at the Storage > Information area (from the Virtual Machine > Settings).

Launch the Windows command prompt and navigate to the below directory (VirtualBox installation path),
cd C:\Program Files\Oracle\VirtualBox
In this example, the current VDI space is 25GB and we want to increase to 30GB – additional 5GB (The size will be in MB, 1024 x 30 = 30720). Execute the following command,
VBoxManage.exe modifyhd "C:\ITsiti\VM\Windows 7.vdi" --resize 30720
The output from the command,
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
You can now start up the Virtual Machine. Once connected, open the Disk Management (diskmgmt.msc). If you notice, the new space is still not added and you will see the additional 5GB (Unallocated). So, to merge the additional 5GB, right on C: drive and select Extend Volume.

The Extend Volume Wizard will prompt out. Click Next.

Click Next.

The disk increment is now complete.

New disk added from My Computer.

For UNIX and Linux operating system, you can use GParted.
Method 2
This step is also applicable for Fixed storage type.
Clone the existing VDI disk with the below command,
VBoxManage.exe clonehd "C:\VM\oldVM.vdi" "C:\VM\newVM.vdi" 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100% Clone hard disk created in format 'VDI'. UUID: a2be8981-12bf-43ed-a71b-7d688
Next, resize the new VDI.
VBoxManage.exe modifyhd "C:\VM\newVM.vdi" --resize 32000 0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Open the VirtualBox Manager, highlight the Virtual Machine and go to Settings > Storage. Locate and choose the newly created VDI file. You can now start the virtual machine.



You, sire, are a genius!