Page 1 of 1

How can i resize a virtualbox linux machine

Posted: 30. Jul 2017, 21:57
by vm_guy
Here is the problem,

My current Virtual Machine Centos Server is only 8GB, and i am running out of space. So i need to resize it, i found a tutorial online which i was able to successfully resize it,
I used this commands

VBoxManage clonehd "source.vmdk" "cloned.vdi" --format vdi
VBoxManage modifyhd "cloned.vdi" --resize 51200
VBoxManage clonehd "cloned.vdi" "resized.vmdk" --format vmdk

When i look at the virtual machine in the virtualbox screen, it says the size it 50gb

So, I started up my virtual machine, and it starts up, but when i type dh -h

it says the size is still 8gb

So i have to resize the virtualbox machine from inside, to 50gb to match the virtualbox

How do i go about resizing my linux machine? i am lost on this step,

Re: How can i resize a virtualbox linux machine

Posted: 30. Jul 2017, 22:24
by Perryg
See How to resize a Virtual Drive and especially step #2

Re: How can i resize a virtualbox linux machine

Posted: 30. Jul 2017, 22:29
by vm_guy
Ok i got it, boot gparted live on the same vm machine

I successfully resized the partition using gparted live, and it is showing as 50gb in the gparted live,

But when i started the virtual machine, it still says 8gb using df -h

and when i look at the storage information in the virtualbox main screen it says

Virtual Size 50gb
Actual Size 8GB

where did i go wrong?

Re: How can i resize a virtualbox linux machine

Posted: 30. Jul 2017, 22:39
by Perryg
You probably need to read the entire topic. It sounds like you may have snapshots and that needs special handling or are using LVM. Post the results of df -h

Re: How can i resize a virtualbox linux machine

Posted: 30. Jul 2017, 22:48
by vm_guy
I don't think i am using LVM
as for snapshots, i don't think i am using snapshots, in fact i am have never used the snapshot feature, i am not too familiar with it
df.png
df.png (52.51 KiB) Viewed 1595 times

Re: How can i resize a virtualbox linux machine

Posted: 30. Jul 2017, 22:57
by Perryg
The entries in /dev/mapper are LVM logical volumes. You can extend the volumes locally with the LVM manager. This however falls outside the scope of this forum and you would need to ask the support individuals of the distro this affects.