Dynamic vdi appears smaller than set size

This is for discussing general topics about how to use VirtualBox.
Post Reply
mrcharly
Posts: 5
Joined: 18. Mar 2011, 16:15
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Centos 5.5

Dynamic vdi appears smaller than set size

Post by mrcharly »

I'm using 4.0.4 on W7 and Centos as the guest OS.

I created a dynamic vdi with a size of 8Gb, and set up Centos in that vdi.

Tried using it and ran out of space. df -h in the guest Centos says I have 5.7Gb and only 1.4Gb free.

I usedVBManage modifyhd --resize to change the vdi to 15Gb.

In VirtualBox settings it shows the vdi as 15Gb. When I load Centos in the VM, it still shows 5.7Gb.

How come the guest os doesn't see the max dynamic size of the vdi?
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamic vdi appears smaller than set size

Post by Perryg »

You have increased the size of the HD not the partition. Use Gparted (in the guests virtual CD/DVD) and increase the partition.
mrcharly
Posts: 5
Joined: 18. Mar 2011, 16:15
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Centos 5.5

Re: Dynamic vdi appears smaller than set size

Post by mrcharly »

Finally got round to setting up Gpart.

As far as Gpart can tell, this vdi is 8Gb and not resizeable. I don't know what is going on.
:-|
mrcharly
Posts: 5
Joined: 18. Mar 2011, 16:15
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Centos 5.5

Re: Dynamic vdi appears smaller than set size

Post by mrcharly »

?
I booted with Gpart (via virtualbox)
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamic vdi appears smaller than set size

Post by Perryg »

If you have booted the guest with Gparted and it says that the partition is 8GB and the Drive is 8GB then the increase did not happen. Can you post a screen shot of the Gparted screen showing the drive structure?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Dynamic vdi appears smaller than set size

Post by vbox4me2 »

Don't you see the new space at all ? there should be some unknown area listed of the size of what you expanded it to. Not running in a snapshot ?
mrcharly
Posts: 5
Joined: 18. Mar 2011, 16:15
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Centos 5.5

Re: Dynamic vdi appears smaller than set size

Post by mrcharly »

Shot showing the supposed 15Gb vdi as reported by virtualbox
Image

Booted into gpart
Image
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Dynamic vdi appears smaller than set size

Post by vbox4me2 »

Your running in a snapshot(4), you'd have to merge them all first before you see the new space.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamic vdi appears smaller than set size

Post by Perryg »

Not to mention that you are using LVM format which IIRC Gparted does not support yet. You would need to increase the partition within the OS using the LVM manager or CLI which ever the OS supports.
mrcharly
Posts: 5
Joined: 18. Mar 2011, 16:15
Primary OS: MS Windows 7
VBox Version: OSE other
Guest OSses: Centos 5.5

Re: Dynamic vdi appears smaller than set size

Post by mrcharly »

So merge snapshots and use LVM manager from within the os?
vbox4me2
Volunteer
Posts: 5218
Joined: 21. Nov 2008, 20:27
Location: Rotterdam
Contact:

Re: Dynamic vdi appears smaller than set size

Post by vbox4me2 »

Not 100% sure(lvm) so back it up first and try.
mpack
Site Moderator
Posts: 39134
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Mostly XP

Re: Dynamic vdi appears smaller than set size

Post by mpack »

Do I understand that you resized the base VDI in a snapshot chain?

If so then you will hopefully get away with it; if VBoxManage changes the Modify-UUID during a resize, as it should, then I don't understand how your VM can still be running. It can be a fatal mistake to alter in any way any member of a snapshot chain except leaf entries, meaning those which have no children. The children are relying on the parents to provide the data which they do not store. You are changing that data and hence potentially providing unexpected data to all of the children.

It's also the kind of error that is hard to repair without a backup - and since snapshots are involved: even restoring a backup can be tricky if you aren't an expert.
Post Reply