Changing the size of a VirtualBox disk image
I use VirutalBox to virtualize a copy of Windows 7 on my Ubuntu machine. I use it for when I want to test sites in IE/Safari or when I need Visual Studio to do some .NET work. Naturally I want to keep the disk image as small as possible, but I often find that with all of the ginormous service packs that Microsoft is so fond of distributing, my guesses as to what a good size for the hard disk are usually too small.
There’s no easy way to resize a VirtualBox hard disk image, but it’s not that hard to do. Here are the steps:
- Get a copy of an Acronis Boot Rescue ISO.
- Create a new hard disk image of the size you want using the Virtual Box Virtual Media Manager.
- Attach the new hard disk image as a slave to the OS you want to grow.
- Boot the VirtualBox OS into the Acronis ISO.
- Use the Acronis tools to mirror the master disk into the new slave disk. The tools will automatically expand or contract the partition to match the size of the new disk.
- Toss the old disk image and attach the new one as the master. You’re done!