How to run OSX in a VM on VirtualBox

osx_linux

Would it not be great to be able to run OSX on a virtual machine? Now you can*! All you need is a disk image of the retail DVD of “Apple Mac OSX Snow Leopard 10.6” and you can install it inside VirtualBox. Alternatively if you have a Mac (or know somebody who does) you can create a bootable image of (the free) “Apple Mac OSX Yosemite 10.10” and install that version. Instructions below.

Apple Mac OSX Snow Leopard 10.6

You need:

  1. VirtualBox 4
  2. ISO of retail DVD for “Apple Mac OSX Snow Leopard 10.6” (buy here)
  3. Follow instructions carefully

Open VirtualBox and create a virtual machine named “osx”. Then close the entire VirtualBox application and go to the command line. Run:

VBoxManage modifyvm osx --cpus 1
VBoxManage modifyvm osx --vram 128
VBoxManage setextradata osx VBoxInternal2/EfiGopMode 5
VBoxManage setextradata osx "VBoxInternal2/SmcDeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"

Open VirtualBox again and start the virtual machine. Mount “Apple Mac OSX 10.6 Snow Leopard Retail.iso” and install. After installation (30 minutes) the system will reboot and it is ready for use.

Apple Mac OSX Yosemite 10.10

You need:

  1. VirtualBox 4
  2. Bootable image of “Apple Mac OSX Yosemite 10.10” (using “iesd”)
  3. Follow instructions carefully

The latest version of Apple’s OSX can also be run under VirtualBox. Download it for free from the “Apple App Store”. You do need a Mac with a valid Apple-id for this. Make sure you have the “XCode Command-Line tools” installed on this Mac. Then run the following commands to convert the download into a bootable disk image:

gem install iesd
iesd -i /Applications/Install\ OS\ X\ Yosemite.app -o Desktop/yosemite.dmg -t BaseSystem

Move “yosemite.dmg” to your Virtualbox environment and use it instead of the Snow Leopard DVD image. Note that this image does support multiple CPUs, so this will allow you to speed things up.

*) Known issues

Here are the issues on the various platforms:

  • OSX 10.6 [Linux] can only be used with a single CPU
  • OSX 10.6 [Linux] sound is not working properly
  • OSX 10.10 [Linux] cannot login on Linux
  • OSX 10.10 [Linux] graphics are very slow
  • OSX 10.10 [Linux] sound is not working

Note that Apple only allows and supports running OSX in a VM on OSX. As you can see I only tested on Ubuntu 14.04 as a host (which is not supported). Let me know whether or not the above instructions work for you (on Windows or OSX).

Conclusion

It is not working very well (out-of-the-box), but it does work a little. Enough to get you started. With some serious tinkering you may even fix it to an acceptable level. If you do, please let me know!

Links

  1. http://virtualbox-snow-leopard.blogspot.de/
  2. http://engineering.bittorrent.com/2014/07/16/how-to-guide-for-mavericks-vm-on-mavericks/
  3. http://kernelpanik.net/running-mac-osx-yosemite-on-kvm-hypervisor/
  4. http://www.virtualbox.org/manual/ch08.html

Leave a Reply

Your email address will not be published. Required fields are marked *