I have a VM which had 8GB of VDI space. Due to low space I tried to resize the VDI size using the following command:

vboxmanage modifyhd VDI_FILE_PATH --resize 20000

It seems to work fine. As I open the VirtualBox program, the VM is now 20GB of VDI size. But when I run the Gparted live cd on the VM, it only recognizes the original 8GB.

Did I do something wrong? Is there something I can do to work around this issue?

Note: The VM is running Xubuntu and my host is Ubuntu

  • Wow, That's interesting. Perhaps it will automatically allocate more as needs, or maybe not. Creating a 9 GB file will answer the question. I don't think what you did was wrong, but: Can you show a good reference from which you got that particular command? – SDsolar May 6 '18 at 20:49

I found the reason of this problem when I updated my VirtualBox from version 5.1 to 5.2. This new version comes with a great tool that enables us to resize a VDI disk in an easy way (this tool is inside the option Global Tools).

After accessing it, I found out that my VDI disk have been resized to 23000 MB, as I wrote in the question, using the command vboxmanage modifyhd VDI_FILE_PATH --resize 20000, as I set it before, but (I don't know why), Virtualbox keeps a VDI with a name in Hexadecimal, as a subdisk of your VDI. This subdisk was only 8GB of total space (because of it, Gparted didn't recognize the resize I made).

At this time, I use the new interface of the updated VirtualBox and set it to 23 GB as the parent disk. Now, I ran the Gparted again in the VM, and now my disk is 23GB.

So if you guys, like me, are facing this issue (not able to properly resize the VDI), check if you VirtualBox is updated to 5.2 (or above) and increase the size of the VDI (and probably the subdisk too) in the Global Tools option

Note: If I go to Settings, the Virtualbox only shows one VDI (the parent), the subdisk is only shown in Global Tools option.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.