virtualboxvdivirtual-disk

Increasing size of virual box virtual disk


I am running Virtual Box 6.1, both host and clients are Ubuntu 20.04. I have run short of disk space and I want to increase the Virtual disk size.
Having spent a long time looking at different articles and trying different things the one that took me to where I am now is https://www.howtogeek.com/124622/how-to-enlarge-a-virtual-machines-disk-in-virtualbox-or-vmware/

ie Modified the vdi size using the Virtual Media Manager UI
Called VBoxManage modifymedium disk “<path to my vdi>” --resize 36000 # ( I am using virtual box 6.1 so I assume this is the correct call). Rebooted with the GParted Iso added as an optical drive.
However I am unable to increase the partition despite the partition apparently butting up against the newly created unallocated space.
The maximum size for the partition has remained unchanged


Solution

  • The partition was sitting underneath an extended partition (see sda2) which needs to be increased before the UI will let you increase the partition itself. Doh!