It turns out the /home directories in my Ubuntu VM were too small to transfer over to a separate partition. I ran “Disk Usage Manager” (I think) and discovered that one of my main directories (/usr or /lib) was using almost all the free space available. It was a good idea to use VBoxManager to boost the space available for the hard drive in the VM. However, GParted does not allow modification of the partition it’s running on.
I realized I had to run a GParted Live CD on the VM. I found the .iso file and left it on the desktop. I had to modify the VM settings to read the .iso file first when booting. Once I figured that out, I was able to run the GParted Live CD. I was still having trouble reordering the partitions of the Ubuntu VMs.
It turns out that the extra space was added at the end of the Linux swap partition, as separate unallocated space. Eventually, a Google search helped me realize that I needed to move the Linux swap space to the far end of the unallocated partition, then extend the “boot” partition over to fill the remaining space. (It’s weird. Why not just one command instead of two separate actions?) I reshuffled the partition space, rebooted and Ubuntu started again with the full 16 GB partitions correctly.
Unfortunately, I’m still having trouble with Ubuntu updates. I can finally run them without running out of free space, but I have a configuration problem where a linux-generic update depends on another file that is not loaded and that file won’t load because it’s not needed. More on that later.
I was able to bump up the space for the VM hard drive. I still need to create the partition and move the files over.
Before I forget, here are some useful VirtualBox command line options
- > VBoxManage list vms – shows the virtual machines registered in VirtualBox
- > VBoxManage list hdds – shows the matching hard drives attached to the virtual machines. This command also shows the UUIDs needed for …
- >VBoxManage modifyhd <UUID from above> –resize <size in Megabytes>
16384 Megabytes == 16.00 Gigabytes
I think I need to add more space to a VirtualBox VM loaded on one of my machines. I’m unable to load the Ubuntu updates any more. One of the error messages implies I’ve run out of free space. The VM needs more space any way, and I’ll need to remember how to bump up the VM size for another machine, so I should relearn how to do this.
I think what I need to do is this:
- bump up the space using VirtualBox
- use Gparted (Ubuntu desktop app) to create a new partition in that extra space
- move the home directories to the new partition.
- Get rid of the extra temp space and clean up
I’ve done this before about a year ago. My notes from them imply that I should not use the VirtualBox desktop app to add more memory to the virtual hard drive. My notes show the command line commands I entered to get everything to line up correctly. I don’t remember why the desktop app did not work, so I’ll try the command line.
For GParted, I found two web pages that describe that to do, one on site point ( http://www.sitepoint.com/ubuntu-12-04-lts-precise-pangolin-using-gparted-to-partition-a-hard-disk/ ) and another one on the Ubuntu help pages ( https://help.ubuntu.com/community/HowtoPartition/PartitioningBasics ). I’ll have to review them again to make sure I don’t get any surprises.
Once I’m through with GParted, I’ll follow along with this page in the Ubuntu help pages (https://help.ubuntu.com/community/Partitioning/Home/Moving) to finish. I remember this page before. The instructions are simple to follow and I understand what is being done at each step. I don’t expect any trouble from this point, but you never know. More news later.