Ubuntu – Guest system does not see the updated disk size in VirtualBox

14.04gpartedpartitioningvirtualboxvirtualization

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?

Best Answer

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
Related Question