Failed to create a bootable disk image file for this version of macOS.

I ran into this problem today and decided to dig deeper. Actual workaround inside! (Although I have no idea why it works...)

The actual process of converting the App to ISO actually uses a shell script. This is the command it executes (your paths will vary):
Code:
/bin/bash '/Applications/Parallels Desktop.app/Contents/Resources//repack_osx_install_app.sh' repack '/Applications/Install macOS Monterey.app' '/Users/flow/Parallels/macOS_image_file.iso' -w

You can actually execute that same script easily (use sudo, some steps seem to require root). In my case it failed in hdiutil attach:

Code:
+ for i in '{1..10}'
++ hdiutil attach '/Users/flow/Parallels/macOS image file.iso.tmp.MmgaDy/macOSInstallImage.sparsebundle' -mount required -mountrandom '/Users/flow/Parallels/macOS image file.iso.tmp.MmgaDy' -plist -nobrowse -noverify
++ grep -A1 mount-point
++ sed -n 's:.*<string>\(.*\)</string>.*:\1:p'
hdiutil: attach failed - Resource temporarily unavailable
++ true
+ mount_path=
+ '[' -n '' ']'
+ sleep 3

Interestingly hdiutil attach seemed to work half, at least afterwards with hdiutil info you could see a mount. The error is completely reproducible when editing the script to make sure it leaves the sparsebundle around after the run. You can run hdiutil attach and detach on it and see the error.

Anyway, I googled the error and found https://stackoverflow.com/questions...t-results-to-resource-temporarily-unavailable where someone claimed he encountered this error when using hdiutil detach but could work around it with diskutil eject. Neither he nor the responder had any idea why that might be. But I was desperate, so I experimented with it. And lo an behold, when running hdiutil attach on the sparsebundle and then not running hdiutil detach but instead run diskutil eject then the next hdiutil attach works. Magic!

And we can use that to work-around the problem in Parallels as well. As you can see in the script output above it actually tries the hdiutil attach 10 times with 3 seconds sleeps in between. So open a terminal beside Parallels and determine which disk hdiutil attach will use (Just run diskutil list and see what the next /dev/disk number will be). In my case I have a /dev/disk1, so hdiutil attach uses /dev/disk2). So I started the conversion process in Parallels, waited for a few seconds and then executed diskutil eject /dev/disk2 in the terminal. That made the script actually succeed and Parallels continued from there.

WORKS! Nice debugging, thanks a lot.
 
For what it's worth, this issue seems to be resolved in Parallels v18, at least for me anyway.
What is the configuration of your machine that may have contributed to "problem solved in version 18"? I have version 18 and what I feel is a vanilla environment - Macbook Pro 2.2 GHz Quad- Core Intel Core i7
 
What is the configuration of your machine that may have contributed to "problem solved in version 18"? I have version 18 and what I feel is a vanilla environment - Macbook Pro 2.2 GHz Quad- Core Intel Core i7

Not sure what you mean by configuration? I've installed macOS Big Sur v11.7.1 using Parallels Desktop v18.1.0 on my 2019 16-inch MacBook Pro 2.3GHz i9, 16GB RAM running macOS Ventura 13.0.1. This is exactly the same MacBook that I was using with Parallels Desktop v17.x
 
Ok the script
'/Applications/Parallels Desktop.app/Contents/Resources/repack_osx_install_app.sh'
Needs to be adapted for older versions. For instance EL Capitan from this page:
https://support.apple.com/en-us/HT211683
Does not include
/Contents/SharedSupport/InstallESD.dmg
but
/Contents/SharedSupport/OSInstall.mpkg
So obviously the script is not going to work:
Code:
sudo /bin/bash '/Applications/Parallels Desktop.app/Contents/Resources/repack_osx_install_app.sh' repack '/Applications/Install OS X El Capitan.app' '/Users/x299/Parallels/macOS_image_file.iso' -w 
Password:
+ set -E
+ set -o pipefail
+ export -f BREAKPOINT
+ temp_dir=
+ temp_dmg=
+ declare -a temp_dmg_mounts
+ BLOCKSIZE=512
+ ADDON_DISK_SPACE=204800
+ ADDON_DISK_SPACE_BIGSUR=3145728
+ ERR_INVALID_ARG=1
+ ERR_FILE_EXISTS=2
+ ERR_UNEXPECTED=3
+ ERR_INTERRUPTED=4
+ trap 'cleanup; exit 3' ERR
+ trap 'cleanup; exit 4' SIGHUP SIGINT SIGTERM
+ [[ 4 -lt 1 ]]
+ action=repack
+ shift
+ case "$action" in
+ do_repack '/Applications/Install OS X El Capitan.app' /Users/x299/Parallels/macOS_image_file.iso -w
+ [[ 3 -lt 2 ]]
+ local 'source_app=/Applications/Install OS X El Capitan.app'
+ local result_dmg=/Users/x299/Parallels/macOS_image_file.iso
+ shift 2
+ local overwrite=n
+ local p7z_tool=
+ getopts wz: OPT
+ case "$OPT" in
+ overwrite=y
+ getopts wz: OPT
+ [[ -L /Applications/Install OS X El Capitan.app ]]
+ [[ ! -r /Applications/Install OS X El Capitan.app ]]
+ [[ -e /Users/x299/Parallels/macOS_image_file.iso ]]
+ [[ -n '' ]]
+ [[ -f /Applications/Install OS X El Capitan.app/Contents/SharedSupport/InstallESD.dmg ]]
+ [[ -n '' ]]
+ do_repack_createinstallmedia '/Applications/Install OS X El Capitan.app' /Users/x299/Parallels/macOS_image_file.iso
+ local 'source_app=/Applications/Install OS X El Capitan.app'
+ local result_dmg=/Users/x299/Parallels/macOS_image_file.iso
+ local temp_result_dir=
++ mktemp -d /Users/x299/Parallels/macOS_image_file.iso.tmp.XXXXXX
+ temp_dir=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C
+ local temp_img_name=macOSInstallImage
+ local temp_img_file=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle
++ calc_file_size '/Applications/Install OS X El Capitan.app'
++ du -H -s '/Applications/Install OS X El Capitan.app'
++ awk '{print $1}'
+ local size=6312080
+ hdiutil create -sectors 6312080 -fs hfs+ -volname macOSInstallImage -type SPARSEBUNDLE /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle
created: /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle
+ attach_dmg temp_result_dir /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C -nobrowse -noverify
+ local outvar=temp_result_dir
+ local dmg_path=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle
+ local mount_root=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C
+ shift 3
+ local mount_path=
+ '[' -e /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle ']'
+ [[ -nobrowse -noverify =~ -readonly ]]
+ '[' -z '' ']'
+ for i in '{1..10}'
++ hdiutil attach /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/macOSInstallImage.sparsebundle -mount required -mountrandom /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C -plist -nobrowse -noverify
++ grep -A1 mount-point
++ sed -n 's:.*<string>\(.*\)</string>.*:\1:p'
+ mount_path=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
+ '[' -n /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr ']'
+ temp_dmg_mounts+=("$mount_path")
+ break
+ '[' -n /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr ']'
+ eval 'temp_result_dir=$mount_path'
++ temp_result_dir=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
++ '/Applications/Install OS X El Capitan.app/Contents/Resources/createinstallmedia' --volume /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr --nointeraction
++ grep 'available at'
++ sed 's/.*"\(.*\)".*/\1/'
Usage: createinstallmedia --volume <path to volume to convert> --applicationpath <path to Install OS X El Capitan.app> [--force]

Arguments--volume, A path to a volume that can be unmounted and erased to create the install media.
--applicationpath, A path to copy of the OS installer application to create the bootable media from.
--nointeraction, Erase the disk pointed to by volume without prompting for confirmation.

Example: createinstallmedia --volume /Volumes/Untitled --applicationpath "/Applications/Install OS X El Capitan.app"
+++ cleanup
+++ dettach_dmg_all
+++ '[' 1 -gt 0 ']'
+++ local idx=0
+++ local mount_path=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
+++ unset 'temp_dmg_mounts[0]'
+++ dettach_dmg /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
+++ local mount_path=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
+++ hdiutil detach -verbose /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
hdiutil: detach: processing "/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr"
LetDIDriverSettleDown: calling IOServiceWaitQuiet...
DI_kextWaitQuiet: about to call IOServiceWaitQuiet...
DI_kextWaitQuiet: IOServiceWaitQuiet took 0.000002 seconds
LetDiskImageDriverSettleDown: wait took 0.000030 seconds
+++ (( idx=0  ))
+++ (( idx<0  ))
+++ '[' 0 -gt 0 ']'
+++ [[ -d /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C ]]
+++ rm -rf -- /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C
+++ temp_dir=
+++ [[ -e '' ]]
+++ exit 3
+ temp_result_dir='"disk31" ejected.'
++ cleanup
++ dettach_dmg_all
++ '[' 1 -gt 0 ']'
++ local idx=0
++ local mount_path=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
++ unset 'temp_dmg_mounts[0]'
++ dettach_dmg /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
++ local mount_path=/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
++ hdiutil detach -verbose /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr
hdiutil: detach: processing "/Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C/dmg.2iurzr"
hdiutil: detach: result: 2
hdiutil: detach failed - No such file or directory
++ (( idx=0  ))
++ (( idx<0  ))
++ '[' 0 -gt 0 ']'
++ [[ -d /Users/x299/Parallels/macOS_image_file.iso.tmp.r52Y6C ]]
++ [[ -e '' ]]
++ exit 3
Common Parallels support please step in to the plate and fix the script.
 
I am having this same issue with Parallels 19 on a Mac Studio M1 Max with Sonoma 14.3.1, trying to install Ventura as a VM. Very annoying.
 
Ok it's now 2025 and I am having this very same problem with Parallels 26.0.1 when creating Sonoma VM from Sequoia Mac. Maybe someone at Parallels could take a look at this finally and make it work for good?
 
Back
Top