When a VPP app for macOS is no longer scoped to the device or user, or the device is enterprise wiped, the app is not removed from macOS. This is by design in macOS versions prior to macOS 11 (Big Sur), as these earlier versions of macOS did not support any commands to remove the application. 2) Unified app catalog enables self-service for users as well as admin-controlled app download and management. 3) Security: Comprehensive certificate lifecycle management, per-app tunnel to encrypt traffic, settings to avoid data leakage and more. 4) Shared device mode allows multiple users to customize experiences via check-in/check-out.
As I’ve discussed before, I work in a high-compliance organization, meaning, when OS updates are released, we need to be able to test them, roll the updates out to customers, and then ensure their successful installation. Up until recently, we had been using LANrev for Mac management and patching, which had the interesting ability to run the
softwareupdate
utility on a client machine, grab that update package(s), and then upload them to the server. With this method, we would deploy the OS update package like any other to the devices that required the update, after being vetted and approved internally. And overall it worked well. Since the update was treated as a standard package, the typical install status and reporting in LANrev worked the same way. We could audit failures, successes, etc., and repush the update as needed. This however became less and less stable over time, specifically starting with 10.12, where the updates would never install successfully on clients. Once we moved to AirWatch, I was happy to find that they also had an OS update mechanism in place. Their agent was able to download and install updates also using the softwareupdate
utility (more on that later), and also interact with the VMware AirWatch Agent GUI in order to show prompts to customers and alert them that they needed to reboot, among other things.In order to utilize the AirWatch Agent for Software Updates, you need to create a “Software Update” profile in AirWatch for macOS. This looks like so:
This profile specifies things like:
- Update Source – This can be pointed at Apple’s catalogs, or an internal SUS
- How to install updates and what updates to install – This has options like “Install Updates Automatically,” or “Download updates in the background,” or “Check for updates only.” It also specifies whether macOS beta updates should be allowed, or app updates should be installed by the Agent.
- Schedule – This allows you to schedule how often to check for software updates.
- Restart – This allows specifying whether or not the agent should restart after updates are installed (for those that require a reboot), and should the customer be given a grace period before the reboot is forced.
https://scoopclever374.weebly.com/blog/mac-screen-light-app. Once you have those settings in place, you can push that profile to the client, and two things should happen:
- A Software Update profile should get installed with any customizations to things like the Software Update Server
- A launch daemon and plist file should end up on the device which are used by the AirWatch agent
So why talk about any of this in the first place? AirWatch does make this quite easy to setup, so is a blog post really necessary? Probably not… But, we recently noticed that devices were not being updated even though the Software Update profile was on the system. This unfortunately meant that if new updates were made available, the devices may see them in the App Store like normal, but we couldn’t ensure their installation, and thus our device’s compliance. The other issue is that since AirWatch does some under the hood magic when setting this profile up with regards to the agent actually enforcing the updates, there was no indication from our console that anything had gone wrong. AirWatch saw that the profile was reported as being installed on the device, so why would it think anything was wrong?
Once I realized we had a bit of an issue with the launch daemon not being present on the systems, the first thing I did was open a ticket with AirWatch to report it!
I started thinking of other ways we could automate software updates, and now that we have a Chef infrastructure setup, I figured that should be pretty easy. We would just need to setup a launch daemon that calls the
softwareupdate
utility, and then the next time the customer rebooted their machines, the latest updates would all get installed.No, don’t do this. This does not offer us very good compliance, as we know customers often go days, weeks, maybe months, maybe only once something stops working, before rebooting their machines. AirWatch has also done all of the hard work for us in having their agent be able to alert a customer, set deferral times, and enforce the reboot if needed, and I wanted to make sure those efforts didn’t go wasted!
I started looking at what was happening on a device that had the Software Update profile installed, and found that on devices that were being successfully updated, a launch daemon was present that was not on other systems. The launch daemon was called
com.airwatch.AWSoftwareUpdateScheduler.plist
and looked something like this:This declares two important things, 1) the binary to run (
AWSoftwareUpdateScheduler
), and 2) the interval at which to run that binary, which corresponded to the software update check interval we set in our Software Update profile.In calling this binary manually and monitoring the logs that it spits out, it became clear that at its core, it was in fact just calling the Apple
softwareupdate
utility. But, it also opened a socket to the AirWatch agent binary in order to be able to show the prompts to the user regarding the reboots, and could essentially wait idle for an extended time and then reboot the machine, again after notifying the user. The interesting thing was when calling this binary on a device that had the Software Update profile installed, had a macOS Update available, but did not have the launch daemon present, it would run the softwareupdate
utility, the update would get installed/staged, but that would be it. There would be no GUI prompt or anything. Running it again, same thing, it would just re-stage the update, but no GUI prompts.This led me to begin looking for other pieces or files that might be on properly configured devices, but not on problem devices. This is when I discovered the
Scheduler.plist
, which contains all of the settings that you specify when setting up the Software Update profile in the AirWatch console. This file lives under /Library/Application Support/AirWatch/Data/
The
Scheduler.plist
file looks something like this:Airwatch Mdm App
Most of these keys are self explanatory and correspond directly to a setting in the Software Update profile we setup earlier. https://scoopclever374.weebly.com/blog/what-default-mac-apps-can-i-safely-remove.
With that new knowledge, I copied that file to a problem device, re-ran the
AWSoftwareUpdateScheduler
tool and lo and behold, when the update was installed/staged, the GUI prompt appeared! This means it should be pretty easy to utilize the AirWatch agent for prompts to our users, but set the settings and ensure they were on the devices using Chef! I would just need to deploy a launch daemon, which with Chef is done using the launchd
resource, and put the Scheduler.plist file on disk, which can be done using the cookbook_file
resource.The other interesting thing I found while looking into this, is that the
Scheduler.plist
file contains a key called gracePeriod
which was set to 7200
seconds for us. This corresponds to the Grace Period set in the Software Update profile, which (annoyingly) has a max value of 2 hours. This is actually something we had wanted to extend further, but since it wasn’t in the GUI, didn’t think it would be possible. But now that we were creating the Scheduler.plist with Chef, maybe we can make the initial reboot grace period longer, something like 8 hours? And wouldn’t ya know it, after setting the gracePeriod
key to 28800
seconds, and running the AWSoftwareUpdateScheduler
, I received a prompt like so:This then would mean that you should be able to get far more granular with just about all of the keys in the Scheduler.plist if managing it directly (i.e. not using the AirWatch console). You could add more deferrals than the GUI allows, get more granular with time in between deferrals, etc.
I did eventually open a support case with AirWatch, since this needs to be fixed in the end as I’m sure many customers rely on it. But, this was a fun way to learn a bit more about the underlying “technology” AirWatch is using to perform and enforce macOS updates, and was once again a reminder of how awesome having a configuration management tool is. Yes, this all could have been done with relatively straight forward bash scripts and deployed via package or something, but this way it is centrally managed and we can ensure it’s compliance on the system.
As always, thanks for reading!
Author:Claire Feeney https://scoopclever374.weebly.com/blog/mac-third-party-apps.
Claire Feeney is a senior product marketing manager at VMware focused on mobility. Her love for reading and writing began at an early age, and she enjoys combining her passion for writing with her interests in mobile technology. An Apple enthusiast since she held her first click wheel iPod, she loves covering technology stories that highlight business transformation through business mobility. Claire graduated from the University of Georgia with a BBA in marketing.
Check out our on-demand webinar to take a closer look at the new technical features for iOS (and macOS) in VMware AirWatch 9.0—including one of the most requested iOS management capabilities.
AirWatch 9.0, now generally available, includes new features and functionality for iOS. There is a new validation process for new or updated Apple Push Notification service (APNs) certificates, eliminating the need for admins to reassign devices and apps the certificate. We’ve also introduced await configuration for Device Enrollment Program (DEP) devices, adding the option to hold users in the Setup Assistant until all commands have been sent. And forcing OS updates—one of the most requested features—is now possible through our compliance engine.
Read on to learn more about enforcing OS updates, and register for our on-demand webinar for a closer look at what’s new for both iOS and macOS in AirWatch 9.0.
OS Updates for iOS Devices via Compliance Engine
iOS 9.3 introduced the ability to force an operating system (OS) update for supervised, DEP-enabled devices. To help admins execute these updates automatically and in bulk, we’ve built new functionality in our compliance engine.
Admins can define the list of devices (via assignment groups) required to update, and the compliance engine will automatically and continually check to ensure devices receive and process the command. This eliminates manual commands, and if a device receives the command but isn’t ready to run the update, it will be reminded automatically without additional action from the admin.
You can find this new automation functionality in our compliance engine as follows:
- Click Devices > Compliance Policies > List View > Add.
- Click iOS.
- For the rule, select OS Version > Less Than or Equal To > and select the highest iOS version that requires an upgrade in your environment.
- As an example, if you want all your devices running iOS 10 or later, select Apple iOS – iOS 9.3.5.
- Click Next, then click Command > OS Updates.
- Click Next and select the desired Assignment Groups and Exclusions.
- Click Next, review the summary and click Finish and Activate.
Airwatch App Catalog Macos Installer
Learn more about our capabilities for Apple mobility management with VMware Workspace ONE, powered by AirWatch, on our iOS management site.