# Create a Bootable macOSHighSierra.iso for installing macOS High Sierra in Virtualbox or VMware with macOS High Sierra.app # Create a "virtual USB flash drive"/disk image: hdiutil create -o /tmp/HighSierra -size 8G -layout SPUD -fs HFS+J -type SPARSE # Mount it: hdiutil attach /tmp/HighSierra.sparseimage -noverify -mountpoint /Volumes/install_build # Write the installer files into this new disk image: /Applications/Install\ macOS\ High\ Sierra.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build # Unmount the disk image, so that the resource will not be busy for the next step: hdiutil detach /Volumes/Install\ macOS\ High\ Sierra/ # Convert the disk image into an ISO file (VirtualBox is not capable of booting from a .dmg or .sparseimage file): hdiutil convert /tmp/HighSierra.sparseimage -format UDTO -o /tmp/HighSierra.iso # Move it to the desktop folder and rename the extension of the file to .iso: mv /tmp/HighSierra.iso.cdr ~/Desktop/HighSierra.iso # Remove the sparseimage file from the tmp folder: rm /tmp/HighSierra.sparseimage