Page 1 of 1
Dynamically sized disk not expanding to preset maximum size
Posted: 11. Aug 2011, 21:55
by cwestin
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.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 11. Aug 2011, 22:53
by Perryg
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?
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 15. Aug 2011, 18:33
by cwestin
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.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 15. Aug 2011, 18:47
by Perryg
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?
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 15. Aug 2011, 19:11
by cwestin
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?
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 15. Aug 2011, 19:18
by Perryg
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.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 20. Aug 2011, 17:34
by mhwelsh
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
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 20. Aug 2011, 17:46
by Sasquatch
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.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 20. Aug 2011, 19:53
by mhwelsh
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
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 20. Aug 2011, 19:56
by Sasquatch
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.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 20. Aug 2011, 20:26
by mhwelsh
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
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 20. Aug 2011, 21:54
by Perryg
Post the results of running df-h in a terminal window on the host. And use code blocks to make it more readable.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 21. Aug 2011, 15:10
by mhwelsh
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
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
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 21. Aug 2011, 15:18
by Sasquatch
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.
Re: Dynamically sized disk not expanding to preset maximum size
Posted: 23. Aug 2011, 01:31
by cwestin
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