Dynamically sized disk not expanding to preset maximum size

This is for discussing general topics about how to use VirtualBox.

Dynamically sized disk not expanding to preset maximum size

Postby cwestin » 11. Aug 2011, 21:55

VirtualBox 4.0.12
Host: Windows Vista
Guest: Fedora 15

When I created my guest vm, I specified a 16GB .vdi file, dynamically sized. It started out at 8GB.

I ran the VM for a while. My applications in the guest started to run into problems, complaining that the disk was full. I happen to know (database files I'm importing), that I need only 2GB more.

On the host, the .vdi file is still only 8GB, and hasn't expanded automatically to its specified maximum of 16GB. Within the guest, du/df do report that I've consumed most of the 8GB.

I've done some searches, and seen a number of threads about resizing the .vdi file with modifyhd followed by using gparted. I get all that. But those seem to be steps required when your .vdi has reached its maximum size. Mine seems to refuse to expand to its specified maximum, being stuck at 8GB. Before I resort to the modifyhd procedure, I want to know if I'm missing something else that would allow it to dynamically grow to 16GB as I believe it is supposed to do, given that I haven't hit that specified maximum size yet.
cwestin
 
Posts: 4
Joined: 11. Aug 2011, 21:40
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Fedora

Re: Dynamically sized disk not expanding to preset maximum size

Postby Perryg » 11. Aug 2011, 22:53

What size is being reported in the VirtualBox main manager (storage section)?
You should also look at the way you partitioned the guest. Is it LVM and is one partition full as is being reported?
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamically sized disk not expanding to preset maximum size

Postby cwestin » 15. Aug 2011, 18:33

In the Storage Manager, Virtual Box reports Virtual Size 16GB, Actual size 8.51 GB.

I didn't do anything to partition the space -- no LVM or anything else. Just Created the 16GB virtual disk and left it to Fedora to use it all when I created the VM.
cwestin
 
Posts: 4
Joined: 11. Aug 2011, 21:40
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Fedora

Re: Dynamically sized disk not expanding to preset maximum size

Postby Perryg » 15. Aug 2011, 18:47

Just Created the 16GB virtual disk and left it to Fedora to use it all when I created the VM.

Just because you did not set it that way does not mean Fedora did not.
What does df -h show you in the guest?
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamically sized disk not expanding to preset maximum size

Postby cwestin » 15. Aug 2011, 19:11

df -h:
Filesystem Size Used Avail Use% Mounted on
rootfs 11G 9.9G 316K 100% /
udev 1.5G 0 1.5G 0% /dev
tmpfs 1.5G 272K 1.5G 1% /dev/shm
tmpfs 1.5G 656K 1.5G 1% /run
/dev/mapper/vg_fedora15-lv_root
11G 9.9G 316K 100% /
tmpfs 1.5G 0 1.5G 0% /sys/fs/cgroup
tmpfs 1.5G 0 1.5G 0% /media
/dev/sda1 485M 52M 408M 12% /boot
/dev/mapper/vg_fedora15-lv_root
11G 9.9G 316K 100% /tmp
/dev/mapper/vg_fedora15-lv_root
11G 9.9G 316K 100% /var/tmp
/dev/mapper/vg_fedora15-lv_root
11G 9.9G 316K 100% /home

I take it this lv_root stuff is somehow related to this? I have no idea what that stuff is or what to do with it. Any pointers or quick things I can do to get the VM to expand as I'd expect?
cwestin
 
Posts: 4
Joined: 11. Aug 2011, 21:40
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Fedora

Re: Dynamically sized disk not expanding to preset maximum size

Postby Perryg » 15. Aug 2011, 19:18

Well I am not a big propionate of LVM for casual use. You would need to use the guests LVM manager to control the size of the partitions. I would seek help at Fedora if this guest is important to you. The actual use and control of the guest operating system is not within the scope of the VirtualBox forums and any advise given here might be completely wrong.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamically sized disk not expanding to preset maximum size

Postby mhwelsh » 20. Aug 2011, 17:34

I too have this problem.
Trying to host XPsp3 on a LinuxMint LMDE host. (Effectively a debian 'testing' system.)

The ide controller is PIIX4 using host cache.
The virtual size is 25G, The actual size is 5.34G.

Why is it not working dynamically as promised?
Will it help if I try a different controller and what will be the consequences of just selecting an alternative controller?

To the best of my knowledge LVM is not used.

martin welsh
mhwelsh
 
Posts: 4
Joined: 16. Aug 2011, 20:25
Primary OS: Other
VBox Version: OSE Debian
Guest OSses: Mint LMDE

Re: Dynamically sized disk not expanding to preset maximum size

Postby Sasquatch » 20. Aug 2011, 17:46

mhwelsh wrote:I too have this problem.
Trying to host XPsp3 on a LinuxMint LMDE host. (Effectively a debian 'testing' system.)

The ide controller is PIIX4 using host cache.
The virtual size is 25G, The actual size is 5.34G.

Why is it not working dynamically as promised?
Will it help if I try a different controller and what will be the consequences of just selecting an alternative controller?

To the best of my knowledge LVM is not used.

martin welsh

LVM is only for Linux, and the OP uses LVM in the Guest. Your Guest is Windows, it doesn't have advanced disk structuring like LVM. You don't have the problem described either, you set the VDI to max 25 GB and currently 5.34 is used. Exactly how it's designed to work.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Dynamically sized disk not expanding to preset maximum size

Postby mhwelsh » 20. Aug 2011, 19:53

Surely the way it is designed verbally is that the partition can expand up to 25G. Why then does it throw up an error message that the disk is full at 5.34G?

martin welsh
mhwelsh
 
Posts: 4
Joined: 16. Aug 2011, 20:25
Primary OS: Other
VBox Version: OSE Debian
Guest OSses: Mint LMDE

Re: Dynamically sized disk not expanding to preset maximum size

Postby Sasquatch » 20. Aug 2011, 19:56

Either the Guest partition is not big enough, or the Host disk is full. Really, the error says it all. Your problem is nothing like the OP.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Dynamically sized disk not expanding to preset maximum size

Postby mhwelsh » 20. Aug 2011, 20:26

The host system says that the partition has a capacity of 28.6Ghz. It is empty - nothing in it.
I elected to set aside 25G for the installation of XP on this empty partition.
The VirtualBox program said that it would use up to 25G.
Please explain how, when the XP programme has taken up only 5.34G, efforts to update XP cause VirtualBox to shut down because of lack of disk space.
I have tried installing several times, probably each of several hours duration, and VirtualBox appears to draw a line when the initial installation has taken place and the refuses to accept further additions because of 'lack of disk space'. Is that how it is supposed to work?

martin welsh
mhwelsh
 
Posts: 4
Joined: 16. Aug 2011, 20:25
Primary OS: Other
VBox Version: OSE Debian
Guest OSses: Mint LMDE

Re: Dynamically sized disk not expanding to preset maximum size

Postby Perryg » 20. Aug 2011, 21:54

Post the results of running df-h in a terminal window on the host. And use code blocks to make it more readable.
Perryg
Site Moderator
 
Posts: 34373
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: Dynamically sized disk not expanding to preset maximum size

Postby mhwelsh » 21. Aug 2011, 15:10

There follows 'df -h'. Don't understand code blocks - there is no mention of them as such in the 'man'
Please shout if you want more.
To give a bit more background my initial efforts, having downloaded .deb packages of VirtualBox, focussed on installing an XP upgrade which involved starting with an ME installation.
Dynamically adjusted file capacity appeared to be the way to go but I ran into trouble as soon as I tried to update with XP. The message said not enough disk space..
I tried a bigger 'mother' file and I got ME and XP in and it packed up when I tried to put SP2 into XP - again no disk space. It is as if a curtain comes down when the system has been loaded and it refuses to enlarge an established file.
From there I tried an XP SP2 straight load, and through not paying attention whilst installing it this finished up in the 'home' directory. Would you believe it it happily gobbles up all of the XP updates including SP3.
I have now tried to put it in to an empty partition, /VirtualBox, and I am back to the non expanding file size.

Code: Select all   Expand viewCollapse view
linux martin # df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda5              13G   12G     0 100% /
tmpfs                 5.0M     0  5.0M   0% /lib/init/rw
tmpfs                 197M  984K  196M   1% /run
udev                  977M     0  977M   0% /dev
tmpfs                 393M  156K  393M   1% /run/shm
/dev/sda7              13G  4.7G  7.2G  40% /Mint10KdeRoot
/dev/sdb5             2.0G  935M  935M  50% /BackupStore
/dev/sdb6             6.8G  1.9G  4.6G  29% /Downloads
/dev/sdb7             6.8G  5.3G  1.2G  82% /Iso
/dev/sda6             7.7G  6.8G  526M  93% /home
/dev/sdb8             4.9G  937M  3.7G  21% /Photo
/dev/sda10             24G  173M   23G   1% /Spare_sda
/dev/sda8             7.7G  606M  6.8G   9% /Mint10KdeHome
/dev/sdb10            9.7G  2.0G  7.2G  22% /archive
/dev/sdb11            9.7G  7.5G  1.7G  83% /Images1
overflow              1.0M   32K  992K   4% /tmp
/dev/sdb13             29G  173M   27G   1% /VirtualBox
linux martin #

The partition used is labelled /VirtualBox sorry was /VirtualBox.
The message now appearing in VM VirtualBox Manager is;
The selected Virtual Machine is inaccessible and the error message reads,
Runtime error opening '/VirtualBox/VirtualBoxVMs/XP-Pro/XP-Pro.vbox' for reading: -102 (File not found.).
/build/buildd-virtualbox_4.0.10-dfsg-1-i386-blOxzQ/virtualbox-4.0.10-dfsg/src/VBox/Main/src-server/MachineImpl.cpp[679] (nsresult Machine::registeredInit()).
Result Code:
NS_ERROR_FAILURE (0x80004005)
Component:
VirtualBox
Interface:
IVirtualBox {d2de270c-1d4b-4c9e-843f-bbb9b47269ff}

The VirtualBox partition is empty!

Perhaps you would let me know whether the data I have sent may stimulate words of caution for my future efforts.

martin welsh
mhwelsh
 
Posts: 4
Joined: 16. Aug 2011, 20:25
Primary OS: Other
VBox Version: OSE Debian
Guest OSses: Mint LMDE

Re: Dynamically sized disk not expanding to preset maximum size

Postby Sasquatch » 21. Aug 2011, 15:18

The code block is for the forum here. I've modified your post to reflect that. There is a button in the Post a Reply window to create such blocks.

Your problem is that your / is full, and your /home has only 500 MB left. In other words, your Host is out of disk space. I see other partitions, including a /VirtualBox, that does have plenty of space, but only 173 MB is in use. In other words, it's not used by VB at all, it's all stored in your /home.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Sasquatch
Volunteer
 
Posts: 17800
Joined: 17. Mar 2008, 13:41
Location: /dev/random
Primary OS: Debian other
VBox Version: PUEL
Guest OSses: Windows XP, Windows 7, Linux

Re: Dynamically sized disk not expanding to preset maximum size

Postby cwestin » 23. Aug 2011, 01:31

Of several pages I found using searches, this one had the best instructions for my case: http://www.howtogeek.com/howto/40702/ho ... in-ubuntu/ . I shut down my VM, and added a new hard drive in the storage section or Virtual Box. Back inside the rebooted VM, I followed the instructions in the above howto for adding a new physical volume (the new .vdi for the hard drive) to a volume group (vg_fedora15), and for extending an existing logical volume (lv_root).

That seems to have done the trick.

Thanks all.
Chris
cwestin
 
Posts: 4
Joined: 11. Aug 2011, 21:40
Primary OS: MS Windows Vista
VBox Version: OSE other
Guest OSses: Fedora


Return to Using VirtualBox

Who is online

Users browsing this forum: No registered users and 6 guests