ISO testing with VirtualBox
VirtualBox is a useful tool in testing ISO images since you can create imaginative disk configurations, erase or resize disks without concern for your system and test images while working normally on your machine. You can do the same thing with VMware Workstation but VirtualBox has a GPL version and can be used without a serial number. KVM is another virtualization tool, but requires a Linux host and a CPU with hardware virtualization capabilities (Intel VT-x or equivalent), where VirtualBox can use non-Linux hosts and will use software emulation on CPUs lacking VT-x support.
Virtualbox OSE is included in Ubuntu's universe repository for releases from Gutsy to Quantal. In newer releases it is deemed less free and so is named "virtualbox" and is in the multiverse repository instead.
In either case, you just have to install the "virtualbox-ose" or "virtualbox" package using synaptic, adept or one of the command line tools (sudo aptitude install virtualbox-ose , for example). In some earlier releases, when using apt-get install, the necessary kernel module won't be installed (recommended package virtualbox-ose-modules) automatically and you will need to install it afterwards. Since Intrepid, installing virtualbox-ose seems to be enough.
In order to get access to the kernel module you have to add your user to the vboxusers group (created by the installer). Go to System -> Administration -> Users and Groups. Click Manage Groups and scroll down to the vboxusers group. Click Properties and add your user to it. Log out and back in for the group settings to take effect.
Setting up a virtual machine
Click New to create a new Virtual Machine (VM). Follow the instructions on the VirtualBox site.
Setting up VM hardware
Give the VM a name and select Linux 2.6 as the OS. If you don't already have a virtual disk defined you need to create one.
Select a dynamically expanding image. 3 GB is probably a good size. Less for Xubuntu or Ubuntu-server.
Mounting an ISO
You could burn the ISO to a CD and mount that in VirtualBox, but it's more convenient to simply mount the ISO directly.
Starting your VM
Click start to boot into your new VM. You should see the boot screen from the CD. Boot and install as normal. When installation is complete, reboot from within Ubuntu and the virtual CD should be automatically unmounted. If not, press F12 when VirtualBox restarts the VM and select booting from the hard drive.
You can set up the VMs as you test, but you can also set several machines up ahead of time. That way you can set up several machines, each with its own hardware configuration, linked to a virtual disk and an ISO image. Giving each VM it's own disk will require a good deal of free space on your test system, so you may want to share a generic disk for installs (just connect to it before starting a given VM).
If you have an rsync script on a cron job you can have the ISOs you intend to test downloaded overnight (or while you are away). The links from VirtualBox to the 'CD drive' (which you point to the rsync target) will stay mounted. When you want to test a given ISO you just start the pre-defined VM and VirtualBox will boot the freshly rsynced image. This is useful when testing the same case repeatedly and when time gets short closer to release.
Guest Additions in Jaunty
There is an issue with VirtualBox Guest Addons and Jaunty. When trying to install the Guest Additions in Jaunty you might get the following error:
Warning: unknown version of the X Window System installed. Not installing X Window System drivers.
the reason why is that the 2.1.4 vbox video drivers do not yet support Xorg version which ships with Alpha 6.
There is a workaround to make it work:
You need to extract the installer. So run VBoxLinuxAdditions-x86/amd46.run --target ~/tmp (you need the destination folder first of course). Then check the install.sh file, on line 415, you will see this:
15 1.5.99.* | 1.6 )
Now after the 1.6, add a .* (making it 1.6.*). This is needed, because the version that is returned by X -version is 1.6.0, not 1.6.
After you've fixed the install script, run it as sudo.