Skip to main content

Test macOS ADE (DEP) Enrolments with a Virtual Machine

Description

Testing macOS device enrolments can be very time consuming, since a device must be erased and OS reinstalled on each attempt.  A Virtual Machine (VM) may be used to substantially reduce the amount of testing time.  Although VMware has been used in this example, other Virtualisation software could be used, e.g Parallels.

Requirements

  • Copy of VMware Fusion
  • macOS installer, e.g. Install macOS High Sierra.app or a VMware Fusion installed on a relevant macOS device
  • A registered macOS device serial number and optionally a Model Identifier, e.g. MacBookPro15,1

Obtain a serial number for a device that is registered in ABM or ASM.

Any one serial number of a device should only occur once in FileWave.  Therefore, if there is an old or broken device which is registered in ABM/ASM, consider using the serial number from this device otherwise a serial number from a usable, physical device will need to be taken, meaning that physical device cannot be used within FileWave otherwise.

Mactracker may be used to show the Model Identifier of devices, since ASM/ABM only provides the Model Name

Directions

  1. Use VMware Fusion to create a new image from disc and use the macOS installer app or choose to create an image from the recovery partition
  2. Once completed, do no hit play.  Instead, locate the virtual machine in Finder.  If the VM starts, shut it down before continuing.
  3. From Virtual Machine Library, right click and choose show in Finder.
  4. From Finder, right click the highlighted VM and choose 'Show Package Contents' or use Terminal to navigate inside this VM
  5. Locate the file with a .vmx extension and choose an editor to edit this .vmx file
  6. Two lines need to be added as below.  Replace Serial Number and Model Identifier as appropriate (remove brackets, but keep quotes):

    serialNumber = "[Serial Number]"
    hw.model = "[Model Identifier]"
  1. Now Play the VM
  2. Select language and once the option to re-instal the operating system is shown, choose utilities and Terminal
  3. Type the following line to confirm that the VM has the appropriate serial number:

    ioreg -l | grep "IOPlatformSerialNumber"
  1. Quit Terminal and choose to re-instal the operating system
  2. Have a cup of tea!
  3. Disable network settings at the earliest, allowable moment, before the device comes back up and finalises the installation
  4. Snapshot the VM when the Choose Language prompt is shown

A device receives an associated DEP profile before the option to select the language appears after installing the operating system. Once in place, the device will maintain this profile across reboots.  If the network is not disabled before receiving the Enrolment profile, then changes to the Enrolment profile associated or assigning a new DEP profile subsequently, will have zero impact on a fresh Enrolment; the original Enrolment settings will continue to apply.

By disabling the network before the Enrolment profile is in place and then taking the snapshot, multiple Enrolment profiles or changes may be tested with each restore of the snapshot.  On each restore, the network should require enabling.

Tested on VMware Fusion 10, 11 and 12