DmgCreator hdiutil: create failed - Resource busy - macOS Sequoia Host

13 views
Skip to first unread message

Derek Klein

unread,
Nov 20, 2025, 8:05:03 PM (14 days ago) Nov 20
to autopkg-discuss
Hi all, 

Looking to migrate our Autopkg setup form an old Mac machine that is being retied to a newer Intel Mac Pro running Sequoia 15.7.2.

Most of our recipes look to be working as expected, but any that use the DmgCreator processor fail with a "hdiutil: create failed - Resource busy" error. 

Does anyone have any experience with this issue?

Thanks
D

Elliot Jordan

unread,
Nov 20, 2025, 8:07:04 PM (14 days ago) Nov 20
to autopkg...@googlegroups.com
Previous reports of this issue have been traced to antivirus or vulnerability scanning software running on the Mac. Might that be the case?

Elliot

--
You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopkg-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/autopkg-discuss/32645a87-c55e-4ecb-bb44-9ae7220199ddn%40googlegroups.com.

Nick McSpadden

unread,
Nov 20, 2025, 8:07:40 PM (14 days ago) Nov 20
to autopkg...@googlegroups.com
This is likely because this host Mac has some kind of antivirus scanner or other scanning tool that is grabbing onto the mounted volume and doing some kind of disk activity. Sometimes this is related to security policies about mounting volumes. Without knowing more, my suspicion is largely that you have some security software installed on the machine that is causing this interference - this sort of question has come up numerous times in AutoPkg's history. I'd see if you can exempt this machine or disable the software on it to test this theory.

--
You received this message because you are subscribed to the Google Groups "autopkg-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to autopkg-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/autopkg-discuss/32645a87-c55e-4ecb-bb44-9ae7220199ddn%40googlegroups.com.


--
--
Nick McSpadden
nmcsp...@gmail.com

Sambhaavna Chauhan

unread,
Nov 21, 2025, 12:50:21 AM (14 days ago) Nov 21
to autopkg...@googlegroups.com
✅ 1. Disable Spotlight indexing on Autopkg temp directories

Spotlight often grabs the mount point before Autopkg can use it.

Run these commands:

sudo mdutil -i off /Volumes
sudo mdutil -i off /


Or more targeted for Autopkg:

sudo mdutil -i off "/Users/[your user]/Library/AutoPkg/Cache"


If Spotlight touches the path during “hdiutil create”, you get Resource busy.

✅ 2. Pause or disable “locum” and Finder scanning

In Sequoia, Finder’s file-scanning daemons aggressively index new mountpoints.

Try:

killall Finder
killall locum


Run Autopkg again immediately after.

✅ 3. Add the following flag to DmgCreator (workaround)

Modify your recipe override and set:

<key>use_expected_disk_image</key>
<false/>


Or try:

<key>dmg_format</key>
<string>UDRW</string>


This reduces some hdiutil background errors.

✅ 4. Make sure nothing else is mounted at the temp path

Before running:

mount


Look for leftover mounts like:

/Volumes/autopkg_temp


If you see one:

sudo hdiutil detach /Volumes/autopkg_temp -force

✅ 5. Update Autopkg + Core Processors

Make sure you’re on the latest:

autopkg version
pip3 install --upgrade autopkg


DmgCreator has had multiple fixes for newer macOS versions.

✅ 6. Ensure SIP/container constraints aren’t blocking hdiutil

Sometimes Sequoia requires Full Disk Access for the user running Autopkg.

Give Terminal full permissions:

System Settings → Privacy & Security → Full Disk Access → Enable for Terminal/iTerm.

⚠️ If none of these work:

DmgCreator is one of the oldest processors and known to have problems in recent macOS.

A modern workaround is to use PkgCreator instead of DmgCreator, or use an external DMG creation script like:

hdiutil create -fs HFS+ -volname "AppName" -srcfolder "/path/to/app" "/tmp/AppName.dmg"

This is the open ai answer but worth trying

--

Elliot Jordan

unread,
Nov 21, 2025, 1:02:19 AM (14 days ago) Nov 21
to autopkg...@googlegroups.com
1 and 2. I've never heard of Spotlight or locum causing this issue, but please report back what you find.
3. There is no such argument as use_expected_disk_image, which you can validate using `autopkg processor-info DmgCreator`. There is a dmg_format argument, but this is unlikely to solve the issue. (And any DmgCreator arguments should go in a recipe, NOT an override.)
5. You can't update AutoPkg via pip.
6. Full disk access is related to TCC, not SIP. Typically FDA issues result in "permission denied" or similar errors, not "resource busy."

"DmgCreator is one of the oldest processors" — I don't see how its age would be relevant.
"known to have problems in recent macOS" — Citation needed.
"use PkgCreator instead of DmgCreator" — Those processors do completely different things.

Please and thank you, think twice before further polluting community support channels with AI hallucinations.

Elliot


Matthew Forrest

unread,
Nov 21, 2025, 1:38:13 PM (13 days ago) Nov 21
to autopkg-discuss
I've actually made a local code change to avoid this issue.  I don't know if this is a good / the best way or how portable it is, but it's been working well in my environment. :)


Here's a diff (I think based on v2.7.3) in case someone wants to roll it back into the public code base.
autopkg-DmgMounter.patch

Gregory Neagle

unread,
Nov 21, 2025, 1:42:21 PM (13 days ago) Nov 21
to autopkg...@googlegroups.com
The original problem reported was a failure on "hdiutil: create failed - Resource busy” — this diff looks like it addresses an issue with _unmounting_ a disk image, which is a different, if probably related, issue.

-Greg


Matthew Forrest

unread,
Nov 21, 2025, 1:53:04 PM (13 days ago) Nov 21
to autopkg...@googlegroups.com
Good point.  It's been a while since I looked at this, but I *think* I had issues with both mounting & creating.  IIRC the issue came back to resources being busy due to unmounted drives.  Couldn't create a new DMG because too many old DMGs were mounted.  Again, it has been a while so this could very well be a similar but different issue.

--
Matthew Forrest (he/him)
System Administrator
Dept. of Physics
Toronto Metropolitan University (**formerly Ryerson University)

416-979-5000 x1-554978
NOTICE: My extension has changed

**In April 2022, the university announced our new name of Toronto Metropolitan University, which will be implemented in a phased approach. Learn more about our next chapter.


You received this message because you are subscribed to a topic in the Google Groups "autopkg-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/autopkg-discuss/cEYN2me5uC4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to autopkg-discu...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/autopkg-discuss/A427B158-DEF8-46D3-8975-6D7728A13B32%40mac.com.

Derek Klein

unread,
Nov 21, 2025, 3:08:44 PM (13 days ago) Nov 21
to autopkg-discuss
Hi all,
Thanks for the assistance.

I believe we've narrowed the issue down to Mosyle's "Detection and Security" that was enabled on the system. Doing a temporary exemption for the machine in Mosyle allows the recipe and manual CLI implementation of hdiutil. 

I'll work with them to adjust our policies and go from there.

Much appreciated!

Reply all
Reply to author
Forward
0 new messages