Hi
i looked this one up, here are two quotes from a virtaul boax link
please see
https://forums.virtualbox.org/viewtopic.php?t=10348
but here are quotes of the two posts that may help you
Re: increase size of virtual disk
by SemiTech ?? 20. Sep 2011, 06:43
I finally succeeded in increasing the size of my Windows 7 virtual hard drive. It was a multi-step process.
First, I used the Mac's Time Machine backup system to restore the files in my VirtualBox folder to a time and state before I attempted to increase my virtual hard drive size. This was also a time before I deleted one of two snapshots. The goal was to be able to delete all snapshots or merge them into the current state. I believe you can't extend the size of your virtual disk with snapshots around.
Using Time Machine (or back up of your choice) I restored all snapshots, vdi, and xml files to the earlier time.
After these files were restored, I used the VBoxMange GUI to delete the newest of the snapshots (do not do this in the Mac Finder!). Then, from the VBox Manage GUI, I restored the Windows VM to the first, oldest, snapshot. Thus, the new "current state" became that of the first snapshot, which is what I wanted. Thus, no more "snapshots" - only a current state.
With only the "current state" showing in the VirtualBox Manager, I now used the command line tool, VBoxManage, with the modifyhd command. Consult the VirtualBox PDF help manual, Chapter 8, on usage.
VBoxManage modifyhd --resize 40960.
VBoxManage reported success, but the disk size didn't change in Windows (as reported in the Computer window).
This is where I had to use the built-in Windows utility called DISKPART. In the Windows search box type "run" to get a command line window, then type DISKPART. Use the DISKPART utility to extend (expand) the volume or partition with focus, and its file system, into the free (unallocated) space on a disk.
Type DISKPART "help extend" for a manual-like help file on using the DISKPART tool. At the end of the help you will see an example code for extending (expanding) your disk space.
Example:
EXTEND SIZE=40960 DISK=0
EXTEND FILESYSTEM
You must have previously selected (DISKPART>select volume or disk) a volume or partition for this to work. Use DISKPART>list disk and DISKPART>list disk to see your disks and volumes before taking any action. (I believe that I selected the volume before using the EXTEND commands.)
OR
you can do this
by vkov_tinsky ?? 9. Oct 2008, 14:57
Hi,
You could try something like this (see also Tutorial - All about VDIs: How can I resize the partitions inside my VDI?):
1.Create a new VDI of the desired size.
2.Boot GParted Live in a VM with both old and new VDIs attached.
3.Check in the partition editor (opened automatically after booting) what your old and new disk locations are. (It'll be something like /dev/hda and /dev/hdb.)
4.Copy contents from old to new disk. This will take a fair amount of time. (Here /dev/hdX is your original disk and /dev/hdY the new one).
Code: Select all Expand viewCollapse view
dd if=/dev/hdX of=/dev/hdY???Warning: Make sure you do not mix up your input and output disks or you'll wipe all information from your original disk! (if= specifies the input and of= specifies the output.)
5.Reboot (again with GParted-Live). Now you should be able to increase the Windows partition size on the new disk.
Once you've verified the larger VDI boots Windows fine (and disk size is as you'd expect) you can of course delete the old smaller VDI.
Edit: Instead of rebooting before you resize the partition you should be able to run partprobe and the hit CTRL+R in GParted instead.