Increasing hard disk space (vdi) size of a VirtualBox guest VM



I had to create a VM for searching some 6TB (that is 3 years of mails for 800 users) of mails from a NAS storage. I installed VirtualBox on a desktop with Linux Mint 19 with 16GB RAM and 1TB HDD. Then created a VM for Windows 7 with default configuration. The size was only 32GB which was much less than what was needed. I couldn't spare much time as the search request was very urgent. After a 3 week search ordeal the Windows 7 guest OS crashed which made me search for VDI resizing in DuckDuckGo. I got the below command from ASKUBUNTU.

VBoxManage modifyhd YOUR_HARD_DISK.vdi --resize SIZE_IN_MB

I wanted 100Gb so I converted it in DuckDuckGo with command 100 GB to MB and it gave 100000. So the command I derived is as below.

VBoxManage modifyhd /home/rhs/VirtualBox\ VMs/Windows7/Windows7.vdi --resize 100000

It gave the result/output as below if the command is correct.

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

When I started the VM Guest Windows 7 OS I found the HDD space was only 32GB still.

So something struck me like I saw in the disk resize option in Windows 7. So I headed to the Control Panel > Administrative Tools > Computer Management > Disk Management option and saw that 60GB odd was left as unpartitioned space. So I right clicked on C Drive and saw extend option. The extend option gave me the full available space. Click Next two times and viola the total 100000MB was converted to 99GB.

By the way I restarted the VirtualBox before the Guest OS resize.

Problem solved




Comments