Trying to get OSX to work well in VirtualBox
Friday, February 12th, 2010 at 5:55 pmUpdate: This article is out of date. Virtualbox officially supports OSX nearly flawlessly under 3.2: native EFI booting, USB keyboard/mouse, networking, and sound (using a third party driver). The only thing missing is 3D acceleration support.
Now that VirtualBox 3.1.4 is out, I decided to try OSX. I would like to thank this thread on the VBox forums for a few hints on how to do this.
I am doing this on a Core 2 Duo. This should work on any processor that has at least SSE3.
These instructions are for people who are used to using VirtualBox.
You need:
- At least VirtualBox 3.1.4
- A Hackintosh ISO. I used iDeneb 1.6 Lite, which is based on OSX Leopard 10.5.8. Others may or may not work depending if they include the appropriate hacks.
Make a new virtual machine, set:
- Set it for FreeBSD
- With at least 1GB of memory
- And at least 10GB of HD space
Set the additional settings of:
- System->Motherboard->Enable IO APIC to on
- Do NOT enable EFI, it is not complete enough for OSX yet
- System->Processor->Processor(s) matching what you actually have
- System->Processor->Enable PAE/NX to on
- Display->Video->128MB of video memory, with 3D Acceleration enabled
- Storage->IDE Controller->Type set to ICH6
- Network->Adapter 1->Attached to Bridged Adapter, advanced->Intel PRO/1000 MT Desktop (NOT MT Server or T Server)
Exit VirtualBox, edit the XML definition for the machine. For me, and I named my machine OSX, this was under ~/.VirtualBox/Machines/OSX/OSX.xml. Add the line…
<ExtraDataItem name="VBoxInternal2/SupportExtHwProfile" value="on"/>
… inside the <ExtraData> block, and save it and restart VirtualBox.
Mount the iDeneb ISO inside your virtual machine, and start it up. Remember to press enter to start the CD on boot.
Use the disk utility to format your drive to HSF journaled. Select that drive in the installer and hit the customize button before installing.
Select the following options in the iDeneb OSx86 Components menu:
- Kernel->Qoopz
- Essential Patches->ACPI Fix
- Essential Patches->PS/2 Drivers->ApplePS2 Old
- Drivers->Chipset->ICHx Fixed
Now, just install. This takes about 20 minutes.
To get network working after boot, go into the client’s menu while running and do Devices->Network Adapters, uncheck Cable connected, hit okay, go back in, and check Cable connected. After that OSX will connect to the network, and you have to do this every time you boot.
Sound cannot be fixed at the current time: VirtualBox’s AC97 emulation supports a version of ICH AC97 too old for the popular third party AppleAC97Audio.kext to support. Hopefully VirtualBox will get a HDA emulation, which will improve chances of being emulated correctly.
2D speed seems to be pretty fast without specific drivers, although some operations will be noticeably slow. I wish there was a specific video driver for this.
It seems i can’t find the XML anywhere. What can i do?
I believe it’s at ~/VirtualBox VMs/x/x.vbox now.
where x is the virtual machine’s name.
I have aproblem when it boot it just loading …… and nothing after that
I’ve followed your instructions (and many others besides), and i alwasy have the same issue. trying a normal boot from the iso greets me with a hung apple logo, adding the -v verbose tag shows me it loading a couple of HFS+ volumes, then the screen goes black and that’s it.
Help please!
I wish I could fix that. Sometimes it just doesn’t work. Try using a popular hackintosh distro, they usually work on hardware OSX won’t, including Virtualbox versions with the new official support.
Boot with -s flag.
/sbin/fsck -fy /
/sbin/mount -uw
cd System
cd Library
cd Extensions
rm -rv NV*.*
rm -rv GeFo*.*
rm -rv ATI*.*
cd ..
rm -rv Extensions.mkext
reboot
Sorry, I meant rm -rf
You walk-through is amazing! Have you had any chance to experiment with SnowOSX with virtualbox? the one walkthrough I found was for virtualbox 3.1.2 (i’d like to stuck with 3.1.6 or anything after 3.1.4) and breaks every time no matter how many different ways I try it (I’m on attempt 20 something). Snow is required for iPhone sdk and I would be really interested to see how someone else approached the problem.
Oracle is planning on official OSX support sometime in the future. I suspect Snow Leopard will be supported then.
As it is, my walkthrough is largely a giant kludge.
Hey Logan, I have sucessfully installed Snow Leopard 10.6.3 on Virtualbox 3.2, but when I try to install the iPhone SDK 3.2 I get a error message stating that I should upgrade to 10.6.2. I am still trying to find a workaround for this, but if you have any information to share I’d be grateful, thanks
QUOTE: I set up the networking just like you say, but it doesn’t work.
u must “Sconnect” and the “Reconnect” LAN CABLE on VirtualBox Menu.
the disconnect/reconnect seems to allow the network to acquire an IP address from DHCP, but that’s about it. Can’t get it to see the default gateway.
Disconnect/reconnect makes it properly see the virtualized NIC’s plug state and the MAC address. OSX’s driver for that NIC is interacting weirdly with Virtualbox, and thats the only NIC both OSX and VirtualBox both support.
I’ve tried everything. NAT, Bridged… Network won’t work.
You need to use bridged for it to have unfettered access to the outside world.
I’ve had the same problem until I’ve tried BRIDGE, in name my actual net device, the one I use in windows. In ADVANCED I’ve used INTEL PRO/1000MT desktop (82540OEM) and marked CABLE CONNECTED. It works flawlessly, I don’t have to change anything at reboot. I hope this helps.
I set up the networking just like you say, but it doesn’t work.
This using iDeneb 10.5.5
Sometimes it also doesn’t work no matter how hard you try. Using OSX in Virtualbox is not foolproof.
After boot, it goes to the grey screen with the apple logo and hangs.
No joy.
Try rebooting it a few times. Also, try reinstalling and using different kernels. This process is, unfortunately, not fool proof.
I’ve had reports that i7/i5 users have had issues while AMD anything and Core 2 users haven’t.
I have i7 and I am using vodoo 9.5 kernel. It works.
Hi
Thanks for the guide. Where exactly is the “client’s” menu which has Devices -> Network Adapters. In Virtualbox, the Network settings are disabled. In Windows XP Device Manager, I don’t see an option to uncheck “cable connected”
Thanks
Its not in the OS. The window that shows the virtual machine’s display has a menu, thats the one I’m talking about.