Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phatblat/16afe3f94b36f81c0b3944c283aaf824 to your computer and use it in GitHub Desktop.
Save phatblat/16afe3f94b36f81c0b3944c283aaf824 to your computer and use it in GitHub Desktop.
Install macOS High Sierra in VirtualBox on macOS host

Step 1 - Create a bootable macOS High Sierra ISO

hdiutil attach Downloads/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
hdiutil create -o Downloads/HighSierra.cdr -size 7316m -layout SPUD -fs HFS+J
hdiutil attach Downloads/HighSierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
asr restore -source Downloads/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
cp -rp Downloads/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
cp -rp Downloads/Install\ macOS\ High\ Sierra.app/Contents/SharedSupport/BaseSystem.dmg /Volumes/OS\ X\ Base\ System/BaseSystem.dmg
hdiutil detach /Volumes/install_app
hdiutil detach /Volumes/OS\ X\ Base\ System/
hdiutil convert Downloads/HighSierra.cdr.dmg -format UDTO -o Downloads/HighSierra.iso
mv Downloads/HighSierra.iso.cdr Downloads/HighSierra.iso

Step 2 - Install macOS in a New VirtualBox VM

  1. Create a new Mac OS X machine, Version: macOS 10.13 High Sierra (64-bit). Accept all the defaults.
  2. Start the virtual machine.
  3. You will immediately be prompted for a disk to base this new VM off of. Browse for and select from the HighSierra.iso you created in the steps above.
  4. After a bit og console output, the GUI install process should come up.
  5. Grab a coffee, the 15 minute estimation the installer gives you is a complete work of fiction. My install took over an hour.
  6. Once installed, reboot and complete the new user process. Skip the AppleID login bit, it'll fail on a VirtualBox.
  7. Shut down the virtual machine and quit VirtualBox.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment