Author Topic: Increasing the size of "generic" partition in VirtualBox  (Read 943 times)

Marker

  • Jr. Member
  • **
  • Posts: 19
    • View Profile
Increasing the size of "generic" partition in VirtualBox
« on: April 13, 2014, 01:37:49 PM »
I recently was unable to do updates to an Ubermix machine that I had created in VirtualBox due to running out of space. I had installed Pitivi video editor and some other programs. I was able to increase the size of the drive and the "generic" partition using the steps below. Should you ever need to do this you can find instructions on the Internet, but here's a summary for what I did:

1) I created a VirtualBox machine from the Ubermix .ova file. I don't recall the exact process, but I ended up with a file called "Ubermix-1.4-disk1.vmdk".

2) There is a nice utility that you can run from the terminal called VBoxManage that can be used to resize the virtual machine. Unfortunately, VBoxManage cannot do its magic on a .vmdk file, so I had to convert it to a .vdi file. To do this I entered the VirtualBoxVMs/Ubermix1.4 folder (or whatever you named your virtual machine). Once there I was able to, in the Terminal on my Mac, enter:   VBoxManage clonehd --format VDI filename.vmdk filename.vdi

3) While still in the correct directory I was now able to increase the size of the virtual disk using this command:  VBoxManage modifyhd filename.vdi --resize #####   (where "#####" represents the size you want; example:  10240 = 10 GB)

4) Next you'll need to perform a couple of steps with a partition editor. I used GParted, based on the directions at this site:  http://spicliff.blogspot.com/2012/09/how-to-resize-virtualbox-disk-partition.html

     a) Download the   gparted-live-0.18.0-2-i486.iso   file.

     b) In VirtualBox assign the above .iso image to IDE Master. Be sure that the VM will boot from CD/DVD.

     c) If the .vdi file isn't already linked to the VM go ahead and do that.

     d) Boot the VM. It should launch into GParted. Make a clone of the .vdi file. Remove all of its partitions.

     e) Now go to sda and copy the first partition. Go to sdb, click on the unallocated space, then paste. Repeat for the other 2 partitions.

     f) Now you can resize the large partition to take up as much room as you have available.

     g) Finally, you can shut down the VM, remove the .iso image from the Storage Settings and, if desired, change the startup disk to "hard drive". Then restart the VM. If desired, you can now boot into the "generic" partition and add to/update the "factory partition" 'til your heart's content.


Others may have a better way to achieve this, and it would be great if they would add their corrections, clarifications, and new knowledge!

Thanks,

Mark