What’s different about VMs
The same Apple constraint applies across all three platforms: Apple Business Manager (ABM) does not support virtual machines, so the zero-touch automated enrollment paths ( for Jamf, ADE for Intune) aren’t available for MacStadium VDI desktops. On macOS 10.13 and later, the available route is user-driven enrollment, which installs an profile the user must explicitly approve in System Settings. That approval step can’t be automated away. What you can do is get it down to a single click: a LaunchDaemon baked into the golden image preps the VM at boot, and a LaunchAgent surfaces the enrollment prompt at first login. On macOS 11 or later, Apple’s documentation confirms that Macs enrolled via profile-based Device Enrollment (the mechanism Jamf UIE, Intune Company Portal, and Iru’s Enrollment Portal all use) are supervised. ABM is not required for supervision on macOS 11+. This means Orka VMs running macOS 11 or later will be supervised after enrollment. See each platform’s tab for details on what this enables. Because the MDM profile is installed without ABM, a user with local admin rights can remove it after installation. See Security considerations before deploying to environments where MDM persistence is a compliance requirement.- Jamf Pro
- Microsoft Intune
- Iru (Kandji)
How it works
Two components go into your golden image.A LaunchDaemon runs at boot as root. It downloads the Jamf binary from your Jamf Pro server, installs the management framework, and creates a computer record in Jamf Pro. No user interaction required.A LaunchAgent runs at each login. If MDM enrollment isn’t complete, it shows the user a dialog and opens Safari to the Jamf enrollment page. The user completes authentication, clears the pre-filled username field, clicks Enroll, clicks Download, then approves the profile in System Settings > General > Device Management. The prompt repeats at each login until enrollment is confirmed, then removes itself.Both components remove themselves once MDM enrollment is confirmed.What you need
- Your Jamf Pro instance URL (for example,
https://yourcompany.jamfcloud.com) - Jamf Pro admin access to configure User-Initiated Enrollment
- Access to your Orka golden image
Step-by-step instructions
Step 1: Enable User-Initiated Enrollment
- Click Settings at the bottom of the left sidebar.
- Under the Global tab, select User-Initiated Enrollment.
- On the Computers tab, confirm user-initiated enrollment is enabled. Save if you made changes.
Step 2: Create an enrollment invitation
Enrollment invitations in Jamf Pro 11 live under Computers, but may be inside the UIE settings screen in previous versions.- Click Computers at the top of the left sidebar.
- Click Enrollment Invitations in the sidebar.
- Click New and follow the prompts. Set the expiration date as far out as your instance allows, and align it to your image rotation schedule so the invitation doesn’t go stale before you re-seal the image.
- Scope the invitation to a specific Jamf site or LDAP group if needed.
- After saving, open the invitation record and copy the Invitation ID. This is the value you’ll use as
INVITATION_CODEin both scripts below.
Step 3: Create the LaunchDaemon script
Add the following script to your golden image at/usr/local/bin/jamf-enroll.sh. Fill in your JSS_URL and INVITATION_CODE, and swap out com.yourcompany for your reverse-domain identifier throughout.Step 4: Create the LaunchDaemon
Add this to your golden image at/Library/LaunchDaemons/com.yourcompany.jamf-enroll.plist. Update the label to use your reverse-domain identifier.Step 5: Create the LaunchAgent script
Add the following script to your golden image at/usr/local/bin/jamf-enroll-prompt.sh. Fill in your JSS_URL, INVITATION_CODE, and reverse-domain identifier.Step 6: Create the LaunchAgent
Add this to your golden image at/Library/LaunchAgents/com.yourcompany.jamf-enroll-prompt.plist. Update the label to use your reverse-domain identifier.Step 7: Seal the golden image
- Don’t load the LaunchDaemon or LaunchAgent in the image itself. They load on first boot and first login of each provisioned VM.
- Confirm no MDM profile is already enrolled:
profiles status -type enrollmentshould return “MDM enrollment: No”. - Confirm no Jamf management framework is already installed. If
/Library/Application Support/JAMF/exists, remove it before sealing:sudo rm -rf "/Library/Application Support/JAMF/". - Publish the image in Orka.
Verifying enrollment
After provisioning a VM from your updated golden image:system_profiler SPHardwareDataType | grep UUID). Confirm a computer record was created and check the Management tab to verify the MDM profile is listed.A few things worth knowing
Each VM gets its own record. Orka assigns each VM a unique hardware UUID, so every desktop shows up as a separate computer in Jamf. When you destroy and reprovision a VM, the new instance creates a new record. Stale records from old VMs stick around until you clean them up manually, so plan for that in high-churn environments.Watch your invitation expiry. If the enrollment invitation expires, the script hits its retry limit and stops trying. For long-lived golden images, set the invitation to “Never Expires.” If you rotate invitations, update the script and re-seal the image before the old code goes stale.The image contains credentials. The enrollment script has your Jamf server URL and invitation code baked in. Apply the same access controls to this image that you’d use for any artifact holding credentials.VMs on macOS 11+ are supervised via profile-based enrollment. Per Apple’s documentation, Mac computers running macOS 11 or later that enroll via profile-based Device Enrollment (which is what Jamf User-Initiated Enrollment uses) are supervised, no ADE required. This means supervision-gated features (kernel extension policy, certain payload payloads) are available. Note that Jamf UIE does not set the profile as non-removable by default; for that, your Jamf administrator must configurePayloadRemovalDisallowed in the enrollment profile.If enrollment isn’t triggering, check /var/log/jamf-enroll.log. The most common causes are the VM not having network access when the daemon first runs, an expired invitation code, or an MDM profile already present in the image before sealing.Security considerations
The following applies across all three MDM platforms, with tool-specific notes where the behavior differs. A user with local admin rights can remove the MDM profile, unlessPayloadRemovalDisallowed is set. Because Orka VMs enroll via profile-based Device Enrollment (not ADE), the MDM profile is removable by default. A user with admin access can open System Settings > General > Device Management and click Remove Management. To prevent this, your MDM must explicitly set PayloadRemovalDisallowed in the enrollment profile. Jamf, Intune, and Iru all support this setting, but it’s not enabled automatically on user-initiated enrollment flows. Check your MDM’s enrollment profile configuration. For Intune specifically, losing the MDM profile triggers a Compliance policy non-compliance state, which Conditional Access can use to automatically block access to corporate apps, a useful side effect that Jamf and Iru don’t provide natively.
The LaunchDaemon provides partial recovery, not prevention. The daemon is configured with a StartInterval of 300 seconds, so it re-runs every five minutes and checks enrollment state. If the MDM profile has been removed, the daemon detects the unenrolled state but cannot reinstall the profile silently on an unsupervised device. For Jamf, the daemon can re-create the computer record and reinstall the management framework on its own, but the MDM profile approval still requires user action. For Intune and Iru, the daemon can only ensure the LaunchAgent is in place to re-prompt at next login. It can’t force the click-through. There is also a gap window of up to five minutes between profile removal and the next daemon run during which the VM is unmanaged.
Restrict local admin if MDM persistence is a compliance requirement. The most effective control is to not give the end user admin rights on the VM. Without admin, the user can’t remove a profile from System Settings, and the most common removal vectors (profiles remove, MDM payload deletion via the UI) require elevation. Standard-user accounts on the VM, with admin held by a separate provisioning identity, close most of this gap.
Monitor for unenrollment. Treat lost MDM enrollment as an event worth alerting on.
- Jamf: Create a smart group with the criterion “MDM Profile Removed” is “Yes”, or “Last Inventory Update” older than your expected check-in interval. Configure a webhook, email notification, or policy that fires on smart group membership changes.
- Intune: Create a dynamic device group in Entra ID flagging devices whose
lastSyncDateTimeis older than your expected check-in interval, or whose enrollment state has dropped. Wire it to an Azure Monitor alert or a Logic App webhook. - Iru: Use the Iru admin console’s device compliance views to surface unenrolled devices.
References
Jamf Pro Microsoft Intune- Set up enrollment for macOS devices in Intune
- Enroll virtual macOS machines for testing
- Troubleshoot macOS VM enrollment in Intune
- User-approved enrollment
- Get an Apple MDM Push certificate for Intune

