Virtualization seems to be one of the great buzzwords these days. Everyone wants to be running an operating system other than their own. My first experience with this sort of thing was trying to run Linux alongside Windows XP using VMware. My second was with Parallels, running XP on my Mac.
The big problem with those two programs is the cost. There’s a free trial of Parallels and a free VMware player, but that’s not what I was looking for. I wanted a full version piece of software that would cost very little or nothing. Well I’ve found it. Varun Kashyap wrote about VirtualBox back in May as part of an article on free open source counterparts to Windows software. In this article I will expand on that and show you just how easy it is to install on a Mac and how great it really is.
First off, what is virtualization? Well for our purposes it means creating a virtual computer on your physical computer. Let’s say you’re running OS X Leopard on your Mac, but you’d like to use Windows XP or Vista or some flavour of Linux as well. Without virtualization, you’d need to either dual boot or install your second OS on a second machine. Using virtualization you can have your guest OS running as a window on your host OS, or better yet, have them run side-by-side, almost as equals.
Installing the guest OS
The industry term for the operating system you’ll be running on a virtual computer is ‘Guest OS’. Your main OS is the ‘Host OS’. The virtualization software, in this case VirtualBox, provides the virtual computer. Fire it up and it’ll ask you some questions about the OS you’re installing. Things like:
- The name you’d like to give it. Choose any friendly name here, like “Windows XP” or “Jason’s Virtual Computer.”
The OS type. There’s a long list here including DOS, all flavours of Windows going back to 3.1 and many flavours of Linux
The amount of your system memory you’d like to allocate to the virtual machine when it’s running.
For XP, I find 512M works great, for Vista you’ll need 1G. I have 2M of ram on my Mac so YMMV. (UPDATE : that’s 2G, not 2M of course!)
What type/size hard drive you’d like.
Your choices are Dynamically Expanding Image (default and the one I chose) or Fixed-Size Image.
As for size, I chose the OS default which is 10G for XP and 20G for Vista. That’s just the size VirtualBox reports to the guest OS as the hard drive size. If you chose Dynamically Expanding Image in the previous step VirtualBox will create a file representing your drive only as large as it currently needs to install the OS. Then as the name implies, as you add stuff to your virtual computer, the drive will expand as necessary.
You then power on your virtual machine and it will use the installation CD in your drive (or a disk image of your choice) to install the guest OS. It will run through the entire installation process, as if you were installing it on a physical machine, prompting you for your product key and your time zone etc.
A word about the guest OS. You must have your own copy of the OS you’re installing, and all the regular licensing rules apply. If you install Windows on a virtual machine, it’s the same as installing it on a real computer and as you know, each copy of Windows is only allowed to be run on one computer. Of course, there’s no problem if Linux is your guest operating system of choice. It’s free.
Running your virtual computer
Once the installation is complete, you’ll want to run your new (or old) OS. Just start it up and enjoy the surreal show of having one operating system boot up inside another. Once it’s up and running, you’ll notice the mouse is a little jittery and hard to control. Don’t worry, that’s what Guest Additions are for.
Guest additions do a few very important things.
- Make the mouse cursor less jittery
- Keep track of which OS you’re using so your mouse follows.. … a special mouse driver is installed in the guest that communicates with the “real” mouse driver on your host and moves the guest mouse pointer accordingly. You will only have one mouse pointer… (VirtualBox documentation)
- Dynamically change the screen resolution based on the size of the guest OS window.
- Shared folders
- Shared clipboard
- Seamless mode (see below)
You can run your guest OS in three modes.
- As a window of your host OS
In full screen mode, where it appears you are running the guest OS only. Your host OS does not show through anywhere.
In Seamless mode. This is perhaps the most powerful of the three. In seamless mode, each Windows app appears to be running within OS X. You even get the Windows
taskbar on the screen along with Mac dock and menubar.
When shutting down your guest OS, you have several options including saving the state of the virtual machine, so that when you start it up the next time, you’re right back where you left off. It’s like sleep or hibernate mode. Very convenient.
As I’ve said, I have used Parallels to run Windows inside OS X and, to be honest, I prefer the free, open source VirtualBox to the $80 Parallels. There’s not much Parallels can do that VirtualBox can’t. In fact, I haven’t yet found one thing that I miss from Parallels. Windows XP runs quite fast inside the virtual machine. Vista runs a little slower, but that is probably just a memory issue. If you have 3 or 4 gigs then you have enough to allocate 1.5 to 2 to Vista, which should make things run much more smoothly.
- Back up your virtual harddrive. Once you’ve got your guest OS set up the way you like it with all your software installed and OS updates done, then back it up either somewhere else on your harddrive or on another harddrive or if it’s small enough, to a DVD. If you ever get some malware on your guest OS that you can’t get rid of, just delete it and use a copy of your backed up copy.
If you hope to keep the guest OS running smoothly for a long time, treat it as you would a regular computer. Install antivirus and anti-malware tools.
My recommendation: before shelling out for VMware or Parallels, give VirtualBox a try. You’ll probably love it and save yourself a wad of dough.
Do you use virtualization software? Which one? Why? How? Let us know in the comments.