Running Windows on Your Mac With VirtualBox

Every computer needs an operating system to operate, just like we humans need our brains to function. Unlike us, computers can have more than one brain, running multiple operating systems at the same time. Virtualization is the process of concurrently running another (fully functional) operating system over the main OS X installation.

The great advantage of a virtual machine is that your original system is untouched – you can operate or remove a Windows installation without causing any harm to OS X. This how-to will walk you through the process of setting up Windows on your Mac using the free VirtualBox application.

It’s a simple process, requiring an Intel Mac with at least 512MB RAM and a copy of Windows – we’ve used XP, but any version will do. Without further ado, let’s get started!

If you wonder what all this fuss is about, let see how a virtualization solution can save you a huge amount of time while keeping your beloved Mac running smoothly. Here is a list of several common scenarios requiring the use of a virtual OS:

  1. Running Windows-only applications on your Mac (like CAD, scientific, or business software)
  2. Running the latest PC games on your Mac
  3. Testing a website in Internet Explorer
  4. Testing and tweaking different UNIX-based and Windows-based systems
  5. Tinkering with the latest beta of an OS

Example: Suppose you have a MacBook that runs OS 10.5 (Leopard). Now you want to run the PeachTree accounting package to catch up with what your accountant is doing. All you need is to install a Windows virtual machine – you don’t need to have a secondary system for this purpose, excited?

What is VirtualBox?

There are three major virtual PC software packages for Mac users;

They are all great pieces of software and offer similar features, with a few differences here and there. Another option is to utilize Boot Camp built into OS X, although this requires to actually boot into your Windows installation and it isn’t possible to run it concurrently with Leopard.

Choosing between them is a personal choice based on specific features, but the major factor that differentiates VirtualBox here is its price – free! Being free doesn’t make VirtualBox weaker or useless in the competition. It is quite suitable and powerful enough for home and business users dabbling in another OS. Also knowing that Innotech (the original company behind VirtualBox) was acquired by Sun Microsystems recently, shows there is now significant development behind it.

What you need

All you need is an Intel-based Mac with 512MB of RAM (1GB or more memory is highly recommended). As of VirtualBox 2.1.2 (the latest version at the time of writing this article), you need around 30MB of hard disk space for installing VirtualBox itself and you should allocate at least 5GB-10GB for every virtual machine you install.


  1. To install VirtualBox, first we need to download the latest version. Log on to the download page and find the link for Intel Macs.
  2. Mount the DMG and open it. Now run (double click) “VirtualBox.mpkg”. Follow the instructions until you finish the installation.
  3. After a successful installation, run VirtualBox from “Applications”. It is good idea to drag the icon and drop it on the Dock if you are planning to use it regularly.

Running Virtual Box

Before you can actually do anything productive with VirtualBox, you need to setup an operating system on it. Since most of you will be interested in Windows, this article example is going to show you how to setup Windows XP.

For a regular user, running Windows XP is recommended over Vista because of the faster and lighter nature of XP. Remember that Virtual PCs use a lot of system resources and you don’t need to make it slower with the slightly more resource hungry Vista. However, all versions of Windows can work perfectly fine on VirtualBox.

Setting up Windows XP

Installing Windows XP on VirtualBox is easier (and faster!) than setting it up on a real computer! All you need is a Windows XP CD, either Home or Professional edition. You can install the service pack (version 3 is the current) and other software after finishing the Windows setup.

After running VirtualBox, click on “New” on the toolbar. “Create New Virtual Machine” wizard opens. Click on “Next”.

Creating a new virtual machine

Creating a new virtual machine

  1. In the “Memory” page set the RAM to 256 or more if you wish. Be careful not to go more than 25% to 30% of your system RAM because it makes OS X slower.
  2. In the next page, type “Windows XP” (or any other meaningful name) and choose “Windows XP” form OS type drop down. Press “Next” to continue.
  3. To setup Windows you need to create a virtual hard disk. Click on “New” to open the hard disk creation wizard.
  4. Select “Dynamically expanding image” as virtual disk image type. This helps saving disk space as it grows according to the requirements.
  5. Leave the virtual disk “Location” and “Size” as it is in the next page.
  6. In the “Summary” page press “Finish” to apply the changes.

You can see that a new OS is added to the list in VirtualBox main window and the status is “Powered Off”. Just press “Start” on the toolbar (or select it from the context menu) to run the virtual machine for the very first time.

  1. The “First Run Wizard” shows right after you started the virtual machine. Press “Next” to start.
  2. In the “Select Installation Media” page choose the proper media from which you want to install Windows. It is usually the DVD drive that you have already put the Windows CD in it. In case you have an ISO file you can skip burning it on the CD and directly select it as the installation media.
  3. Selecting boot and installation options

    Selecting boot and installation options

  4. After selecting the proper media, pass the summary by pressing “Finish”. The system will boot immediately.
  5. You will see that the Windows setup (that old text-based blue screen!) shows up and you can continue with standard setup routine. It could take several minutes, so be patient and get a cup of green tea!

Post Installation Tasks

Guest Additions

After finishing the Windows installation, you need to first install the “Guest Additions”. If you remember, the Windows virtual machine that you just finished installing is a guest machine and needs some extra software to work perfectly within OS X.

Guest Additions consist of device drivers and system applications for the guest operating system that optimize the guest for better performance and usability. To make it short, it is an ISO image (/Applications/ that needs to be mounted and installed.

  1. Run the XP machine.
  2. Click on “Devices > Install Guest Additions”.
  3. Continue with the setup wizard (runs inside XP) and reboot the system when prompted.

If the setup did not start for any reason, it might be that the ISO image is not properly mounted. To solve this issue go to “Devices > Mount CD/DVD-ROM > CD/DVD-ROM Image…” and add the ISO image to the list. If it is already there, try removing and adding it again.

Adding Virtual Box extras

Adding Virtual Box extras

Enabling Sound and USB Support

What would be the life without sound and a USB connection? Miserable for sure! For technical reasons both sound and USB are disabled by default and you need to enable them after installing a guest OS.

  1. Shut down the XP machine if it is running. This is a standard Windows shutdown. Alternatively you can just close the window and select the proper option to stop the guest.
  2. Click on “Settings” on the toolbar
  3. In the “Audio” tab, check “Enable Audio” and select “Core Audio” as “Host Audio Driver”.
  4. In the “Ports” tab, check both “Enable USB Controller” and “Enable USB 2.0 (EHCI) Controller”.
  5. Press “OK” to apply the changes.

Next time you run Windows, you should be able to hear audio and access your USB devices. You may need to “Eject” a USB device from your Mac to enable it within the virtual machine.

Sharing files

One of the things that might come in handy is the ability to transfer files between the host and the guest. There are 2 ways to do that, “Shared Folders” and Windows networking. To enable file sharing:

  1. Make sure you have already installed the Guest Additions.
  2. In a running guest window, there is a folder icon down in the status bar. Click on the icon to open the “Folder Sharing” dialog box. You can also access to this from “Settings” if the guest is not running.
  3. Start creating a new shared folder by clicking on the plus icon on the right side of the dialog box.
  4. In “Add Share” dialog box, choose “Folder Path” (on your Mac). The “Folder Name” (on the virtual machine) is automatically named.
  5. Check if you need the folder to be permanent (maintains after shutting down the virtual machine) or to be read only (safer).
  6. Press “OK” to create the folder.
  7. Now open “My Computer” and try to open “\VBOXSVRYOUR_FOLDER”. If it did not work try to navigate to “Entire Network” and then to “Virtual Box Shared Folders”.

To enable networking:

Getting networking set up

Getting networking set up

  1. In Mac OS (the host), open “System Preferences” and then go to “Sharing”.
  2. Enable “File Sharing” in the Services.
  3. Press “Options” and check “Share files and folders using SMB”.
  4. Select the account(s) you want them to have access to SMB and enter the password for that particular account when prompted.
  5. Close System Preferences.
  6. In XP, in My Computer address bar, type in the IP address of your Mac (e.g. If you don’t know your IP address you can see it in the System Preferences, File Sharing.

Note: SMB is using SAMBA services to make sharing files between UNIX based systems (like Mac OS) and Windows possible.


Hopefully you should now be be all set up with a fully functioning Windows virtual machine for relatively little cost. There are still many tips and tricks in using VirtualBox to unleash its real power. You can read about these in the official documentation both online and bundled with the download.

I’m always impressed with VirtualBox as a free application, but do accept that Parallels and VMWare offer a more advanced feature set for their price (particularly with regard to graphical performance etc). I’d be interested to hear your thoughts on whether you use a virtualization system, along with the tasks which require you to move away from the comfort of OS X!