The word virtualization conjures images of the dank nerd lairs, populated by lonely network admins, scattered with miles of grey wire, grimy PC towers, processed food packaging and tiny tumbleweeds woven of human hair. It sounds like the domain of the software nerd, the Gentoo jockey, and most importantly, not you. Today, though, virtualisation has become amazingly easy, and fantastically useful.
Terminology aside, here's what desktop virtualisation means today: You can run just about any OS, Mac OS X excluded, inside any other OS. Ubuntu in Mac OS? Sure. Windows 7 within Windows XP? Why not? Windows ME within Snow Leopard? Nobody's going to stop you, I guess! And these patchy, half-assed experiment we're talking about here—these are fully-functioning installations, which'll connect to USB peripherals, access the internet, share files with your host OS, and run almost any software you could run on a native installation. You can set up as many of these things as you want, and delete them in a matter of seconds.
Best of all, virtualisation is now something you can try—and stick with—for free, thanks to software like Sun's VirtualBox. It's a free download on any platform, and it does its job spectacularly. Here's how to get started.
What You'll Need Free hard drive space: VirtualBox is going to create a simulated hard drive (a hard drive image, to be specific) inside your current OS's operating system. In other words, you'll need to have space handy to hold a standard OS install, plus whatever apps you're planning on using on the host system. 10GB is enough to play around with in most cases.
Lots-o-RAM: As efficient as modern virtualization is, running one OS inside another isn't going to be easy on your hardware. The easiest way to ensure good VM performance is to have plenty of RAM, such that both OSes—your host one and your guest one—can have more than their minimum recommended amount of RAM.
VirtualBox: This is the virtual machine, or the program in which all of your virtual OSes will run. Getting it is just a matter of downloading the correct version—there are Windows, Mac and Linux versions—and running an installation wizard.
A guest OS: Installing an OS as a virtual machine is almost exactly like installing an OS natively, albeit slightly easier. In other words, you'll need a full, licensed version of your OS, in whatever form you can get it. Downloaded ISO images will work right out of the, er, box—this is how most Linux distributions will come packaged—while OSes on a CD will work too, including your Windows install discs. If applicable, you'll still need to enter licence keys—as far as Microsoft is concerned, this is a fresh installation of an OS.
Installing Your Virtual Machine I've chosen to install Windows 7 within OS X Snow Leopard for this guide, because this will be a common usage scenario, and because the processing of installing an OS in VirtualBox is nearly the same no matter which software you're running on either end. In other words, if you're installing Ubuntu 9.04 within Windows XP, you can still follow along. Anyway, here you go:
Installing Guest Additions
To install Guest Additions, click "Install Guest Additions" under the "Machine" menu while running your virtual machine. Guest Additions should appear in your guest OS as an optical disc, which should contain an installer. Run it, then restart your virtual machine. Once Guest Additions are installed, you can access Seamless Mode from the VirtualBox menu, under "Machine."
Connecting USB Devices
In most cases, this just means making sure your device isn't in use by your host OS (a flash drive will need to be unmounted, for example), and clicking the small folder icon in the bottom right corner of the screen. This will bring up a list of available connected devices; simply click the one you want, and you're good to go.
Odds and Ends Virtualising isn't just a good way to get around some kind of nagging compatibility problem, it's a fun way to wile away a few hours experimenting with weird news OSes. Setup is just about the same no matter what you're installing, so there's really no reason not to try some of the more esoteric software out there—anything with an ISO available for download will do. For a taste, try the Haiku Project—a revival of the long-dead BeOS, or see what the hell FreeBSD is.
If you have more tips and tools to share, please drop some links in the comments-your feedback is hugely important to our Saturday How To guides. And if you have any topics you'd like to see covered here, please let me know. Happy virtualising, folks.