Install El Capitan in Virtual Box for testing purposes

I enrolled to Apple's beta program as I want to test some software under El Capitan. Therefore, I would like to instal El Capitan in Virtual Box.

Is there a recommended way of doing this? As I understand I have to install Yosemite first and then upgrade to El Capitan beta?

I understand, that I have to convert the .app I download into a bootable image which I can use to install it in a virtual machine - can somebody point me to a reliable (tested) howto how I can do this?


Solution 1:

The instructions below, found in Creating a bootable El Capitan ISO image, worked for me after a download of OS X El Capitan from the App Store.

hdiutil attach "/Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg" -noverify -nobrowse -mountpoint /Volumes/esd
hdiutil create -o ElCapitan3.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach ElCapitan3.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/iso
asr restore -source /Volumes/esd/BaseSystem.dmg -target /Volumes/iso -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/esd/Packages /Volumes/OS\ X\ Base\ System/System/Installation
cp -rp /Volumes/esd/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/
cp -rp /Volumes/esd/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/esd
hdiutil detach /Volumes/OS\ X\ Base\ System
hdiutil convert ElCapitan3.cdr.dmg -format UDTO -o ElCapitan3.iso
mv ElCapitan3.iso.cdr ElCapitan3.iso

Additionally for running within VirtualBox:

  • Create a new OS X El Capitan from Wizard.
  • Change "System->chipset" to PIIX3, mount created ISO and boot up.
  • If you only see a the CD/DVD as installation target within the installation program choose "Utilities > Disk Utility" and erase the VirtualBox disk, which will lead to an empty HFS+ Journaled disk, which now could be chosen as target.

Solution 2:

VirtualBox appears to have support for El Capitan. This screen shot is of the dialog for creating a new virtual machine.

Screen shot of VirtualBox option for El Capitan

If you can't find instructions for going from the El Capitan .app to a VirtualBox VM, you may want to follow directions for doing so with Yosemite and hope they work. This guide worked for me.

Update Another idea: Use the above-linked guide to get Yosemite working in VirtualBox, and then upgrade to the beta from within the VM. I just tried this, and it worked for me.

Showing El Cap in a VirtualBox window

Note that VirtualBox doesn’t seem to have any integration software for OS X, so you can't do things like drag to change the guest OS resolution, or enable clipboard sharing, unless I’m really missing something!