Low Disk Space in Dynamically allocated Disk

Discussions related to using VirtualBox on Windows hosts.

Low Disk Space in Dynamically allocated Disk

Postby neilghosh » 20. Dec 2011, 11:13

I have Ubuntu 11.10 Installed as a guest and now a days I am getting low disk space warning. Is there any way to allocate more hard disk space now ?
or I have to delete the Virtual machine and create a new loosing all my settings and installation ?

I was expecting the Virtual Hard Disk to grows a required however it did not happen. Is this a bug ?
Neil
neilghosh
 
Posts: 42
Joined: 24. Aug 2010, 18:05
Location: Hyderabad
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Low Disk Space in Dynamically allocated Disk

Postby mpack » 20. Dec 2011, 14:01

That is a FAQ. RTFM and/or search the forums. VirtualBox version would have been useful info too. And lose the irrelevant link in your sig please.
mpack
Site Moderator
 
Posts: 29317
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Low Disk Space in Dynamically allocated Disk

Postby neilghosh » 20. Dec 2011, 14:22

VB Version 4.1.8
Neil
neilghosh
 
Posts: 42
Joined: 24. Aug 2010, 18:05
Location: Hyderabad
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Low Disk Space in Dynamically allocated Disk

Postby neilghosh » 20. Dec 2011, 14:53

I am getting the following error

D:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd D:\VM\Ubuntu\Ubuntu.vdi
--resize 2048
0%...
Progress state: VBOX_E_NOT_SUPPORTED
VBoxManage.exe: error: Resize hard disk operation for this format is not impleme
nted yet!
Neil
neilghosh
 
Posts: 42
Joined: 24. Aug 2010, 18:05
Location: Hyderabad
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Low Disk Space in Dynamically allocated Disk

Postby mpack » 20. Dec 2011, 16:07

Resize only works with dynamic VDI or dynamic VHD, and the argument for --resize should be the size in megabytes of the new drive, not the size of the additional space.

For example, if you have a 10GB drive and you want a 15GB drive you say "--resize 15000" and not "--resize 5000".

The --resize argument for VBoxManage was introduced in VirtualBox v4, so you do have the right version.

Also bear in mind the following :-

o "resize" will not work properly if you have used snapshots - those have to be got rid of first.
o "resize" will only increase the size of the drive. Gparted or similar must be used to increase the filesystem partition.
o "resize" is an in-place mod, which I regard as dangerous. IMHO you should make a backup first.

Regarding your question about whether your observation about the dynamic drive not enlarging is a bug: no it isn't a bug, because no claim is made that the drive capacity enlarges automatically, and your Ubuntu guest wouldn't support it if it did. The user manual is quite clear on this subject: "dynamic" means that host space for the drive is allocated dynamically (on demand). The drive capacity visible to the guest never changes.
mpack
Site Moderator
 
Posts: 29317
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: Low Disk Space in Dynamically allocated Disk

Postby neilghosh » 20. Dec 2011, 20:20

Thanks for the reply,

Now I am trying to extend the partition to unallocated area in the following thread

https://forums.virtualbox.org/viewtopic.php?f=6&t=45989&start=15
Neil
neilghosh
 
Posts: 42
Joined: 24. Aug 2010, 18:05
Location: Hyderabad
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu

Re: Low Disk Space in Dynamically allocated Disk

Postby neilghosh » 20. Dec 2011, 20:37

Here is the final solution

1.Resize the virtual disk

D:\Program Files\Oracle\VirtualBox>VBoxManage modifyhd D:\VM\Ubuntu\Ubuntu.vdi -
-resize 20480
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%

2.Download the Gparted http://gparted.sourceforge.net/ ISO
3.Add the ISO as Virtual DISK Boot from the it using the same machine in Virtual Box
4.Resize the primary partition which is has low space and extend it to the unallocated space
5.delete the swap and then extend the first partition and make sure to leave enough at the end to add the swap back.
Attachments
gparted.jpg
Gparted
gparted.jpg (79.85 KiB) Viewed 63669 times
Neil
neilghosh
 
Posts: 42
Joined: 24. Aug 2010, 18:05
Location: Hyderabad
Primary OS: MS Windows XP
VBox Version: OSE other
Guest OSses: Ubuntu


Return to VirtualBox on Windows Hosts

Who is online

Users browsing this forum: DeinAbi and 45 guests