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

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

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/vfuse -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/vfuse -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.



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!




  • Devlin Ford December 14, 2017 at 4:23 am

    This is great, except I’m getting the following error right after the command mounts my AutoDMG dmg:

    [Errno 2] No such file or directory: ‘/Volumes/Recovery/System/Library/CoreServices/SystemVersion.plist’

    Then it unmount Base OS DMG

    The name of the AutoDMG dmg automatically added .afps after the OSVersion and Build ?

    • rderewianko December 27, 2017 at 7:12 pm

      Sorry WP isn’t notfying me of comments.

      From the error, and considering time’s passed a bit, i’d suggest testing a newer version of 10.13.x and autodmg

      • Devlin Ford December 27, 2017 at 7:15 pm

        Thanks Ross!

        Good timing, I got this sorted today. Turns out, my vfuse version was old. Upgraded to 2.0, boom…working.



Leave a Comment