Page 1 of 1

Can't extend VM storage

Posted: 30. Mar 2016, 18:51
by williTheNose
Hello,

I'm facing problems by trying to increase the storage of my VM image.

At first I set up the storage using dynamic increase. But I still run out of space at 5.6GB, I never saw it adjusting anything dynamically, maybe I set the maximum storage too low (read something like this somewhere).

So, I cloned it and increase the virtual drive size to 51200 MBytes (Clone of Ubuntu Server 15.1.vdi, see below). I checked the VM and ran out of space again at 5.6GB!

So, I cloned it again (again to 51200 MBytes) but this time also setting the option to increase partition size (Clone2 of Ubuntu Server 15.1.vdi). I checked the VM and ran out of space again at 5.6GB! What's going on?

Can anyone help?

Code: Select all

C:\Program Files\Oracle\VirtualBox>VBoxManage list hdds
UUID:           73bf08e2-253b-4906-b5e9-03dbfe277db1
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       C:\Users\willi\VirtualBox VMs\Ubuntu Server\Ubuntu Server 15.1.vdi
Storage format: VDI
Capacity:       8192 MBytes
Encryption:     disabled

UUID:           2d2eee70-0d71-416f-9eed-2da2dbc4baa5
Parent UUID:    base
State:          created
Type:           normal (base)
Location:       C:\Users\willi\VirtualBox VMs\Ubuntu Server\Clone of Ubuntu Server 15.1.vdi
Storage format: VDI
Capacity:       51200 MBytes
Encryption:     disabled

UUID:           6aea4727-cee6-4dcb-9e35-0d8d08337be6
Parent UUID:    base
State:          locked write
Type:           normal (base)
Location:       C:\Users\willi\VirtualBox VMs\Ubuntu Server\Clone2 of Ubuntu Server 15.1.vdi
Storage format: VDI
Capacity:       51200 MBytes
Encryption:     disabled

Re: Can't extend VM storage

Posted: 30. Mar 2016, 19:05
by Perryg
viewtopic.php?f=24&t=50661

read step 2 and then post the results of the following from the guests terminal.

Code: Select all

df -h
Moving to Linux guests

Re: Can't extend VM storage

Posted: 30. Mar 2016, 20:03
by mpack
What tool were you using to clone and "increase the partition size" of your Ubuntu server guest?

Given the terminology I'm suspecting you were using CloneVDI, which does not support expanding the filesystem of a EXTx (Linux) partition (sometimes it is useful to read the documentation that comes with software!). If you tick that option then CloneVDI will move other partitions around to make room for the expansion, but you have to use e.g. GParted to expand the EXTx partition itself.

Re: Can't extend VM storage

Posted: 31. Mar 2016, 10:09
by williTheNose
Alright, thanks for your hints! Now, I have at least an idea how to solve it.

I downloaded the gparted live CD but unfortunately, gparted doesn't support partition resizing anymore (!!). Still looking for a way to do that.

Re: Can't extend VM storage

Posted: 31. Mar 2016, 10:54
by mpack
williTheNose wrote:but unfortunately, gparted doesn't support partition resizing anymore (!!)
I rather doubt that. The tool has no other purpose: "GNU Partition Editor".

You have never explicitly said what filesystem and partition method the guest uses. I have assumed EXTx and MBR since you evidently thought CloneVDI would handle it, but it would be a different kettle of fish if it was EXTx+LVM.

Re: Can't extend VM storage

Posted: 31. Mar 2016, 12:55
by mike2712
From the GParted home page:

With GParted you can resize, copy, and move partitions...

Re: Can't extend VM storage

Posted: 31. Mar 2016, 14:22
by Perryg
You failed to provide the information I requested that would help in determining why you are having so much trouble.
Post the results of what df -h replies in the guest terminal.

Re: Can't extend VM storage

Posted: 31. Mar 2016, 18:49
by williTheNose
Sorry, the information was not fully correct, I couldn't use gparted (missing X support), so I used parted instead and it told me:
Error: The resize command has been removed in parted 3.0

This is want I meant but there is a new option called resizepart, that should do as well (didn't noticed at first place).

And yes, I was using CloneVDI to clone and "increase the partition size". And yes, I use EXTx and LVM.

Code: Select all

$ df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            985M     0  985M   0% /dev
tmpfs           201M  4.7M  196M   3% /run
/dev/dm-0       5.6G  4.6G  637M  89% /
tmpfs          1001M     0 1001M   0% /dev/shm
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs          1001M     0 1001M   0% /sys/fs/cgroup
/dev/sda1       236M   92M  132M  41% /boot
tmpfs           201M     0  201M   0% /run/user/1000
I put a lot of effort and time in it but I had to give it up as I have to make sure to get a working environment asap, so I set up a new VM with enough storage space. I'm just too stupid for this.

Thank you all for your help, I appreciate your support!

Re: Can't extend VM storage

Posted: 31. Mar 2016, 18:57
by Martin
Your root volume /dev/dm-0 is only has a total size of 5.6GB so you cannot store anything bigger.

Re: Can't extend VM storage

Posted: 31. Mar 2016, 19:06
by Perryg
The next step is to use LVM to increase the partition size. Consult the OS help for the proper procedure.