Not sure who made the decision, but at some point in the past, my org decided to standardize on Parallels Desktop instead of VMware Fusion. Overall this is fine, but I have found Parallels struggles a bit more with testing things like preboot stuff, such as FileVault. The other thing that Parallels (or really the community) is lacking is guides and tools for MacAdmin tasks using Parallels. Most admins I’ve seen, or guides I’ve found, use VMware Fusion for their macOS VM testing. Since I don’t have a license for that, but have Parallels at my disposal, that’s what we had to make work.
We have just recently started acquiring DEP-enrolled Macs, and with that, wanted to put to test our planned workflow for provisioning a new machine. I knew other admins tested DEP with VMs as I’d seen chatter about it on Twitter and the MacAdmins Slack. But I’d be lying to say that I knew how to create a DEP VM, and thus we were using a physical device and just wiping it… repeatedly. After about the 10th wipe, and literally a full day of (barely) testing, we came to the conclusion:
“There has to be a better way!”
Based on a few guides I found online, and particularly this straightforward one by Ross Derewianko, I realized it should be quite easy, just set the VM’s Serial Number and Hardware Model.
To jump straight to the instructions, see the Creating the VM.
Setting the Device Hardware Model
A Parallels’ VM config file is slightly different than VMware Fusion’s, and we aren’t able to set the hardware model in the
config.pvs file like you can in Fusion’s .vmx file. In order to set the hardware model, we have to set a “boot flag” in the VM’s settings. The key for this flag is:
An example of this would be:
Setting the Device Serial Number
The config.pvs method
Unlike the Hardware Model, you can set the Serial Number in the config.pvs file. This file is located within the VM, so you have to find the VM location (normally under ~/Parallels/VM_NAME.pvm/). Right-click the VM and choose “Show Package Contents” and then open the config.pvs file into your desired text editor. The “SerialNumber” key is within the “General” key.
The boot flag method
You can also set the Serial Number via a boot flag, similar to setting the hardware model. The key for this flag is:
Creating the VM
Unlike some of the instructions I saw for Fusion, I was not able to change the settings of a pre-existing Parallels VM to make it into a DEP-enrolled VM. Therefore, the instructions below are how to create a new VM with the Serial Number and Hardware Model set to spoof a DEP device. NOTE: You will need a downloaded copy of a macOS Installer on your device before proceeding.
- Begin by opening Parallels Desktop and choose to create a new VM
- Choose the Install Windows or another OS from a DVD or image file
- Choose the macOS installer you downloaded previously.
- Continue through the prompts to create a bootable disk image file, and choose where to save it on your device.
- In the Name and Location window, be sure to check the box at the bottom that says Customize settings before installation. This is crucial, as this is how we’ll set the boot flags mentioned above before the machine is ever provisioned
- Once the VM Configuration screen appears, change the Hardware tab and select the Boot Order option.
- Expand the Advanced Settings and in the Boot flags text box, enter the necessary pieces as documented above. For example:
- You can now close the Configuration window and Continue provisioning the VM.
After successfully setting the two required DEP pieces, if we boot our VM we should see it bring us to the “Remote Management” screen!