How to install OS X El Capitan on Virtualbox

Hey guys!
In this tutorial, I'll show how to install OS X 10.11 El Capitan on Virtualbox (5.0).

If you have been reading my blog for some time (in that case, thank you!), you would know that I had made a post about creating a Yosemite VM. The procedure's almost the same. I'll outline the main steps.

For this, you need a computer running OS X (maybe your physical Mac or even the Yosemite VM)

EDIT: According to this blog post, you can't create a disk image for El Capitan (yet). So you'll have to stick with Yosemite and upgrade. I did try another method for (re)installing El Capitan on a physical Mac which requires a recovery disk. I'll upload a Yosemite recovery disk and upload the steps to install
 
EDIT: I have created a Yosemite-based Recovery Disk which can be booted into in VirtualBox. I'll upload it soon. Meanwhile, you can use the Yosemite Installer DMG created in the other tutorial to install El Capitan (and any further OS X (now becoming macOS) releases) using this method.
 
There are two methods:

1. Upgrading your existing VM: In your existing Yosemite VM, you can upgrade by downloading the El Capitan Installer from the App Store (keep a copy of it). Then, upgrade as you would a real Mac.

2. Using the Yosemite Install/Recovery image: 
Prerequisites:
  1. My Yosemite Recovery image (1GB) (Will be uploaded soon)/The OS X Yosemite Installer DMG created in the other tutorial (~5GB)
  2. The OS X Installer App (~3-4GB)
  3. CD image creation software (Windows: PowerISO, OS X: Disk Utility, Linux: xorriso)
Open the CD image creation software of your choice and make a CD image containing the Installer ".app" folder (Steps will vary depending on system).

NOTE: In Disk Utility, when asked to save the Disk Image, make sure you select "DVD/CD Image" or "Compressed" from the options. Also, do not keep any amount of encryption. 

Then, create a new VM with the following settings:
OS: Mac OS X El Capitan (64 bit) 
RAM: As much as possible
Hard disk: VDI, Dynamically Allocated, 500 GB or more,
Close Virtualbox and open a Command Prompt with Admin privileges. Then, type the following (Replace the parts in capitals. Quotes are necessary) :
"PATH\TO\VBOX\INSTALL\VBoxManage.exe" setextradata "NAME OF VM" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"

"PATH\TO\VBOX\INSTALL\VBoxManage.exe" setextradata "NAME OF VM" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"

"PATH\TO\VBOX\INSTALL\VBoxManage.exe"setextradata "NAME OF VM" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Iloveapple"

"PATH\TO\VBOX\INSTALL\VBoxManage.exe" setextradata "NAME OF VM" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"

"PATH\TO\VBOX\INSTALL\VBoxManage.exe" setextradata "NAME OF VM" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
If you have a Haswell or later Intel CPU, you also need to set the CPU ID:

 "PATH\TO\VBOX\INSTALL\VBoxMAnage.exe" modifyvm "NAME OF VM" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
Reopen VirtualBox. Open the VM settings and add another SATA CD Drive (To load the Installer files). In the first CD Drive, insert my Recovery disk and in the other, insert the Installer CD Image you created. Close settings and start the VM. Wait for it to boot up. You will be welcomed by a (buggy and slow) welcome screen. Choose your region and continue. When it shows the "Ready to install OS X" screen, click on the menu > Utilities > Disk Utility. Once Disk Utility loads, you will see the Virtual Harddisk in the sidebar. Click on it, choose Partition, choose 1 partition, give a name and click on Partition. Click OK. Exit Disk Utility.

Here's where things get a bit tricky. Get back to the Installer screen and open the Terminal (Menu > Utilities > Terminal). Then enter the following commands:
 cd /Volumes
ls           # Check for your installer CD Image's name
cd <INSTALLER_CD_IMAGE>/Install\ OSX\ El\ Capitan.app/
./Contents/MacOS/Install\ OSX\ El\ Capitan #Mind the "."
The OS X El Capitan Installer should load now. Follow the instructions in the setup process. It will take quite a long time so have a cup of coffee (or check out my other posts if you don't mind :D). Once it's done, the VM will reboot into the hard disk. Keep the dmg file mounted in the virtual CD drive to prevent a hang (during an Extension SDK cache rebuild). After it boots up, follow the on-screen steps. Once done, you will be brought to the desktop.
There is one thing to do right now. Change the power saver settings to prevent VM hangs(System Preferences > Energy Saving > Sliders to Never, uncheck "Put Harddisks to sleep whenever possible"). Also, if you have read my previous post about installing Yosemite, you might know about the BeamOff app which disabled BeamSync(VSync) and brought performance improvements to the VM. In El Capitan, however, it's not necessary (and also doesn't improve performance much). And if you want to install a bootloader like Chimera, you will have to wait for tonymacx86 to make MultiBeast ready for El Capitan.

Congratulations on your shiny new (virtual) Mac!

Comments

Popular Posts