AlexanderWillner / runMacOSinVirtualBox

Run macOS 10.16 Big Sur (and other versions) in VirtualBox on macOS
MIT License
936 stars 126 forks source link

hdiutil convert fails "Resource temporarily unavailable" #76

Open steinybot opened 5 years ago

steinybot commented 5 years ago

To Reproduce Steps to reproduce the behavior:

  1. Run make all
  2. Open runMacOSVirtualbox.log
  3. See error

Expected behavior The ISO should be created.

Additional context

I have noticed this error before when I was trying to create the ISO myself. I think it has something to do with detach not working properly.

I have tried running the ejectAll function which succeeds but doesn't do the right thing. There is a process that is dissenting the unmount:

➜  plugins hdiutil info | grep 'Install macOS'
/dev/disk4s3    Apple_HFS   /Volumes/Install macOS Catalina Beta
image-path      : /Volumes/Install macOS Catalina Beta/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
image-alias     : /Volumes/Install macOS Catalina Beta/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
/dev/disk6s3    Apple_HFS   /Volumes/Install macOS Catalina Beta 1
image-path      : /Volumes/Install macOS Catalina Beta 1/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
image-alias     : /Volumes/Install macOS Catalina Beta 1/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
/dev/disk8s3    Apple_HFS   /Volumes/Install macOS Catalina Beta 2
image-path      : /Volumes/Install macOS Catalina Beta 2/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
image-alias     : /Volumes/Install macOS Catalina Beta 2/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
/dev/disk10s3   Apple_HFS   /Volumes/Install macOS Catalina Beta 3
image-path      : /Volumes/Install macOS Catalina Beta 3/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
image-alias     : /Volumes/Install macOS Catalina Beta 3/Install macOS Catalina Beta.app/Contents/SharedSupport/BaseSystem.dmg
➜  plugins hdiutil info | grep 'Install macOS' | awk '{print $1}'
/dev/disk4s3
image-path
image-alias
/dev/disk6s3
image-path
image-alias
/dev/disk8s3
image-path
image-alias
/dev/disk10s3
image-path
image-alias
➜  plugins hdiutil detach /dev/disk4s3
hdiutil: couldn't unmount "disk4" - Resource busy
➜  plugins sudo diskutil unmount /Volumes/Install\ macOS\ Catalina\ Beta
Password:
Volume Install macOS Catalina Beta on disk4s3 failed to unmount: dissented by PID 50458 (/System/Library/PrivateFrameworks/DiskImages.framework/Versions/A/Resources/diskimages-helper)
steinybot commented 5 years ago

doing a sudo kill -9 with the PID of the process returned by hdiutil info then rerunning make all seemed to do the job.

AlexanderWillner commented 4 years ago

Thanks for the feedback. Seems the script needs better / more checks.