Filed under: OS, Software, Switchers, How-tos, Open Source, TUAW Labs
TUAW Labs: VirtualBox
Running other operating systems on a Mac is nothing new, and with the advent of Intel-based Macs we've seen a flood of virtual machine software: Parallels Desktop for Mac, VMWare Fusion, and Codeweavers CrossOver Mac. These products enable you to run Mac OS X and another operating system simultaneously.For many of my consulting clients who are switching from PCs and who already have a licensed copy of Microsoft Windows, I've been using Sun's Open Source xVM VirtualBox product. Why? xVM VirtualBox works very well and it's free.
If you're new to virtual machines and want to know how to do this, follow along as I set up a Windows Vista virtual machine on an "old" 2GHz Intel Core Duo 20" iMac.
This post is continued after the break.
To begin setting up a virtual machine on your Mac, you need to download xVM VirtualBox. Head over to virtualbox.org, read all about this Open Source project, and then download your copy of xVM VirtualBox for Mac OS X from the download page (see below):

Once you've downloaded the app, install it on your Mac, then get ready to build your virtual machine. Launch VirtualBox (see below), then click the New button in the upper left portion of the application window to launch the New Virtual Machine Wizard.

Click Next, and then give your Virtual Machine a name (below). For obvious reasons, I'm calling mine "Vista." Select the OS Type from the pull-down -- you have a choice of 34 operating systems you can create virtual machines for, including such favorites as DOS, OS/2 Warp, Netware, and Sun's own Open Solaris. Click Next again.

As you can see below, now you need to select how much of your precious RAM you want to give up for the virtual machine. Most modern OS's run better with more RAM, so I'm going to give Vista a full 1 GB to play with. Once you have set the slider to your RAM amount or typed in the amount of RAM in MB, click Next.

It's time to select a hard disk image to be used as the virtual machine boot disk. If you're creating a new virtual machine from scratch like I am, just click the New button. Poof! A new wizard appears:

This is the Create New Virtual Disk wizard. Click Next.

Like many of the other virtual machine tools for Mac OS X, VirtualBox can build either dynamically expanding images that grow along with your virtual machine, or static images that keep their original size. Here I'm going to choose to have a dynamically expanding image. Clicking Next, I'm asked for the name and initial size of the disk image.

I keep the name Vista for my image name, and I'm selecting a 20 GB initial image size. I've also chosen to store this on my 1 TB external hard disk. After validating my settings, I click the Finish button to create the virtual disk image.

Now I'm back to the Create New Virtual Machine wizard with my new virtual disk image selected. Once again, I need to validate my settings, and then I click Finish to start loading my new virtual machine.

As you can see in the screenshot above, the virtual machine is powered off and the CD/DVD-ROM drive is disabled. I'll pop into the settings on my virtual machine and change the initial boot order to CD/DVD-ROM (so it loads Vista from the installation DVD), then Hard Disk. I'll also mount my Mac's SuperDrive so the virtual machine becomes aware of it. With that done, it's time to power up the virtual machine the first time. To do this, I click the Start button.

Whooops! One more screen to look at (see screenshot above). VirtualBox wants me to know that I'm going to be giving over control of my Mac keyboard to the virtual machine while it's running, and that I'll have to press the left Command key to get control back. I acknowledge this message, and then Vista begins to load.
It actually shows me a boring black screen initially, but then a configuration screen appears. I select the language, time and currency formats, and keyboard or input method, and then click the Next button. When the next screen appears, I click the Install Now button.

As you can see in the screenshot above, you must have a properly licensed version of most operating systems in order to install them. Here, Vista is asking me for the 25-character Product Key that will activate the OS. I type it in, then click the Next button.
I accept the license terms for Vista, then click Next. I am asked if I want to do an upgrade or custom install of Vista -- if it's a new install, I can only do a custom install. Once I've selected custom, I need to select my virtual drive image as the target for the installation (as seen below), and then click Next.

The installation is on its way! The SuperDrive starts spinning like a madman at this point, and the Vista installer (below) shows that progress is being made.

After a while (I think it took about 30 minutes in my case), the installation is complete and you just need to create a user name, enter a password, and then choose a desktop background and computer name:

Vista then asks you to set up security tools, and you can then set your time zone and the current time. A click or two later you're using Vista in a new virtual machine.
Vista does a quick check to see what kind of performance your computer has so it can determine what sorts of goodies to deliver for you. On my first boot, I noticed that I had no sound and no network connection with my virtual machine, so I shut it down, went into the setting for the virtual machine, enabled sound, and changed the network adapter to an Intel model so it would work with Vista. On the second boot, I had sound, a network connection, and I was able to then download my browser of choice (Firefox 3.0.1) and set the home page to a good starting point (see below).

Windows Vista found a few new drivers for me to install, some of which were recommended by the xVM VirtualBox team. All in all, the setup and operation of xVM is as easy and fast as either Parallels Workstation or VMWare Fusion, both of which I've used extensively. In terms of performance, I did not run any benchmarks but it seems slightly faster than a Vista virtual machine running in VMWare Fusion 1.1.2.
While vMX VirtualBox may not have all of the special features that you see in Parallels or VMWare Fusion (i.e., the ability to use Boot Camp partitions, Unity or Coherence modes, etc...), it has several great features -- it's free, it's stable, and it has a small footprint. How small? The application is only 55.6 MB in size, compared to 132.1 MB for VMWare Fusion and 77.9 MB for the Parallels Desktop folder (the actual Parallels application is only 24.1 MB, making it the tiniest footprint of them all).
I'm sure that our readers have plenty of opinions about which virtual machine environment is the best, so be sure to leave a comment and let the battles begin!
Thanks to Matt Emmi and Tony Walla for their input on application size.
Get a WordPress.com Blog
![TUAW [Cafepress]](http://www.blogsmithmedia.com/www.tuaw.com/media/tuaw-cafepress-promo.png)


Reader Comments (Page 1 of 1)
cadml said 8:31AM on 7-21-2008
I thought it did have a feature comparable to Unity/Coherence, i think its called seamless mode.
Reply
RobK said 8:40AM on 7-21-2008
You forgot to mention that there are TWO versions of Virtualbox -- the Open Source version and the more Proprietary closed source version.
Most readers of TUAW will probably want the more proprietary closed source version which includes support for USB and some other features. It is only provided in binary form. But note the license for the more proprietary version prohibits you from using it for commercial or business use. If you want to use the proprietary version for commercial/business use, you must pay for a license. (If you are spending $$, I would also look at VMware Fusion and Parallels first!)
But the Open Source Version is FREE for all users (including businesses). But is lacks certain features like USB support. It is only provided in Source Code form. You also must compile it (which is NOT hard). Google "VirtualBox mac compile".
Reply
RobK said 8:45AM on 7-21-2008
I am not sure if I was entirely clear. The more proprietary closed source version of Virtualbox is FREE for non-commercial use. So if you are using Virtualbox for personal use at home, download the more proprietary closed source version which you can download for free from the Virtualbox website.
Guillaume said 8:47AM on 7-21-2008
Does VirtualBox allow Linux virtual machines to run Compiz/Fusion ?
Reply
Tony said 8:47AM on 7-21-2008
Also no 3d acceleration, so no games support... depends on what you want the VM for of course.
Reply
Rhywun said 11:28AM on 7-21-2008
Meh. Does any product offer game support?? I know they say they do, but in practice no game I have ever launched has worked. I don't play the "popular" games which get all the support.
Howard said 9:37AM on 7-21-2008
I've been thoroughly impressed with VirtualBox for the last couple weeks of use. Since I typically only need XP to review websites in IE, I don't need many bells and whistles. What made me a true convert was the speed and reliability of launching and loading into XP with my MacBook Pro. What takes less than a half minute in VirtualBox to fully launch a new session took several minutes with Parallels or VMware. Loading a suspended session takes literally 10-15 seconds in VirtualBox. This is a great improvement and time saver for me. Running IE is quick and responsive. I'd advise anyone frustrated with the overhead of the others to give VirtualBox a try.
Reply
Dave said 6:07PM on 7-21-2008
I've had basically the exact same experience. In fact, VB works so well that I removed my Boot Camp partition altogether. I don't play games on my MBP so it wasn't a big deal. VB runs fast and works extremely well for all the applications I use in it (IE, Firefox, MS Office).
roycifer said 9:24AM on 7-21-2008
i believe virtualbox has "seamless" mode which is similar to coherence (parallels) and unity (fusion).
Reply
Randy said 9:36AM on 7-21-2008
Very nice overview. While virtual Box is okay if you don't care about speed. With respect to performance, right now VMWare Fusion is the speed king with Parallels coming in Second.
Reply
Joshua Ochs said 9:53AM on 7-21-2008
Last time I tried VirtualBox (version 1.6), I couldn't get it to change resolution in Windows no matter what I did. Anyone know what I might have missed?
Reply
CharlesPickrell said 10:15AM on 7-21-2008
VirtualBox in my experience is faster than Parallels. Like Fusion, VirtualBox will use both of your CPU cores. Parallels only uses one core.
I think VirtualBox is extremely solid for an open source project. Anyone who needs to use productivity applications (MS Project, 2-D CAD, etc) that do not use 3-D will find VirtualBox to be ideal.
VirtualBox is also a great tool for testing builds of your software for use in multiple OSes.
If you find you cannot use "seamless" mode, change resolution or use audio, you have not installed the included drivers for VirtualBox. Read the instructions for driver installation.
Reply
Sabon said 11:51AM on 7-21-2008
Most Windows people I talk to Macs about are non techie and very frustrated with Windows but are afraid to jump totally to Mac.
They NEED something very simple to setup which includes NOT having to change any settings to make things work. This doesn't sound like this would be the correct virtual machine for them.
I'll keep on telling them about VMWare and Parallels because both can use the BootCamp partition which I think is the best and easiest way to install Windows with all the hardware working.
I do emphasize that they need anti-virus anytime they run Windows and that includes even on a Mac.
The feedback I'm getting from people after they used BootCamp with VMWare and Parallels is very good. They are scared of something new (virtual boxes) and it ends up being a lot easier than they ever imagined.
My answer is that they are too used to the way Microsoft makes things work. Meaning that is why they expect it to be so hard and find out the Apple way is a lot easier.
Most drop Windows within three months. The only ones that don't are people that need or feel they one or or two Windows apps. For the rest they are happier/much happier with OS X.
Reply
Krmby said 12:17PM on 7-21-2008
Codeweavers CrossOver Mac is not a virtual machine software. It's a native application layer to support windows software in Mac OS X platform.
Reply
willyboyd said 12:36PM on 7-21-2008
Another thing VirtualBox doesn't do, at least last time I checked it out, is support bridge mode networking between host and guest. You can only network the guests using NAT when the host is OSX. This makes it a little more troublesome when you're trying to run a guest web server or other network service. (With bridge mode the guest would show up and just another fully accessible computer on your LAN, vs. being "hidden" behind the host machine's NAT layer).
Reply
Aladin said 4:01PM on 7-21-2008
I gave VB try also. I had a problem at the beginning. VM seem sluggish compare to others. I reinstalled VB and even W2k 3 times. Afterwards I realized that switching VM (w2k) to 16 bit color mode caused the slow down. Puling my hairs I relaxed :-) afterwards.
In other respect I'm very satisfied with VB. I did not plan to use it for home needs but found that there is no free Intel native/compatible WYSIWYG HTML editor so my only option is to run NVU/Kompozer under Windows. Disaster but rescue either. Seamonkey is not capable of CSS. I just jumped from G3 equipped 7500 to intel mini and it was shock for me that I lost Kompozer. App I depend on.
Otherwise I can agree here that people are so used MS way of doing things and their our habits that it is some time hard to learn things that would make life easier for them. Just basic shortcuts that were not common on windows side for some time can be problem. But it is platform wide problem that people are so used to hunt mouse around all the time that even hitting Enter for OK button is problem to get used.
Reply
shawn s. said 7:26PM on 7-21-2008
is anyone one having problems once you d/l the disk image? I can unzip it, but then when i double click the disk image it says no valid filesystem.
Reply
Christopher said 6:50AM on 7-22-2008
I got the same error about no valid filesystem in the VirtualBox .dmg file. Seems to be a problem with Safari and downloading it somehow corrupts it. I used camino to download it and it opens fine. You can find Camino at http://caminobrowser.org/
Hope this helps!