Skip to content

Instantly share code, notes, and snippets.

@francisluong
Created February 21, 2015 15:35
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francisluong/f87870c599d4c4e74769 to your computer and use it in GitHub Desktop.
Save francisluong/f87870c599d4c4e74769 to your computer and use it in GitHub Desktop.
OSX Yosemite on VirtualBox
#!/bin/bash
# Create OSX Yosemite Installer for VirtualBox using iesd gem
gem install iesd
iesd -i /Applications/Install\ OS\ X\ Yosemite.app/ -o yosemite.dmg -t BaseSystem
hdiutil convert yosemite.dmg -format UDSP -o yosemite.sparseimage
ls -lh yo*
hdiutil mount /Applications/Install\ OS\ X\ Yosemite.app/Contents/SharedSupport/InstallESD.dmg
hdiutil mount yosemite.sparseimage
cp /Volumes/OS\ X\ Install\ ESD/BaseSystem.* /Volumes/OS\ X\ Base\ System/
hdiutil detach /Volumes/OS\ X\ Install\ ESD/
hdiutil unmount /Volumes/OS\ X\ Install\ ESD/
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil unmount /Volumes/OS\ X\ Base\ System/
hdiutil convert yosemite.sparseimage -format UDZO -o yosemite.vbox.dmg
ls -lh yo*
rm yosemite.dmg
rm yosemite.sparseimage
ls -lh yo*
echo Add yosemite.vbox.dmg as a live cd in virtual box
echo given vmname FrancOSX...
echo VBoxManage modifyvm FrancOSX --chipset piix3
echo VBoxManage modifyvm FrancOSX --cpuidset 00000001 000306a9 00020800 80000201 178bfbff
echo Start your VM, open Disk Utility within installer and create a new HFS+ partition on the virtual disk
echo then Install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment