Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Create a MacOS Monterey install ISO
# Download the installer for MacOS Monterey
softwareupdate --fetch-full-installer --full-installer-version 12.3.1
# Create a directory for the VM installer
cd ~/
mkdir VMs
cd VMs
mkdir installers
cd installers
# Steps below from
# Create a DMG
hdiutil create -o ~/VMs/installers/MacOS_Monty -size 14500mb -volname MacOS_Monty -layout SPUD -fs HFS+J
# Mount the DMG as a Volume
hdiutil attach MacOS_Monty.dmg -noverify -mountpoint /Volumes/MacOS_Monty
# Use createinstallmedia to turn the Volume into an installer
# You'll need to enter your password for the sudo:
sudo /Applications/Install\ macOS\ --volume /Volumes/MacOS_Monty --nointeraction
# Eject the volume via the UI. You can see it in Finder on the left.
read -p "Please manually eject the MacOS_Monty volume. Hit Ctrl+C to abort this script. Otherwise press any key to continue. " -n 1 -r
# Convert the DMG to a CDR, Apple's format for CD images.
hdiutil convert MacOS_Monty.dmg -format UDTO -o MacOS_Monty.cdr
# Rename the CDR to ISO as expected by VirtualBox.
mv MacOS_Monty.cdr MacOS_Monty.iso
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment