MacOS X on VirtualBox
Friday, November 5th, 2010
I’ve been trying to get MacOS X working on VirtualBox for a while now, and it never worked due to some ACPI problems. The latest versions of VirtualBox have added MacOS X Server as a guest possibility, and it also seems to have fixed some problems with running the normal Mac OS X.
I got this working on the following hardware/software. If your hardware/software differs, your mileage may vary:
- CPU: Intel Pentium(R) Dual-Core CPU E5300 @ 2.60GHz
- Videocard: Intel Corporation 4 Series Chipset Integrated Graphics Controller (rev 03) (Some Intel integrated piece of crap).
- Ubuntu GNU/Linux v10.04
- VirtualBox v3.2 (important)
Here are the instructions:
- First, you’ll need to get get MacOS X. I used a pre-made illegal VMWare image I got from here. (I’m sure Apple’s legal team will be on my neck soon, but fuck it).
- Second, you need the latest VirtualBox. I’m using the Non-OSI v3.2.10. You can get it from the VirtualBox download page.
- Now, add a new VirtualBox guest and select ‘MacOS X‘ as the Operating System and either ‘Mac OS X Server’ or ‘Mac OS X Server (64 bits)’ as the version. I’m not quite sure it works on 32 bits host processors/operating systems, but it does work on 64 bits hosts.
- You need at least 1024 Mb of memory. Less will NOT work
- For the Virtual Hard Disk add the Mac OS X vmdk image as a harddisk
Okay, now you’ll have to through the settings and match them to the following settings:
The rest of the settings do not seem to matter, at least for getting MacOS X to boot succefully. To recap:
- Enable IO APIC must be ON.
- Enable absolute pointing device must be ON.
- You must enable only ONE SINGLE CPU. Mac OS X will not boot on VirtualBox with two or more CPUs
- Enable PAE/NX must be ON.
- Enable VT-x/AMD-v must be ON. This also means your hardware must support it. For Linux users, run the following command to check if your hardware has support for virtualisation enhancements:
grep "vm" /proc/cpuinfo.
You should see one or more of these lines:
flags : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm xsave lahf_lm tpr_shadow vnmi flexpriority
If it’s not there, but you have a recent CPU, you may have to enable VT-x in your BIOS
- Enable nested paging must be OFF
- Enable 3D acceleration must be ON. This also means your hardware AND host operating system has to have support for 3D acceleration. Linux users can use the ‘glxgears‘ and ‘glxinfo‘ commands to see if 3D acceleration is working correctly.
- Virtual Storage must use a SATA controller of the AHCI type, and must NOT use host I/O cache
IMPORTANT: You MAY have to boot Mac OS X with the -v boot option. Directly after starting up the Virtual Machine, hit enter and at the boot: prompt, enter -v. I had to do this the first time to get Mac OS X successfully booted. After the first successful boot, it doesn’t seem necessary anymore. Safe-mode may also help in case of problems.
The Mac OS X image I linked to at the top of this post has its language set to Russian. Here’s a nice blog post about how to change it, including screenshots.