bacongravy / macinbox

Puts macOS in a Vagrant box
Other
662 stars 45 forks source link

Catalina: /usr/sbin/diskutil failed with non-zero exit code: 1 #66

Open gitpushdashf opened 3 years ago

gitpushdashf commented 3 years ago

Hi,

This is a really cool project. Trying it out on Catalina, using a Catalina image I made with macadmin-scripts (couldn't get the official download to work).

$ time sudo macinbox --box-format virtualbox --installer-dmg ~/repos/macadmin-scripts/Install_macOS_10.15.7-19H2.dmg
• Attaching installer disk image...
• Checking macOS versions...
• Creating image from installer...
  + Creating and attaching a new blank disk image...
  + Installing macOS...
    - installer: 100% done
  + Configuring the primary user account...
  + Configuring the 'vagrant' group...
  + Installing the default insecure vagrant ssh key...
  + Enabling password-less sudo...
  + Enabling sshd...
  + Enabling HiDPI resolutions...
  + Saving the image...
    - Error: /usr/sbin/diskutil failed with non-zero exit code: 1

• Cleaning up...

real    20m5.471s
user    2m21.039s
sys     1m31.510s

Might I have more luck with non-Virtualbox? Do you have any suggestions on what I can try next?

Thank you!

bacongravy commented 3 years ago

@gitpushdashf I’m sorry this isn’t working for you. Thanks for letting me know. Could you try rerunning the command with the verbose flag and seeing if you get more detail? I don’t think your choice of box format is the cause of this issue. Maybe you are low on disk space? Hopefully the verbose logging gives us a clue.

vemv commented 3 years ago

~I was consistently experiencing this exact same issue. Then I realised in the logs a reference to a volume image that was completely unrelated to macinbox (i.e. I had downloaded some software so I had /Volumes/foo.app mounted).~

~After unmounting this image, the issue was gone.~

vemv commented 3 years ago

What I said above wasn't an actual fix, it worked merely by chance.

Here's what worked though:

Unmount of disk5 failed: at least one volume could not be unmounted
Unmount was dissented by PID 135 (/Applications/<SomeAntivirus>.app)

So, using this debugging method I could become aware that an antivirus was interfering. So I can disable it, and start again.

Which worked!