Posted on 04-21-2022 06:40 AM
I have two policies in our environment to cache the Monterey installer on end users machines first. The second runs a files and processes command based on the machine being queried into a group showing it has the Install macOS Monterey.app present. Once it cache's on the machine, they get queried into the group and makes the second policy available to the user in self service to run the upgrade. The problem I am seeing is that the policy will kick off and run for 30-45 minutes. The machines fan spins up like I would expect during the upgrade process, but the machine will never restart to do the rest. When I check the policy log, it gets all the way to "preparing 106.0% Error: system reboot failed...". At this point the policy shows as completed, but the machine never restarts to finalize the upgrade. Below are a handful of command I have ran that are producing this same result. If I run the update manually on the machine, it gets to the point where I have to physically interact with a window with a restart button for the upgrade to continue. I believe that is where I am getting hung up in my policy and nothing has gotten me past that when trying to trigger it from policy. Has anyone else seen or resolved this issue?
Some of the commands I have attempted with all of the same result. I've tried a ton of other variations and they are all giving me the same behavior as described above also:
sudo /Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps &...
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps &...
sudo /Applications/Install\ macOS \Monterey.app/Contents/Resources/startosinstall --rebootdelay 0 --agreetolicense --nointeraction --forcequitapp...
sudo '/Applications/Install macOS Monterey.app/Contents/Resources/startosinstall' --agreetolicense --nointeraction --forcequitapp..
'/Applications/Install macOS Monterey.app/Contents/Resources/startosinstall' --agreetolicense --nointeraction --forcequitapp..
Posted on 04-21-2022 07:51 AM
See if a script works better for you.
Take your second command to make a new script that looks like the following, and then use the script instead of the Files and Processes command.
#!/bin/bash
/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall --agreetolicense --forcequitapps &
Posted on 04-21-2022 08:01 AM
I have a script that is running this command here. It doesn't seem to do anything, but I can try amending it to what you suggested and see what happens.
#!/bin/zsh
echo "Running startosinstall..."
'/Applications/Install\ macOS\ Monterey.app/Contents/Resources/startosinstall' --agreetolicense --forcequitapps --nointeraction &
exit $?
04-21-2022 08:19 AM - edited 04-21-2022 08:20 AM
@user-LdklRyMvwv If you're quoting a path with 's do not also use a \ to escape spaces as it produces an incorrect path
Posted on 04-21-2022 08:31 AM
@sdagley I have tried both unquoted, quoted, \ separated, etc. just trying all of the variations I can to see if I can get this working. Have also been working with jamf support and they cannot seem to figure out the issue either. So, I was/am hoping anyone had any ideas as to why this might not be working.
Posted on 04-21-2022 08:22 AM
Same non result. Edited the script to exactly what you had above and this was the log output.
[STEP 1 of 4]
Executing Policy macOS - Monterey Upgrade
[STEP 2 of 4]
Running script Monterey OS Upgrade Script...
Script exit code: 0
Script result:
[STEP 3 of 4]
[STEP 4 of 4]
Posted on 04-21-2022 08:29 AM
That would be the correct response from the script. It ran successfully. Keep in mind that Monterey has flipped the experience. It now prepares the install in the background and restarts toward the end. You may not see anything happen for up to 20-30 minutes.
View Activity Monitor to see if there's anything happening with processes or the disk.
Posted on 04-21-2022 09:11 AM
@talkingmoose I have been keeping an eye on activity monitor and nothing really spikes up around the software update processes. I have let the machine sit ever since running the updated script as you mentioned and nothing has happened.