Boone Putney bio photo

Boone Putney

Software Development
Random Musings
Austin, Texas

HumanPlanet Soleer

Email LinkedIn Github

Description

I find myself constantly running out of space. I was trying to fit all of my host system files, applications, and VirtualBox Images on my main SSD, and out of necessity had to keep my VirtualBox Images small. I finally ran out of space, and I’m moving the images over to a new drive. These are the steps to make the larger image and transfer everything over:

Add new image to VirtualBox

  1. Open VirtualBox
  2. Right Click on your target Virtual Machine, and click on “Settings”
  3. Click on “Storage”
  4. Within the Storage Tree, click on the “Add Hard Disk” button, next to “Controller: SATA”
  5. Click “Create new disk”
  6. Select your file options (VDI/Fixed size for me)
  7. Select your name and size for the new image
  8. Click “Create”

Clone and setup disk

  1. Boot up your Virtual Machine using the Ubuntu Install Disk
  2. Open the terminal and type in:
1 sudo fdisk –l
  1. Make sure both your old and new disks are mounted. Make note of old (sda, not sda1) and new (sdb, not sdb1)
  2. Use dd to copy all necessary files (sda->sdb):
1 sudo dd if=/dev/sda of=/dev/sdb
  1. You may have to restart, make sure you boot into the installation media again
  2. Open GParted
  3. Resize allocation to accommodate full size
  4. Shutdown your Virtual Machine
  5. Detach the old image from within the VirtualBox Virtual Machine settings
  6. Boot up (with the install disk removed), and you’re good to go!
  7. As a sanity check, “df” in a terminal and check out all your new space.

Credits to How-To Geek for the dd info.