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.
Click to expand...