Today I need to increase the disk size of my Ubuntu 22.04 running in virtual box 6.1 from 20GB to 40Gb. The host machine is windows 10.
There are two steps to go through:
- in the GUI of the VirtualBox, after powering off the virtual machine, go to File->virtual media manager, and add size to the corresponding VDI for your guest OS. This step is just to add space for the ubuntu system to reallocate and will not actually add to the file system partition of the guest OS.
- suppose in the first step you add 20GB extra space, inside the ubuntu, you may search disk and open the management window and see there is an unallocated partition of size 20GB. You can resize the file system partition by clicking the configuration icon.
The problem is, although ubuntu lets me resize it by popping up a window and letting me type in my password, it will not take effect, which means I cannot resize the disk successfully, the free space of 20GB is still there. How to resolve this issue then?