MacOS – How to install OS X 10.8 (Mountain Lion) on VirtualBox 4.3

macosvirtualbox

I've seen a lot of variants of this question, but most are pretty old, and don't quite match my use case.

How the heck do you get 10.8 (Mountain Lion) running on the latest version of VirtualBox, e.g., under 10.9 (Mavericks)? I need it for testing.

Best Answer

  1. First, you need to buy Mountain Lion (if you haven't bought it already). Go to Apple's web store (not the App Store app), and search for "Mountain Lion", and pay $20 for it.
  2. Wait 3 days. Even though they're just emailing you a PDF with a license code, it's done manually (so I'm told), so it really does take 1-3 business days to get to you.
  3. In the App Store app, click "Redeem" (top right on the main page), and paste in the code. Download the Mountain Lion Installer. On OS X 10.9, you'll get a warning that you can't downgrade, which is fine.
  4. Install VirtualBox 4.3.12, or whatever the latest version is.
  5. Make a new VM image. You can use either "Mac OS X (64 bit)" or the 10.8-specific one -- they both seem to work. Turn the video memory up to 128 MB -- at the default of 10 MB, it'll boot but you won't be able to see anything. (I also suggest giving it more than 2 GB of RAM, and more than 1 CPU.)
  6. To SATA port 1 (the first free one), attach "InstallESD.dmg" from inside the Mountain Lion Installer package (right-click in the finder to show the package contents, and drag the .dmg to the file-picker dialog in VirtualBox). VirtualBox 4 supports DMG files natively, and InstallESD.dmg is bootable. Check "Live CD/DVD".
  7. Boot the image. When the first menu appears, open Disk Utility and "Erase" your virtual hard disk. Quit Disk Utility.
  8. Install OS X on the virtual hard disk. (Note: don't bother entering your AppleID during the installation process -- it doesn't seem to accept it there. But once you're done installing, you can run the App Store app and enter your AppleID to download your purchased apps just fine.)
  9. Be sure to detach InstallESD.dmg before rebooting. (Simply moving it lower than the hard disk in the boot order setting doesn't seem to do anything.)
  10. To increase the screen resolution to 1440x900, this answer was very helpful. (Setting <key>Graphics Mode</key> did not work for me.)