Is my Execute Command wrong? MacOS cached upgrade install

apeacock
New Contributor

Hello folks,

 

I'm new to the Jamf world so forgive my noobiness.

I'm following this great guide of how to upgrade macos on client machines via Packaging and Deploying the macOS installer https://docs.jamf.com/technical-papers/jamf-pro/deploying-macos-upgrades/9.96/Packaging_and_Deployin...

 

I'm stuck on step 5, part 12. The Execute Command field. I don't understand why it's given an example of a file path, rather than the actually file path? I did some digging and it appears that the Cached packages are placed into /Library/Application Support/JAMF/Waiting Room, so I tried entering: /Library/Application Support/JAMF/Waiting Room/Install macOS Monterey.app/Contents/Resources/startosinstall 

as the execute command but in the logs it says that it can't find the file path.

I tried navigating to the location on the client but for some reason us admins don't have permission to access it. Not sure if that has something to do with it.

 

Any advice is mega appreciated :)

 

Alex

 

 

9 REPLIES 9

vinu_thankachan
Contributor

Once the Installed cache policy got executed, The OS installer file will be moved to the desired location from the waiting room to The location from where you add the package to the composer when you create the PGK file.
So please check and update the /file path accordingly.

 

@apeacock 

On the install cache policy, the script should run after the cache is installed. Once the policy installs the cached install package it moves it to the application folder. Unless you specifically scripted your package to install elsewhere your script should be: 
'/Applications/Install macOS Monterey.app/Contents/Resources/startosinstall' --agreetolicense

apeacock
New Contributor

@vinu_thankachan @rroy90 

I have checked the /applications/ folder of a test machine which cached the installer from the policy however I don't see it in there.

Thanks for the assistance!

Cheers

Alex

apeacock
New Contributor

The policy is just stuck on 'pending'. Does it not need a trigger event either? Which the guide appears to not mention.

 

Thanks again!

Hey @apeacock 

I'm fairly new to the administrative side of Jamf myself, but I created two policies last week to cache and install macOS 12.2.1. My macOS installer pkg caches in "/Library/Application Support/JAMF/Waiting Room/" just like in your initial script. You don't need to call out that file path, because you need to create a second policy to install the cached package. Once the install cached is done running it places the macOS installer app in the Applications folder. On this 2nd policy is where you'll have your script, which runs after the pkg installs. I think it might be helpful to explain how I have the policies set up.

 

Cache macOS Monterey policy is set up as so: 

General Payload - Trigger, recurring check-in. Execution Frequency, Once per computer. Packages Payload - Distribution point, each computer's default distribution point. Selected the macOS Monterey 12.2.1 pkg I uploaded. Action, Cache. Maintenance Payload - Update Inventory. 

 

Then I created a smart computer group named "Install macOS Monterey cached" with criteria - "Cached Packages", "has", insert the name of your installer package. Next I created a script to install the update after Install Cached runs: '/Applications/Install macOS Monterey.app/Contents/Resources/startosinstall' --agreetolicense

 

Install Cache macOS Monterey is setup as so:

General Payload Trigger, recurring check-in. Execution Frequency, Once per computer. Packages Payload - Distribution point, each computer's default distribution point. Selected the macOS Monterey 12.2.1 pkg I uploaded. Action, Install Cached. Scripts Payload- select the script created above and set Priority to After. Maintenance Payload - Update Inventory. Scope Tab - Targets, smart group "Install macOS Monterey cached". User Interaction Tab Start message example: " IT will be upgrading your macOS to the latest version of Monterey. Please save all your work and schedule a time to start the update." Defferal Type, Duration. Duration, 2 days. Restart message example: "Please save all your work and restart your Mac through the Apple menu."

 

It has successfully installed the macOS update on every device I have run it on. The only issue I have is the logs always report back failed because the policy doesn't run and inventory update after the restart, so I run a manual inventory update policy after each install and then can verify that the macOS has successfully updated. 

 

Hi @rroy90 

Thanks very much for taking the time to explain that in your own words.

I have followed your guidance and I still do not see the Install MacOS  Monterey.app file in applications after the 2nd policy has run. The 2nd policy fails because the script is unable to find the installer file - The 1st policy which caches the package runs successfully.

If I search the device for the keyword "Monterey", nothing shows up. In composer I definitely had the file structure set to Applications.

Feels like I'm missing something obvious but I can't figure it out.

Cheers

Alex

I notice that once the 2nd policy runs, the cached packages shown in the 'Cached' in jamf for that specific computer no longer shows the cached package. So something is happening to the package (seems that it's getting deleted since system search can't find it). 

apeacock
New Contributor

Update:

I have noticed there's nothing wrong with what i've done on JAMF's side of things. It's a problem with the .pkg file that composer creates. Running the pkg file manually also seems to fail. Re-composed it twice now and same issue.

Screenshot 2022-03-18 at 13.50.15.png

rroy90
New Contributor

@apeacock 

It might not be the best method for getting macOS installer packages but I've gotten my last few from Mr. Macintosh. The installers are already packaged https://mrmacintosh.com/