Resizing a VirtualBox disk image

I won’t go into huge details, but it was pretty straightforward, with some systems experience, and (surprisingly) I did not hit a bunch of errors on the way.

I made the mistake of making an 8GB (default?) fixed image size, and now I made it a 50GB variable image size (the guest OS thinks it has 50GB, but it only uses as much real space as it needs)

  1. Create a new disk under the SATA controller
  2. Boot into a live Linux, like GParted
  3. dd if=/dev/sda of=/dev/sdb (add bs to improve performance!)
  4. Open GParted and extend /dev/sdb to your desired size
  5. Mount your new partition, fix any /etc/fstab-related items as necessary
  6. poweroff, remove the old disk from the virtual SATA controller, power on
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


%d bloggers like this: