This article will tell you how to download the macOS Mojave installer file to your Mac, and how to convert the installer file to an iso file. Then you can use the iso file to install macOS on a virtual machine.
1. Download macOS Mojave.
- Open mac App Store on a mac machine.
- Then search the keyword Mojave in the left search text box.
- Click the download icon ( cloud icon ) in the right panel to download the macOS Mojave installer.
- After download, the macOS Mojave installer dialog will be prompt, just click the menu item Install macOS Mojave —> Quit Install macOS to quit the install dialog.
- The installer file will be saved in the Applications folder, and the installer name is Install macOS Mojave.
- Right-click Install macOS Mojave application in Finder, then click Show Package Contents menu item in the popup menu list to list the Contents folder of Install macOS Mojave application. You will also see the SharedSupport folder and BaseSystem.dmg file. This file will be used to create the iso file later.
- You can also goto the above directory in a terminal use the cd command to verify the folder is exist.
$ cd /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/ $ pwd /Applications/Install macOS Mojave.app/Contents/SharedSupport
2. Create macOS Mojave Installer ISO File.
After download the macOS Mojave installer, it is time to create the iso file for it.
- Open a terminal and run the
hdiutil create
command to create a blank temporary disk image.$ hdiutil create -o /tmp/MoJave.cdr -size 7316m -layout SPUD -fs HFS+J created: /tmp/MoJave.cdr.dmg
- Mount above blank temporary image to the installer volume use
hdiutil attach
command.$ hdiutil attach /tmp/MoJave.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build /dev/disk3 Apple_partition_scheme /dev/disk3s1 Apple_partition_map
- Restore the installer’s BaseSystem.dmg to the above mounted-image use
asr restore
command.$ asr restore -source /Applications/Install\ macOS\ Mojave.app/Contents/SharedSupport/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase Validating target...done Validating source...done Retrieving scan information...done Validating sizes...done Restoring ....10....20....30....40....50....60....70....80....90....100 Restored target device is /dev/disk3s2. Remounting target volume...done
- Unmount the temporary image use
hdiutil detach
command.$ hdiutil detach /Volumes/macOS\ Base\ System/ "disk3" ejected.
- Now you can use
hdiutil convert
command to convert the above image to the iso file that you want.$ hdiutil convert /tmp/MoJave.cdr.dmg -format UDTO -o /tmp/MoJave.iso Reading Driver Descriptor Map (DDM : 0)… Reading Apple (Apple_partition_map : 1)… Reading disk image (Apple_HFS : 2)… .................................................................................................................................................................................... Elapsed Time: 33.626s Speed: 217.6Mbytes/sec Savings: 0.0% created: /tmp/MoJave.iso.cdr
- Rename the created MoJave.iso.cdr file to MoJave.iso and move it to the desktop.
$ mv /tmp/MoJave.iso.cdr ~/Desktop/MoJave.iso
- Now you can copy the iso file to a USB disk to install it on a virtual machine.
I want to create the iso file for macOS catalina, but when I search the keyword catalina in the mac App Store, I can not get the search result. How can I do that? When I search the keyword mojave in mac App Store, it does not show the Mojave download link also. Any help?
If you can not find the download link for macOS Catalina, you can open this link https://apps.apple.com/us/app/macos-catalina/id1466841314?ls=1&mt=12 in a web browser URL address input text box, it will direct you to the App Store and then you can download the macOS Catalina in it. The macOS Mojave download link is https://apps.apple.com/us/app/macos-mojave/id1398502828?mt=12. The macOS High Sierra download link is https://apps.apple.com/us/app/macos-high-sierra/id1246284741?mt=12.
Thank you! Great walk through. This is the part I could not find on creating a working macOS VM in VirtualBox.
Thank You !!