Biomathematicus

Science, Technology, Engineering, Art, Mathematics

The problem:   Resizing a hard drive in a windows virtual machine is a common problem with a solutions in multiple places over the Web. e.g. http://www.howtogeek.com/124622/how-to-enlarge-a-virtual-machines-disk-in-virtualbox-or-vmware/  In summary: Run the following command:

C:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd "D:\VM\BRG\BRG.vdi" --resize 1638400

where 1638400 in this example represents a desired size of 1.5 TB for the partition. Note that you DO NOT need 1.5 TB available; this is simply the space reservation, and the VirtualBox drive will grow dynamically.

The space has been reserved, but it is not available yet to Windows. The hard drive partition has to be reallocated. You will need to download a GParted ISO image and load it as an IDE optical drive in your VirtualBox. See the post above for details.

However, GParted did not load. The Debian distribution just hangs up booting.

The solution: Download GParted version 0.21 or earlier. Then, when using it, you might notice 3 partitions: sda1, sda2, and unallocated.   In this case you will not be able to modify sda1. Modify sda2, and re-size at leisure. You do not need to use all the unallocated space, since you are working with a virtual machine that will grow dynamically; I chose 250 GB simply to ensure that the VM does not grow beyond the space available in the current hard drive from where it is running. I could repeat this process in the future if I needed to expand the virtual hard drive.