LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Is there a way to increase the VDI size in VirtualBox on Fedora 9? (http://www.linuxquestions.org/questions/linux-software-2/is-there-a-way-to-increase-the-vdi-size-in-virtualbox-on-fedora-9-a-668822/)

Mr. Rey 09-10-2008 12:49 AM

Is there a way to increase the VDI size in VirtualBox on Fedora 9?
 
Hello everyone!

After much trial and errors, I finally got VirtualBox running on my Fedora 9 machine.

I installed Windows Vista as guest on my Fedora 9 host machine. However, I've run into a small little problem. Is there any way I can increase the disk size of my guest machine? I don't know what I was thinking! :eek: I didn't plan ahead. I only assigned 15GB to the guest machine and, of course, I'm running out of disk space on the guest machine. :rolleyes: Please help me out! I really appreciate all of your time and cooperation. :D

Fred Caro 09-10-2008 09:35 AM

vista fed9
 
congrats for installing VBox, it took me a while but the benefits are worth it, especially if you are on a shoebox. Maybe the problem is likely to be with fed9 than VBox.Not had a problem with expanding the view but it remains on a smaller window. Could be a result of insufficient amount of ram.Ditch vista it's a waste of space.Not sure of your sizes. It only takes 10mg to load yp so where does 15gb come from?

Roy.

Mr. Rey 09-10-2008 05:03 PM

Thanks for your reply!

Yeah, I think you're right. It could be a compatability issue between VTB and FC 9.

Anyways, I said 15GB because the Vista install (guest OS) required there be at least 11GB of free space in order to Install a fresh new copy of Vista. So I figured, since Vista is not going to be my primary OS, I'll just add 4 more GB's. So, I made the total size 15GB. But now, I'm realizing that I need more diskspace in my Vista. I've already installed several programs on my Vista OS, and it took my quiet some time to get it running perfectly. My only question now is - how do I increase the disk size of my guest OS in VTB?

pwc101 09-10-2008 06:28 PM

As far as I'm aware, you can't increase the size of a virtual disk.

What I tend to do is just make a new virtual disk, and add is as a slave drive, then format and mount it in Windows and use that to install new programs, move data to etc. It becomes an extension of the other disk. You can also mount the new slave disk to a folder in an NTFS system, so you could replace your entire Program Files with that disk, if you wanted to.

Mr. Rey 09-10-2008 07:07 PM

Ok. Is there a good guide somewhere I can follow on how to add a new virtual disk to the Vista guest OS?

pwc101 09-11-2008 05:11 AM

I couldn't find one, so here's a quick reference:
  1. Create a new virtual disk
    Open VirtualBox, go to File > Virtual Disk Manager. In the Hard Disks tab, click the New button. Follow the instructions, choose a suitable name, size and type (dynamic's probably best) for your extra storage, click Finish. You should now see a new disk in the Hard Disks tab.
  2. Add the new virtual disk to Vista's virtual machine
    Exit the Virtual Disk Manager (OK). Then highglight the Vista virtual machine, click on Settings, and select Hard Disks from the options on the left. Click the Add Attachment button (button on the right of a little stack of CDs with a green + on it). It should automatically add your newly created disk. If it doesn't, select it from the drop down list.
  3. Start Vista
    Click OK to close the Vista settings. Then click start to Launch your Vista virtual machine.
  4. Log in to Vista
    Vista should recognise the new hardware (VBOX HARDDISK ATA Device) and install the new drivers for it. Then, click Start and right click on Computer, and select Manage. Click on the Disk Management section on the left. It'll ask you to initialise the new disk. Do so.
  5. Initialise the new partition
    You should now have three separate disks (C:\, the new disk, and your CD/DVD drive D:\). Select the new disk's block, right click on it, and select New Simple Volume. Click Next, leave the default size as is, click Next. The next screen allows you to mount the new drive to an existing folder (you can make it from the Browse dialog). Select your folder, click Next. Format the new partition with NTFS (probably easiest), give it a funky volume label if you're feeling carefree, tick the box that says perform a quick format.
  6. That's it.
    You should now have an extra bunch of storage space in that folder you mounted the disk to.

    Mounting the slave disk as Program Files first requires you to mount it as described above, and then copy the contents of the current Program Files to the new slave disk, and then delete the contents of Program Files (but not the directory), and the remount the new slave disk to the now empty Program Files directory. Note: I have not tested this, so can't confirm if Vista will allow you to delete the contents of Program Files. You may have to do this part in Safe Mode.

Mr. Rey 09-12-2008 01:36 AM

Dude, you're awesome! Your instructions were very clear and helpful. I appreciate you very much for taking the time to explain this to me. I was able to add the extra hard drive per your instructions. Now, I don't have to worry about running out of space. Again, thank you and hope we chat again soon!!! :-)

pwc101 09-12-2008 04:44 AM

No problem; I'm glad it worked.

thisspaceleftblank 05-23-2010 05:04 PM

Alternate method
 
download Puppy Linux or similar distribution iso that has the tools dd and gparted

create the new vdi with the larger size

create a new virtual machine, booting the Puppy iso and attach the current smaller vdi and your newly created larger vdi

Boot the VM, the old vdi drive should have an icon on screen. Since the new one is not formatted, it does not.

in terminal use command "dd if=/dev/sda of=/dev/sdb"

This copies the old drive to the new drive.

Reboot puppy. Both drives should appear on screen.

Use gparted to resize the new drive partition to use the whole drive.

Shut down VM, attach the new vdi to its VM.

I just did this with a XP VM, once booted it checked the drive for errors and booted fine with the new size.

John VV 05-23-2010 05:13 PM

thisspaceleftblank
Please DO NOT drag up 2 year old posts !!!

thisspaceleftblank 05-24-2010 09:05 AM

Why not?
 
I was searching for how to do this myself and reading these old posts gave me an idea how it might be done simpler. Did you think folks stopped having this problem?


All times are GMT -5. The time now is 05:09 AM.