How to install OS X 10.8 (Mountain Lion) on VirtualBox 4.3?
Solution 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.
- 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.
- 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.
- Install VirtualBox 4.3.12, or whatever the latest version is.
- 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.)
- 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".
- Boot the image. When the first menu appears, open Disk Utility and "Erase" your virtual hard disk. Quit Disk Utility.
- 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.)
- 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.)
- To increase the screen resolution to 1440x900, this answer was very helpful. (Setting
<key>Graphics Mode</key>
did not work for me.)