Skip to content

Instantly share code, notes, and snippets.

@ryanmaclean
Last active October 24, 2017 11:05
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save ryanmaclean/110a941c77db298491ec to your computer and use it in GitHub Desktop.
Save ryanmaclean/110a941c77db298491ec to your computer and use it in GitHub Desktop.
Convert El Capitan DMG For Use with Oracle VirtualBox on Mac OSX
#!/bin/bash
# Modified version of this script - http://ifreaky.net/os-x-10-11-el-capitan-in-virtual-boxvmwareparallels-desktop/
# Fixed typos and logic
# This will require about 30GB of space
# The process will take roughly 3 minutes on a MacBook Retina 2015 with 512GB SSD
# It will definitely take longer on slower computers...
cd ~/Desktop
sudo gem install iesd
iesd -i /Applications/Install\ OS\ X\ 10.11\ Developer\ Beta.app -o el-capitan.dmg -t BaseSystem
hdiutil convert el-capitan.dmg -format UDSP -o el-capitan.sparseimage
hdiutil mount /Applications/Install\ OS\ X\ 10.11\ Developer\ Beta.app/Contents/SharedSupport/InstallESD.dmg
hdiutil mount el-capitan.sparseimage
cp /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/
# We use the finder to eject here, based on this OSX Daily tip
# http://osxdaily.com/2014/05/22/eject-all-mounted-volumes-command-line-mac/
osascript -e 'tell application "Finder" to eject (every disk whose ejectable is true)'
hdiutil convert el-capitan.sparseimage -format UDZO -o OSX_VM.dmg
rm -rf ~/Desktop/el-capitan.dmg
rm -rf ~/Desktop/el-capitan.sparseimage
@kevin-smets
Copy link

Interesting, tried this out but couldn't get it to boot in my Vbox.. Fiddled around with the settings a bit but no dice.

Using Virtualbox 5.0.4, added the OSX_VM.dmg to the storage, set the CPU to 8 processors and vRam to 128. I tested both chipset options but nothing proved successful and EFI on and off. How were you able to get this up and running?

//edit Should've checked the original link. Apparently this still worked with the developer beta, but not the public beta, or in my case, the GM candidate.

@ryanmaclean
Copy link
Author

Hey sorry @kevin-smets, you're absolutely right, I was testing the Dev Beta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment