Virtualbox: expanding the size of a virtual disk
Steven Davies-Morris
sdavmor at systemstheory.net
Wed May 14 22:52:46 UTC 2008
NoOp wrote:
> On 05/14/2008 02:01 PM, Steven Davies-Morris wrote:
>> NoOp wrote:
>>> On 05/13/2008 06:23 PM, Steven Davies-Morris wrote:
>>>> I've been reading through the documentation but can't seem to find
>>>> anything in there that lets me tell it grow a VDI from 8gb to 16gb to
>>>> 24gb etc. Can I do such a thing? I don't want to create additional disks
>>>> or provide access to one of my raw disks just yet (that will come
>>>> later). I'm running the current VB 1.60 i386 32 bit version on Ubuntu 8.04.
>>> If you find the answer, please post back and advise. I've been trying to
>>> figure out a way to do the same, but all I come up with is to create a
>>> new VM then run a disk copy program to copy to the other VM.
>>>
>>> Some suggestions here:
>>>
>>> <http://forums.virtualbox.org/viewtopic.php?t=6401&view=previous&sid=3db3ea9874df3961e3ca1521f428ceaa>
>> Damn windows! doesn't take much to fill up that 8gbs! So I'm going to
>> create a bigger virtual (I think 20gbs will hold all the Windows stuff I
>> need plus data) and copy everything over. It's all trial and error
>> right now, learning as I go, so I can't be too upset about it.
>
> You might want to hold of for awhile. I have a "disposable" Win2KPro
> that I've been playing with that I initially set for 4GB expandable. It
> was getting full, so I am just now trying the methods on page two of
> that link:
>
> ====
> klix
>
> PostPosted: Fri Feb 15, 2008 10:15 am Post subject: Another
> solution Reply with quote
> 1. create a new VDI image with the size you want
> 2. attach your new image as the slave
> 3. boot some linux live CD in your virtual machine
> 4. check /proc/paritions which drive is original and which is new (watch
> the size Smile)
> 5. dd if=/dev/olddrive of=/dev/newdrive (in the most cases dd
> if=/dev/hda of=/dev/hdb)
> 6. reboot
> 7. attach your new image as the primary master
> 8. boot the OS and use some software for resizing partitions (e.g.
> parted in linux or partition magic in windows - if you use linux you
> can't use parted on master partition, so you can use your live linux cd
> Wink)
> 9. well done - tested on Windows XP guest and FC6 host and it works
> perfectly
>
> Klix
>
> efffourthirty
> PostPosted: Mon Feb 25, 2008 3:28 am Post subject: Reply with quote
> Klix,
>
> I like your method and it worked great for me. I did the following to go
> from 6GB to 10GB
>
> 1. Booted up using the SYSRECCD from http://www.sysresccd.org
> 2. I executed 'fdisk -l' to see both the partitioned 6GB drive (hda) and
> the unpartitioned 10GB drive (hdb)
> 3. I executed 'dd if=/dev/hda of=/dev/hdb'. Both vdi files were about 5.4GB
> 4. I executed 'fdisk -l' which now showed hdb as a partitioned drive - cool
> 5. I started gparted and both partitions looked good. I could have
> resized it then but decided to test it first by making the 10GB drive
> the primary and dropping the 6GB drive then starting windows -
> everything was good
> 6. Booted up to SYSRESCD again and this time used gparted to resize the
> first parttion to use the full 10GB disk - size on disk unchanged at 5.4GB
> 7. Booted up to windows again and as expected it ran a disk check and
> everything was perfect - windows sees 10GB and the vdi will grow as needed
> ====
>
> Given that there isn't anything really of value on it that I can't
> easily restore, I'm trying the above to move it to a 6GB. You might want
> to wait awhile and see if/how I screw up mine first before messing with
> yours :-)
Screw away...I'll wait awhile and get some documentation done for a
customer.
--
Cheers, SDM -- a 21st Century Schizoid Man
Systems Theory internet music project: <www.systemstheory.net>
on MySpace: <www.myspace.com/systemstheory>
on Last FM: <www.last.fm/music/Systems+Theory>
get "Codetalkers" *free* at <www.mikedickson.org.uk/codetalkers>
NP: Jack Johnson "Sleep Through The Static"
More information about the ubuntu-users
mailing list