Manually "imaging" Mojave incredibly slow

allanp81
Valued Contributor

Hi all, I'm having a weird problem that I can't get to the bottom of.

Because most of our machines aren't DEP enabled I'm having to basically provision our machines by just going through setup assistant and then running the quick add package. This in turn then runs a self service policy. Each self service policy just runs a script that in has a number of policies in them depending on the use case for the machine. I'm just using the "jamf policy -trigger name" command in sequence in the bash script to run through the policies with custom triggers.

The issue I'm having is that this method seems to take forever, with each machine seemingly sitting there for ages not doing anything. For example a DMG being installed via one of the policies can take 5 minutes to install even though it might only a small collection of files.

I've tried on our production environment (10.9) and also dev (10.12.0) and same behaviour on both. I've tried on 10.14.1 and 10.14.5 and same behaviour as well.

The last part of each self service policy does an inventory update and then a reboot, but the inventory update takes forever as well, with the "du -sh" seemingly taking forever. The strange part being that I can ssh into the mac and run the same command manually and it takes seconds.

I've enabled debug logging and it's not highlighting anything obviously wrong.

An equivalent self service policy that just installs some apps and runs some scripts without stringing together policies doesn't seem to have this issue.

2 REPLIES 2

JustDeWon
Contributor III

Why are you running an inventory update on each policy? Inventory updates should be an "only as NECESSARY" run.. I would remove the inventory update on each policy, and just run the inventory update after the enrollment process has completed.

allanp81
Valued Contributor

I'm not running an inventory update on each policy, I'm running it at the end of provisioning, same way I believe old fashioned Jamf imaging did.

Either way something is causing the whole process to run incredibly slow and I can't for the life of me find out why. If I enrol via quickadd and then use Jamf remote to apply exactly the same list of apps and scripts (with an inventory update at the end) I see no such issues with it taking forever.