Profile picture Schedule a Meeting
c a n d l a n d . n e t

Resize/Clone a VirtualBox hard disk with the current snapshot

Dusty Candland | | gparted, ubuntu, virtual machine, virtualbox

After wasting a ton of time, I’m noting this here to hopefully help myself or someone else in the future.

Making the new virtual hard disk

In VirtualBox open the virtual media manager and create a new disk with the larger size. Note it’s location.

Open a command prompt to c:\program files\oracle\virtualbox and run

VBoxManage showvminfo <Machine Name>

Find the primary master line, and note the UUID.

Clone that using your UUID and the path to the new disk

VBoxManage clonehd 73880a2b-ba46-459e-b71b-816ceadecb5a c:\users\dusty.virtualbox\harddisks\CloneDisk.vdi –existing

Resize

There may be better instructions elsewhere, but this worked for me.

  1. Attach a Linux live cd to the cdrom of the machine.

  2. Change the hard disk image to your new image file.

  3. Boot

  4. Start GParted

  5. Right click the swap and select swapoff, note the size and delete.

  6. Delete the extended partition.

  7. Resize the primary partition.

  8. Add an extended partition back.

  9. Add a swap partition back.

  10. Apply the changes.

  11. Shutdown, remove the live image from the machine, restart.

Reference:

http://forums.virtualbox.org/viewtopic.php?t=585

http://forums.virtualbox.org/viewtopic.php?f=1&t=791&p=103299#p103299

http://www.attackr.com/resize-an-existing-vdi-virtualbox-image-easily/

Webmentions

These are webmentions via the IndieWeb and webmention.io. Mention this post from your site: