Skip to content

Instantly share code, notes, and snippets.

@james-see
Last active July 2, 2022 04:16
Show Gist options
  • Save james-see/fed4628e60881789abe18d7ba3baa903 to your computer and use it in GitHub Desktop.
Save james-see/fed4628e60881789abe18d7ba3baa903 to your computer and use it in GitHub Desktop.
mac os installer for vmware install iso
#!/bin/bash
## note: change version to whatever comes back for softwareupdate --list-full-installers
softwareupdate --fetch-full-installer --full-installer-version 12.4
## create tmp drive
hdiutil create -o /tmp/MacMonterey -size 12500m -volname MacMonterey -layout SPUD -fs HFS+J
## mount it
hdiutil attach /tmp/MacMonterey.dmg -noverify -mountpoint /Volumes/MacMonterey
## install to volume
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/createinstallmedia --volume /Volumes/MacMonterey --nointeraction
## detach volume
hdiutil detach /Volumes/MacMonterey/
## convert the freshly created MacOS Installer disk image file to a CDR / ISO file that will appear on the desktop
hdiutil convert /tmp/MacMonterey.dmg -format UDTO -o ~/Desktop/MacMonterey.cdr
## rename converted to .iso
mv ~/Desktop/MacMonterey.cdr ~/Desktop/Monterey.iso
@james-see
Copy link
Author

With help from here: https://archive.ph/FIiQm

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