How to create a VM that’ll work with DEP on VMware Fusion

¬†As of 2019-10-07 to create a Catalina VM you’ll need to use vfuse 2.2.4 and Fusion 11.5

Shout out to Mike for the following observation

As of macOS 10.14.3, the hardware must meet the minimum system requirements for macOS 10.14.

Edit: As per a comment below the location of vfuse has been correted

This often comes up in #Macadmins How Do I setup a VM that’ll work with DEP.

Todo this in Parallels:

Jeremy Baker has a great post on that here

Todo this in VMware:

We’ll need a few things:

  • VMware Fusion (pro or standard)
  • A Bootable DMG of what we’re going to use with DEP
  • vfuse
  • A Serial Number of a real machine currently apart of your DEP Portal.

First you’ll have to create a bootable DMG that vfuse can use. You can create one using AutoDMG. Rich has a great post on how to use AutoDMG here

Then, we’ll also need vfuse (Thanks Chilcote!!)

Once vfuse is installed, we’ll utilize it to create our VM with a serial number. Along with the bootable DMG we created above.

While DEP doesn’t really care about the hardware, it does care about the serial number.

The MDM provider in some cases, as pointed out by Erik in some cases does.

To do this we’ll run the following command:

sudo/usr/local/vfuse/bin -i <locationtoyourdmgcreatedfromautodmg>.dmg -n "<your vm name>" -s <Dep Serial Number here> --hw-model <hardwaremodelhere>

With data the command would look like this:

sudo/usr/local/vfuse/bin -i /users/rderewianko/10.12.5.dmg -n "macOS10.12.5" -s C03LJ41LFH00 --hw-model MacBookPro8,2
Mounting /users/rderewianko/10.12.5.dmg 
macOS version is 10.12.5 
Using VMware Fusion path: /Applications/VMware
Converting DMG to VMDK Hiding file extension 
Populating VMX file Unmounting 
Base OS DMG VMware Fusion VM created at /Users/rderewianko/macOS10.12.5.vmwarevm  

You can now click on your file and it’ll run in vmware.

Note: adding –snapshot to the string above will also create a snapshot if you’d like.

If its a prebuilt vm, you can edit the VMX.

This can be done by.

Locating your vm (usually in ~/Documents/Virtual Machines)

Right clicking on it, and going show package contents

Next Locate the .vmx file, right click and open it with whatever your favorite text editor is.

Add the lines:

serialNumber = “serial_here” to the end of the file and save.

hw.model = “model_here”

eg: in our case, we’ll use MacBookPro8,1

hw.model = “MacBookPro8,1”

Now boot your VM!