19

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?

16

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
| improve this answer | |
  • 4
    I had to do this with both the main VDI and the Snapshot in Snapshots/ for this to work. I did just the snapshot first and fdisk showed the larger partition but pvcreate threw an error "Fatal error while trying to detect swap signature on /dev/sda3" I also only had one snapshot so you may need to either do it with the latest snapshot or all of them? ive not tested this but its working now – nick fox Oct 5 '17 at 16:10
  • 2
    There is nothing in my Snapshots folder. – Timothy Swan Nov 1 '17 at 14:08
  • @Timoth use the virtual midia manager to locate the snapshots. – lsborg Aug 2 '18 at 17:17
  • 1
    Spot on! My problem was that I didn't run the script for the Snapshots too. – PerrierCitror Dec 8 '18 at 14:41
  • This does not do the trick with version 6.06 of VirtualBox unfortunately. Ubuntu does not see the increases. – Beezer Jun 12 '19 at 9:38
7

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

| improve this answer | |
2

Try installing scsitools and re-scanning the devices

sudo apt-get install scsitools

sudo rescan-scsi-bus.sh

Then check the available space

sudo fdisk -l

Or use gparted if that's what you prefer. If you see the extra space extend the partition

And lastly extend the filesystem on the guest vm

resize2fs /dev/sda1
| improve this answer | |
  • Thank you for your answer! I've tried it, but it didn't help. – automatix May 16 '16 at 9:50
0

I have found a solution that worked for me. I am on Elementary OS but i do believe is the same process. I installed the GNOME Disks where it could see all the available resized size but in another partition. Then on the first partition click the settings and then click resize: Resize partition

and expand to the size you want

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.