How to convert macOS Sierra installOS.dmg to a bootable .iso image?
- The process of converting installOS.dmg to to a bootable "macOS.iso" is very important as VirtualBox can run only run macOS installation from "iso" images only also the iso image can be used for installation of macOS on unsupported device.
- You have to follow these steps carefully and copy the terminal commands as it is.
- I have applied the method to macOS Sierra. you can download the official new & old macOS versions from this link.
- Follow these steps for converting .dmg to .iso : -
1- you must ensure that you have enough disk space for running the full process, at least 40 Gigabytes.
2- download the official macOS Sierra installer using this link.
3- double click the downloaded installOS.dmg (5.01 GB) to install the file named "installOS.pkg" which will create a file named "Install macOS Sierra.app" in the applications folder in your MAC. (N.B. Keep this file as it is and never try to open, transfer or install)
4- Now, Open terminal. using spotlight search type "terminal" and press enter. then start typing the following terminal commands:
5- Command 1: create a dmg container on the desktop of a size (8 BG) named "Sierra.dmg": -
hdiutil create -o ~/Desktop/Sierra -size 8000m -volname Sierra -layout SPUD -fs HFS+J
6- Command 2: mount the created Sierra.dmg container into your device: -
hdiutil attach ~/Desktop/Sierra.dmg -noverify -mountpoint /Volumes/Sierra
7- Command 3: type this command to fix any possible error : -
sudo plutil -replace CFBundleShortVersionString -string "12.6.03" /Applications/Install\ macOS\ Sierra.app/Contents/Info.plist
8- Command 4: Create a bootable macOS Sierra installer into the created dmg container (N.B. You must have the file named "Install macOS Sierra.app" into your applications folder as described before}: -
sudo /Applications/Install\ macOS\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/Sierra --applicationpath /Applications/Install\ macOS\ Sierra.app --nointeraction
9- Command 5: detach the created bootable dmg container: -
hdiutil detach /Volumes/Install\ macOS\ Sierra
10- Command 6: Convert dmg to cdr container: -
hdiutil convert ~/Desktop/Sierra.dmg -format UDTO -o ~/Desktop/Sierra.cdr
11- Command 7: convert .cdr to the bootable .iso image: -
mv ~/Desktop/Sierra.cdr ~/Desktop/Sierra.iso
NOW, you have created a bootable Sierra.iso image into your desktop that can be used with VirtualBox virtual machine.
Tutorials on how to run macOS perfectly on virtual machines