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
Password: 
Mounting /users/rderewianko/10.12.5.dmg 
macOS version is 10.12.5 
Using VMware Fusion path: /Applications/VMware Fusion.app
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!

 

 

No Comments

Leave a Comment