I am running Ubuntu 24.04 on a Virtual Machine via Virtualbox. If you see the first screenshot I have increased the size of the VM BUT does not recognise the extra space. The second screenshot shows GParted. The partition seems to include the extra space.
The GParted in your screenshot appears to be running from the system stored on the disk. This is not safe for modifying the partitions.
If you boot the VM into the Ubuntu live CD environment, and run GParted in the live CD environment (and making sure none of the virtual hard diskâs partitions are mounted, i.e. no key icon in GParted), does GParted then give you the option to expand your virtual hard diskâs partition table to fill the entire virtual diskâs capacity?
Do I need to run GParted on the host system? When I try to resize it states that the partition IS mounted. Is there a way to unmount it? How to I run Ubuntu in Live CD environment?
Looking at your screenshot of VirtualBox, your VM shows an Optical Drive under âStorageâ. Click where it says â[Optical Drive] Emptyâ and choose the Ubuntu ISO that you used to install Ubuntu in the VM.
You may need to go into VM settings and move âOpticalâ above âHard Diskâ in the boot order. (Note that having âOpticalâ above âHard Diskâ in the boot order does not have any effect when there are no disks in any of the VMâs optical drives, so itâs safe to leave this change in place. I always ran all of my VMs like that when I was using VirtualBox.)
Next, boot the VM, and it should boot from the ISO instead of the VMâs disk. It should offer you options including to âTry or install Ubuntuâ (selected by default): pick that one. Then you should get options to âTry Ubuntuâ or âInstall Ubuntuâ: select âTry Ubuntuâ and it should take you to the Ubuntu live CD environment.
It shouldnât, since youâre not going to specifically request that. Regardless, it would still be wise to shut down your VM and back it up (or snapshot it) before proceeding.
How did you try to change the boot order settings? The image you posted shows Hard Disk highlighted so you would need to click the down arrow to the right to move Hard Disk down or highlight Optical and click the up arrow.
Here I have booted into the live CD environment. GParted still has the same reading. It does not recognize the expanded disk space. As you will see from the screenshot.
Click on the Partition tab at the top of the gparted window with sda2 highlighted in the main window and select unmount OR right click on sda2 in the main window and select unmount.