Skip to content

Instantly share code, notes, and snippets.

@elijahmanor
Last active November 9, 2019 06:10
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 elijahmanor/e61f591173f0cabe6495eeb66cfd858c to your computer and use it in GitHub Desktop.
Save elijahmanor/e61f591173f0cabe6495eeb66cfd858c to your computer and use it in GitHub Desktop.
Create a macOS VirtualBox Instance on macOS

Download a version of macOS using softwareupdate that will be downloaded to the /Applications folder.

softwareupdate --fetch-full-installer --full-installer-version 10.14.6

# Create a Catalina Virtual Disk Image

hdiutil create -o /tmp/Catalina -size 8500m -volname Catalina -layout SPUD -fs HFS+J

# Mount this Image to macOS

hdiutil attach /tmp/Catalina.dmg -noverify -mountpoint /Volumes/Catalina

# Use macOS Createinstallmedia Tool to create a Installer Image

sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/Catalina --nointeraction
# Unmount Volume Catalina

hdiutil detach /volumes/Install\ macOS\ Catalina

# Convert the Catalina.dmg to a Catalina.iso for Virtual Machine

hdiutil convert /tmp/Catalina.dmg -format UDTO -o ~/Desktop/Catalina.cdr

# Move and Rename Catalina Image to Desktop

mv ~/Desktop/Catalina.cdr ~/Desktop/Catalina.iso

Install

References

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