VBoxManage createhd --filename vm-disk3.vdi --size 160000 --register
The above creates a 160GB hard drive called "vm-disk3.vdi" for VirtualBox to use...
Instructions on how to expand a virtualbox hard drive
The way that I did it was as follows. please follow this exactly or BAD things happen.
- You have multiple options the following being the best. but all options require you to make another virtual disk image.
-
Once you have created the second image assign it as the primary slave in your virtual OS.
-
Disable your page file right click on my computer select Properties>Advanced>Performance>Settings>Advanced>Virtual Memory>change once there say no page file and reboot the system.
-
Defragment your hard drive using windows defragment Utility. Re-enable your page file reboot your system. now shut down the VM
- Download http://www.Clonezilla.org live cd.
- mount the live cds iso in your virtual machines CD media slot. change the boot order to CD-ROM first
- follow the directions in the clonezilla make sure to select -k1 to expand your existing partitions mbr proportionally to the new larger hdd image. this takes bout an hour depending on the size of your original image.
- make sure everything is booted out of the VM. change your partition selection to have the larger drive be your primary master and remove your smaller drive from the list. or leave it as you see fit as primary slave.
- Boot into the new system and let windows run chkdsk DO NOT SKIP THIS STEP or your system won't work!
- Install as many programs as you see fit and enjoy the larger space!
Clonezilla live uses "partclone" with better NTFS usage... using "disk_to_local_disk" http://www.clonezilla.org/clonezilla-live/doc/ Note that the traditional linux "dd" command is slow (e.g. several hours for 40GB)
Plan: 1. to move the current virtual disk (.vdi) of the E: partition to another usb external hard drive. 2. create a second larger virtual disk (at least 10GB larger than the current 120GB 3. use clonezilla (with ntfsclone) to copy over the old partition into the larger one 4. use gparted to resize the partition to larger size 5. reboot vm and hopefully it will not realize the difference (except for the larger disk space)