Ads Below Tabs

February 8, 2012

How to install a Snow Leopard Hackintosh in Virtualbox

We've already covered how to run a Mac OS X virtual machine with VMWare Fusion on your Hackintosh, but that tutorial won't do you much good if you haven't installed Mac OS X on your PC yet. If you need help deciding whether to make that leap of faith, then you can try installing Mac OS X Snow Leopard on Virtualbox, instead. Virtualbox is a virtualization suite that works for Windows-- installing Mac OS X on a virtual machine in Windows before doing it on your actual computer is great practice, and it gives you a chance to determine whether you'd actually prefer OS X over Windows. Read past the break for a full tutorial.

NOTE: The following guide is for installing Mac OS X Snow Leopard only, because it uses the same method that I use for my standard Snow Leopard installation guide.

For this virtual machine, we're going to use Virtualbox, which is a free and open-source virtualization suite.  Installing OS X with Virtualbox on Windows is more difficult than doing it with VMWare Fusion in OS X, because Windows virtualization programs do not "officially" support Mac OS X. You will not be able to enable full graphics support, for instance. This tutorial should only be taken as a proof of concept.



Computer Requirements
You need a computer with Windows to run Mac OSX on Windows (of course). You will need at least 4 GB of RAM and a dual-core (two core) processor or better. Personally, the computer I was using for this had a 4-core processor and 12 GB RAM, which is way more than enough. You also need about 10 GB of unused hard drive space.

Right click on "My Computer" on your desktop and click "Properties" to check the stats on your computer. If it doesn't directly tell you how many cores your processor has, look up your processor model on Wikipedia or Google. You also to note remember whether your processor is "Intel" or "AMD". This guide does not cover AMD processors, as they make Mac OS X more difficult to set up.

General Requirements
In addition to a good computer that uses an Intel processor, you need these following three things to run Mac OS X on Windows.

  • Virtualbox : This virtualization suite is free (unlike VMWare), and though it doesn't offer official support for Mac OS X, it works well enough.
  • iBoot and Multibeast : You need tonymacx86's boot CD to boot the Mac OS X installer, and Multibeast to enable Virtualbox to boot OS X without iBoot later on. Technically, any boot CD for Mac OS X will work, and you don't need Multibeast to install Chameleon (the main componen of Easybeast), but we'll use tonymacx86's tools for the sake of convenience. As usual, you have to register on tonymacx86.com to download these tools.
  • Mac OS X Snow Leopard installation DVD ($20): The method used by this guide requires the retail DVD for Mac OS X Snow Leopard. 

Step 1: Prep
Download Virtualbox, install it, and open it up. Also, if you want to be able to view USB devices from your Mac OS X Snow Leopard virtual machine, download the Virtualbox Extension Pack and run it before going to Step 2.

You also need to download the .iso file for iBoot.

Step 2: Create a new virtual machine
Virtualbox lets you run Mac OSX within Windows by creating a virtual machine, which is a program that simulates a normal computer.  To create a virtual machine, open up Virtualbox and click "New" on the upper left. Give your new virtual machine a name, and choose "Mac OS X" for the OS Type.

I recommend assigning at least 2 GB of RAM to the virtual machine, but you can assign as little as 1024 MB of RAM. Every time you turn on Mac OS X, that RAM that you assign here will be used to run the virtual machine. The RAM will be given back to your normal computer after you turn Virtualbox off.

You'll need to create a new hard disk for the virtual machine. Virtualbox will ask you what type of disk you want to create: VDI, VDMK, or VHD. VDI is the original format for Virtualbox, while VDMK is the format used by VMWare. If you're considering getting a copy of VMWare, you might want to choose VDMK. Otherwise, just choose VDI. I recommend creating a dynamically expanding disk; the only other option, fixed-size storage, will eat up your hard drive.

Step 3: Give your new virtual machine an operating system.
Your virtual machine will now be created. But don't stop now--you still need to change a few settings before your machine will actually work. Your new virtual machine will show up on the left column of the Virtualbox start page.  Select your Mac OS X virtual machine (single-click) from the main page of Virtualbox, and open up the virtual machine settings. Once the settings open up, go to "System" and uncheck the "Enable EFI" box. This is by far the most important single setting that you will need to change.

EFI, which stands for Extended Firmware Interface, is a feature that helps operating systems start up. Unfortunately, Mac OSX requires 'speshul' EFI, so the EFI that Virtualbox uses doesn't work.

In addition, make sure that "Enable IO APIC" is checked. Then, click on the "Acceleration" tab and check both of the options there. I'm not sure whether these options actually matter (EFI is definitely the most important variable), but it's better safe than sorry.

Once you're done with that, go to the settings for "Storage". In the storage tree box, you'll see a CD icon labeled "Empty". Click on it and click "Choose a virtual CD/DVD disk file". In the window that pops up, choose the .iso copy of iBoot.

Step 4: Start it up!
Start up your virtual machine. You should come up to a screen with the tonymacx86 apple on top.

Insert your retail Snow Leopard DVD into your computer's DVD drive. On the bottom right of the Virtualbox window, there will be a small CD icon. This is your virtual CD drive. Right-click on the CD icon, and switch the virtual drive from your copy of iBoot to your actual DVD drive (with the Snow Leopard DVD in it).

Then press "F5" to refresh the iBoot menu, so that it can detect the new installation disk. Once iBoot detects the disk, press the enter/return key on your keyboard to start up the OS X installation. The installation screen will come up in a few minutes. You will eventually come up to a page that asks you for a "destination" for your Mac install. Oh no, the page is blank! We'll have to fix that. To do this, start up Disk Utility (located under the Utilities menu in the top bar).

You need to use Disk Utility to erase your hard drive so that OS X can install itself on it. Partition the drive if you want (OS X cannot boot from a partition that's larger than 1 TB in size, so keep that in mind when partitioning). Then erase the drive/partition that you intend to install OS X on.

On the installation page for Mac OSX, the hard disk/disk partition should now be showing up. Select it and continue to the Install Summary page. Click the "Customize" button on the bottom left of the Install Summary screen, and uncheck additional options to speed up the process.

Install OS X. The process takes me 20-30 minutes. Once done, the computer will reboot. Right-click on the small CD icon in the bottom right of the Virtualbox window again, and switch back to iBoot. The iBoot menu (with the tonymacx86 apple at the top) will show up again. Choose your new Snow Leopard installation from the iBoot menu, and press Enter to boot it up.


Step 5: Install Easybeast with Multibeast
By default, your ethernet (internet) and sound should work in your Snow Leopard virtual machine. Open Safari and download Multibeast Snow Leopard edition. Open Multibeast, and install Easybeast. You can now boot your virtual machine without having to switch your virtual CD drive to iBoot every time.


Step 6: Make the screen bigger
Though this step is optional, I still recommend you do it anyways. Anyways, when you first use your Mac OS X, you'll probably notice one thing: your screen resolution is 1024x768. Since Virtualbox doesn't "technically" support Mac OS X, there's no official way to change this. But here's how you can change it anyways:

Open up Finder and go to the folder "Extra" in the main hard drive, and open the file org.Chameleon.boot.plist. Between <dict> and </dict> in the file, insert the following line.

<key>Graphics Mode</key>
<string>1920x1080x32</string>

You can change "1920x1080x32" to whatever resolution best fits your monitor. For instance, if you want to use the 1600x900 resolution, type in "1600x900x32". 

However, Snow Leopard won't let you save your changes normally, since "org.Chameleon.boot.plist" is a system-protected file. Instead, you'll have to save a new version of this file to somewhere random (like the Desktop of Mac OS X, for instance). Then, delete the old version of org.Chameleon.boot.plist, and replace it with the new version that you have edited. Once that's done, turn off the virtual machine.

Next, open the Command Prompt in Windows (make sure you are logged into an Administrator account on Windows). You can do this by opening the Start Menu, and typing "command prompt" into the Start Menu search bar. Then, type the following command into the Command Prompt.

cd "C:\Program Files\Oracle\Virtualbox"

This command will change the focus of the Command Prompt to the program folder for Virtualbox (if you installed Virtualbox somewhere different, then change the command to wherever you installed it). Next, type in this command:

vboxmanage setextradata "Name of virtual machine" "CustomVideoMode1" "1920x1080x32"

This command activates "vboxmanage", a command-line program included with Virtualbox that allows you to edit the properties of your virtual machine, including its built-in resolutions. Replace "Name of virtual machine" with the name of your virtual machine-- you can find the name of your virtual machine in the left pane of the Virtualbox main window (in the screenshot below, my virtual machine is named "Mountain Mac 2"). Replace "1920x1080x32" with whatever resolution you're using.

Once that's done, start your virtual machine again. It will now boot in full resolution. Congrats!


Step 7: Turn off updates.
First, an important note: DO NOT UPDATE NORMALLY. This is a golden rule of Hackintoshing, and it applies to virtual machines running Mac OS X too.

Anyways, Mac OS X is set to automatically update itself. This is bad. To turn off automatic updates, click on the Apple icon in the upper left hand corner of Mac OS X, go to System Preferences, and then click on "Software Update". Uncheck the box that says "Check for Updates".


Step 8: Updating your virtual machine
So, maybe you don't want your virtual machine to be stuck on Mac OSX version 10.6.3 forever. Well lucky for you, it's possible for you to update Mac OS X without it exploding.

First, download the combo update for the version of Mac OSX that you want. Unlike normal updates from the Software Update utility (that you should have turned off in Step 9), a combo update is installed manually. If you want to update your virtual machine to Mac OSX version 10.6.6, just search "10.6.6 combo update" on Google. The official combo update from Apple is literally the first search result.

Download the update. This will take a while, since most of the combo updates are massive. Once you're done, click "Machine" on the top of your Virtualbox window, and "Take Snapshot". Basically, this saves your machine's current state, so if you accidentally make Mac OS X blow up while updating, you can just restore it to your previous state.


After you've taken a snapshot of your machine's current state, run the update. This will take another 20-30 minutes. Once the update finishes and asks you to restart your virtual machine, DON'T RESTART.

Instead, open the web browser in your Mac OS X virtual machine, and download the legacy kernel for the version of Mac OSX that you're updating to. If you're updating your virtual machine to Mac OSX version 10.6.6, search "10.6.6 legacy kernel" in Google. Look for a legacy kernel by "nawcom".

All of the legacy kernels are available on nawcom's blog, but like most blogs, the organization is terrible. It's easier just to Google his stuff.

Once you've found the correct legacy kernel, install it. Then you can restart your computer to complete the system update.


If everything went right, your virtual machine should still be able to boot. Hooray! :D Plus, Mac OS X will have been updated.

Recap
Installing Mac OS X on a virtual machine is excellent practice for the real thing: installing Mac OS X on your actual computer. Don't get too comfortable, though. Compared to most computers, Virtualbox virtual machines are very "vanilla", meaning that they're very compatible with Mac OS X from the start. After all, sound and ethernet work from the start. You can't count on being that lucky with a real PC.

And even if you don't plan on doing this for real, with a Hackintosh, it's still a really cool thing to try out over the weekend.

SEE ALSO: How to install Mac OS X Lion in Virtualbox