http://www.macbreaker.com/2014/05/os-x-mavericks-in-virtualbox-with-niresh.html
We've previously shown you how to install OS X Mountain Lion on a virtual machine by using iAtkos ML2, which is great practice for installing Mac OS X on your actual computer. And now that Apple has released OS X Mavericks, it's only fitting that we show you how to install Mavericks in a virtual machine as well. Unlike in previous versions of this guide, we'll be using the newly-popular "Niresh" distro of Mavericks instead the old iAtkos distro (which is no longer publicly available for free). While we've already shown you how to install Mavericks on your actual computer with Niresh, it also works great with virtual machines.
- Virtualbox : This virtualization suite is free, and though it doesn't offer official support for Mac OS X, it works well enough.
- Niresh Mavericks: Unfortunately, the standard "Unibeast" method for installing OS X Mavericks on PCs (which uses an official copy of the Mavericks installer) doesn't work with Virtualbox. Instead, you'll have to pirated "distros" of Mac OS X such as Niresh, which is now the most popular distro for Mavericks.
You will need to use a bittorrent client to download the disk image file, which is a little less than 6 GB in size. On the Niresh website, you'll be given an option to either download the "ISO Version" or the "USB version" of "Niresh - 10.9 - Mavericks". Download the ISO version-- the USB version (which is an Apple DMG file) doesn't appear to work in Virtualbox.
Step 1: Prep
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 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.
NOTE 1: If your computer uses an AMD processor, you will have to type the boot flag "amd" or "amd64" (without quotation marks)-- which flag you need depends on your specific processor, so test one flag at a time. Type the boot flag "amdfx" (also without quotation marks) if your AMD processor has "FX" in its model name.
NOTE 2: Virtualbox may have problems booting Mac OS X if your computer uses an Intel Haswell processor (i.e. if your computer was built/bought in 2013 or later). If this is this case, you will have to trick Virtualbox into thinking that your processor is actually an older model. To do this, 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 modifyvm <Name of virtual machine> --cpuidset 00000001 000306a9 00020800 80000201 178bfbff
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 (no quotation marks)-- you can find the name of your virtual machine in the left pane of the Virtualbox main window. This command should do the trick. - Source
After you press the "enter" key, wait a few seconds, and the virtual machine will automatically start the Mac OS X installer. (This startup process may take a few minutes.) Eventually, you will reach the welcome page of the installer.
Continue, and you will 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).
On the installation summary page for Mac OSX, the Virtualbox hard disk should now be showing up. Click the "Customize" button on the lower left-hand corner of the summary page. This is where using a distro becomes really useful: Niresh allows you to install extra Hackintosh drivers and kexts, straight from the OS X Mavericks installer.
The default selection will enable Mac OS X to boot from the virtual machine without any assistance. The are only two things you need to change:
- Uncheck Install Network Drivers (Kexts). This option is checked by default. Normally, it will allow Niresh to automatically detect your computer's ethernet controller and install the appropriate ethernet kext, so that your internet will work immediately in Mac OS X. However, this feature doesn't really work in Virtualbox. All it does is break the internet in your virtual machine.
- Uncheck Graphics -> GraphicsEnabler=Yes. This option is also checked by default. Normally, it allows Mac OS X to work better with your computer's graphics card. However, Virtualbox doesn't support Mac OS X graphics anyways, so this option is essentially pointless for virtual machines. All it does is decrease the default screen size of your virtual machine from 1280x1024 to 1024x768.
Step 5: Boot it up
Restart your virtual machine, and eject Niresh from your virtual DVD drive. To eject Niresh, right-click on the CD icon at the bottom right of the Virtualbox window, and un-check the Niresh file (probably named "OSX-Mavericks.iso"). Your mouse cursor will probably be trapped inside the virtual machine. Press the right "Ctrl" key on your keyboard to allow your mouse to escape.
After ejecting Niresh, restart your virtual machine again. Now, at the bootup screen, you'll see an icon for the hard drive where you installed Mavericks (also, the screen of your virtual machine might be bigger than before).
This concludes the first part of the guide. You'll have to wait a few minutes for Niresh to finish installing its extra kexts and drivers, but after that, audio and ethernet should both work automatically. However, you're not done yet! You still have to enable increase the screen resolution of your virtual machine, which is probably still stuck at 1280x1024 (or even 1024x768).
NOTE: One common issue with Niresh is that it tends to lag out of the account creation process, and skip straight to the Mac OS X login screen before you can make your own account. If this happens, simply log into Mac OS X with the following credentials:
Username: root
Password: niresh
This will log you into the "root" account of Mac OS X. From here, open the System Preferences app, go to "Users & Groups", and create your own account. (We don't recommend that you use the root account permanently, because it is insecure.)
Though this step is optional, I still recommend you do it anyways. Anyways, when you first use your virtual machine, you'll probably notice one thing: your screen resolution is 1280x1024 (or 1024x768 if you forgot to turn off GraphicsEnabler=Yes). 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.
First, you need to access org.Chameleon.boot.plist, the settings file for your virtual machine's Mac OS X bootloader. You can do this from Finder, the file browser built into Mac OS X. However, Finder hides your hard drives in Mavericks by default. To unhide them, open Finder, and click on File -> Preferences in the menu bar at the top of Mac OS X. Under the "Sidebar" settings, check "Hard disks", so that Finder will display your virtual machine's hard disks in the sidebar.
Next, turn off your virtual machine. 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.
Press the enter key to submit the command. Once that's done, start your virtual machine again. Your virtual machine will now boot Mavericks in full resolution. Congrats!
I'll just repeat what I said in my other two Virtualbox guides. 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. 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.