Skip to content

Instantly share code, notes, and snippets.

@hugoeanogueira
Last active April 25, 2017 22:11
Show Gist options
  • Save hugoeanogueira/f5ead13d26afea5805c686c473fd57f6 to your computer and use it in GitHub Desktop.
Save hugoeanogueira/f5ead13d26afea5805c686c473fd57f6 to your computer and use it in GitHub Desktop.
Install MacOS in Virtualbox (Mac)
# FULL INSTRUCTIONS IN:
http://www.starkandwayne.com/blog/running-a-mac-vm-on-a-mac-using-virtualbox/
---------------------------------------------
# make sure you have iesd installed
gem install iesd
# create fixed image
iesd -i "/Applications/Install OS X Yosemite.app" -o yosemite.dmg -t BaseSystem
hdiutil convert yosemite.dmg -format UDSP -o yosemite.sparseimage
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 unmount "/Volumes/OS X Install ESD/"
hdiutil unmount "/Volumes/OS X Base System/"
# you may use Disk Utils to unmount and remove devices
diskutil unmountDisk $(diskutil list | grep "OS X Base System" -B 4 | head -1)
diskutil unmountDisk $(diskutil list | grep "OS X Install ESD" -B 4 | head -1)
# convert fixed image to UDZO compressed image format
hdiutil convert yosemite.sparseimage -format UDZO -o yosemitevagrantbox.dmg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment