Guest system does not see the updated disk size in VirtualBox

In the last time on every start of my Ubuntu 14.04 VM I'm getting the message

Low Disk Space

This computer has only 314.8 MB disk space remaining. You may free up some space by emptying the trash.

enter image description here

Now I've increased the disk space from 10 to 20 GB as described on the VirtualBox forum (first step).

M:\>"C:\Program Files\Oracle\VirtualBox\VBoxManage.exe" modifyhd "M:\VM\Ubuntu VM\Ubuntu VM.vdi" --resize 20480
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

I see, that the disk space has been resized successfully:

enter image description here

But when I start the machine and open GParted, only 10 GB are available.

enter image description here

So somehow the Ubuntu guest system haven't got the updated information about the disk space.

How to solve it and complete the disk space increase?


Solution 1:

I finally found the solution here:

View all of the drives associated with VirtualBox

$ "C:\Program Files\Oracle\VirtualBox\VBoxManage" list hdds

For each associated drive use modifyhd:

$ "C:\Program Files\Oracle\VirtualBox\VBoxManage" modifyhd "D:\Pat\to\VM\Snapshots\{b0e3f93f-49fe-49bc-9ae2-79e80da6cf01}.vdi" --resize 20480

Now GParted sees the added space.

NOTE: The curly braced snapshot entries require the last forward slash to be changed to a backslash. Meaning:

...\Snapshots\{...}.vdi

instead of

...\Snapshots/{...}.vdi

Solution 2:

1) Open GParted tool

2) In the graphical interface you'll see existing partitions and an unallocated partition

3)Click the partition you would like to extend

4) In the top action bar you'll see an arrow directed right. Click it and you'll get option to extend the partition with the unallocated space