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

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!


  • 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.


  • Craig Cohen January 16, 2018 at 6:30 am

    I updated to vFuse 2.
    It created the 10.13.2 VM fine but it is not receiving the DEP information.
    An older iteration I created with 10.12.6 is working fine.
    VMWare Fusion 10.1.1

    • rderewianko February 6, 2018 at 4:26 pm

      Hi Craig, when you go into your VM for 10.13 does it show a serial number in the about page?

      what happens when you try using depnag “/usr/libexec/mdmclient dep nag”

      • kris February 12, 2018 at 9:23 am

        I’m having something similar, but `dep nag` shows my DEP configs, and the “About This Mac” dialog shows the serial number I used.

        • rderewianko February 16, 2018 at 1:51 pm

          Does SA trigger a dep window during the process?

          • Kris February 16, 2018 at 2:02 pm

            No, it doesn’t. It’s just the vanilla Setup Assistant. Would that point to network as a culprit?

          • Kris February 16, 2018 at 2:14 pm

            Just tried on a known good pre-stage (am using a serial that’s in DEP, and is part of the pre-stage, but the machine is off and in a closet somewhere, unconfigured).

            Tried auto-detect network, tried bridged, etc. Not sure where it’s getting missed in Setup Assistant. The OS dmg is 10.12.6 from AutoDMG built a while back.

          • Kris February 23, 2018 at 1:00 pm

            I’ve gotten this to work, and I think the key was to define the hw_version for vfuse.

            I followed, using template help from vfuse’s github:

          • rderewianko February 24, 2018 at 6:07 pm

            interesting, because hw_version defines the hw that vmware fusion runs… I wonder if Fusion 10 has something that breaks this (Ill upgrade my hardware version of my test vm on monday and see)

          • Kris February 24, 2018 at 6:12 pm

            I’m running 10.12.6 on guest and host, with latest VMware fusion, fwiw.

  • Creating a DEP VM using Parallels Desktop | Jer Because February 9, 2018 at 10:10 am

    […] 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 […]

  • Neal Smith February 13, 2018 at 12:36 pm

    Any reason why i am getting a “null” can automatically configure your computer. It must see the serial number or this wouldn’t come up. after I click it it says “unable to configure your mac an error occurred while obtaining automatic configuration settings.

    • rderewianko February 16, 2018 at 1:51 pm

      What do you see when you run dep nag in a logged in window.

  • Scott January 9, 2019 at 2:45 pm

    correct patch to vfuse (at least in the latest version /usr/local/vfuse/bin


Leave a Comment