Sunday, October 9, 2011

Increasing the size of your VirtualBox drive

Ok, so I never got round to finishing the Migrator.Net post. It's almost there but things got a bit busy and it fell by the wayside. Tonight though, I ran into a little wrinkle that I thought I'd blog about before I forget or lose interest.

I've been playing around with MSDeploy quite a bit, and needed a Server 2008 R2 install as a test machine. I cranked an instance up in Virtual Box, but only gave it a 10GB dynamically resizing drive.
This was the same stupid mistake I've made before, but I didn't remember until too late, that rather than starting at 10GB and dynamically expanding upwards, this would limit my dynamic drive to a MAX of 10GB.

I know, I know, I'm a dick, 10GB is not enough and never would be. Two hours after creating it I ran out of space and wanted to upsize. The idea of creating a new disk and reinstalling everything, or mucking around with some partitioning/clone tool made me bored and angry (borgry?) just thinking about it.

Then I came across this post on how to easily increase your VirtualBox drive size. It works like a bloody charm.

Basically, you make yourself a new VM with a bigger drive and the same settings as your original except set the IDE controller to be PIIX3.

Then set the drive of the new VM as the primary IDE slave on your small VM, and boot the old small VM back up.

Download Acronis Easy Migrate. It's a commercial product but has a 15-day trial, which is long enough to recover from your stupidity. Install it on the original VM, start it up, choose to Clone Drive, click next through the rest of the wizard, and it will copy the contents of your old VM to your new drive, just like that. You don't even have to know or care what it's doing.

Took about 5 mins to copy my 10GB to my new 30GB drive.  Then I just deleted the old disk and booted up into my nice, spacious new one. Ahhhhhh. Relief, and only half an hour out of my day.
 

1 comment: