For the unacquainted, distros are pirated copies of Mac OS X that have been modified to work with normal computers. Right now, using a distro is the only practical method for getting Mac OS X Lion to run a virtual machine in Windows.
To install Mac OS X Lion on a virtual machine, we're going to use Virtualbox, which is a free and open-source virtualization suite. It's important to note that Windows virtualization programs do not "officially" support Mac OS X, so you will not be able to enable full graphics support. This tutorial should only be taken as a proof of concept.
- Virtualbox : This virtualization suite is free, and though it doesn't offer official support for Mac OS X, it works well enough.
- iAtkos : This is a popular distro of Mac OS X Lion. I won't go into details, but you can download it from just about any bittorrent website by using a bittorrent client (it's about 4 GB in size). Unlike the retail version of Lion, you don't have to use a boot CD like iBoot to start the Mac OS X installer.
Step 1: Prep
Step 2: Create a new virtual machine.
If your version of Virtualbox asks you to choose between 64-bit and 32-bit, be sure to choose 64-bit. Choosing 32-bit will result in a critical "Guru Meditation" error later on.
I recommend assigning at least 4 GB of RAM to the virtual machine, but you can assign as little as 2 GB 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 or .dmg file for iAtkos (or whichever distro you downloaded).
Step 4: Install Mac OS X Lion
Step 5: 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>
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.
Step 6: 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".
I'll just repeat what I said in my Snow Leopard guide. 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 in the first place. After all, ethernet works 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.