First of all good to be back. Thanks to everyone who reached out to me during my recovery! 2 months of inactivity puts me in a situation where it urgently time to get back up to speed and up to date with all changes in the MacAdmin world. Apple released iOS13, macOS 10.15 Catalina,… Jamf released Jamf Pro 10.15, 10.16… some Jamf Connect updates… and much more….so more than enough to get back into action!

That said, let’s start with updating our test environment, and one of the things I need on a daily basis are macOS 10.15 Catalina Virtual Machines. Those who have been following this blog for a while (1 Year since I started, 100k hits! Thanks btw!) know that I’m a big fan of automating things, so my preferred way of deploying VM’s is a script running against ESXI which automates the creation of a vFuse based vm.

I might be updating my VMWare Fusion and Parallels Desktop post where needed for Catalina as well, but for this occation I’d like to focus on what I need to automate my VM’s in ESXI:

  • First of all we’ll need to update ESXI to 6.7 update 3 (or 2)
  • Get VMWare Fusion 11.5
  • Get the latest version of AutoDMG
  • Get the latest version of vFuse
  • Tweak the vFuse template to be compatible with Catalina
  • Tweak the ESXI script to be compatible with Catalina

Update ESXI to 6.7 Update 3

So, first of all: ESXI, as this is where my VM is gonna live. Until now I was running ESXI 6.7 and this does not run macOS 10.15 Catalina (VM stuck at Apple Logo at boot). At least for me it was.

Subject to your server, free trial or VMWare licensing you will need to download the ESXI 6.7 Update 3 (or 2). There are multiple ways of updating your ESXI, but my preferred method is using the offline bundle. The reason I prefer this method is because of the simplicity:

  • Upload the bundle (.zip file) to your datastore in ESXI
  • Put the server in maintenance mode
  • Run a command to update ESXI
  • No USB sticks and physical access to the server needed
Note: if you are downloading the .zip bundle on macOS it might automatically unzip it depending your system preferences. If that's the case, compress it again but make sure to only add the subfolders and files to the archive and not the main folder where the content was zipped to. The hierarchy of files and paths of the zip file needs to be maintained.

After uploading the bundle to the datastore, and putting the server in maintenance mode, the only thing left to do is run the following command:

esxcli software vib install -d “/vmfs/volumes/Datastore/DirectoryName/”

If all goes well, you will end up with a long block of text confirming the update is completed. Reboot your server and DONE!

VMWare Fusion 11.5

Because vFuse needs VMWare Fusion to be running, and we need Catalina support, we need to upgrade our VMWare Fusion to 11.5. Get your free trial here if needed.

Update AutoDMG

vFuse needs a macOS DMG to create the VM, so no better tool imo than AutoDMG. I used the (at this moment of writing) pre-release version v1.10b587 which worked fine. Well, with one remark, see below.

Update vFuse

With VMWare Fusion 11.5 goes a compatible vFuse version, so I went for the latest (at this moment of writing) version 2.2.5.

vFuse Template

Those who are unfamiliar with vFuse might want to have a look at one of my previous post here, but for those who just want to know what to change in the template, here is my basic template to use with vFuse. Obviously this can be tweaked to your needs (or you could decide not to use a template at all), but for all those fancy things I’ll have to refer you to the vFuse wiki here.

For me the following template is more than enough:

    "source_dmg": "/Users/TTG/Desktop/AutoDMG Builds/osx-10.15.1-19B88.apfs.dmg",
    "output_dir": "/Users/TTG/Desktop/vFuse Builds",
    "output_name": "macOS151",
    "hw_version": 15,
    "mem_size": 4096,
    "disk_type": 0,
    "bridged": true,
    "enable3d": false,
    "hw_model": "MacBookAir7,1",
    "serial_number": "C02S80QWERTY"
Note: The template above has all the attributes needed for making the VM compatible with Apple's Automated MDM Enrolment (previously DEP). Important here are the HW Model and Serial Number which must match an existing device of your ABM or ASM account. Also, the VMWare Hardware Version is set to 15 to make it compatible with ESXI. VMWare Fusion uses HW Version 16, but you can upgrade the VM at first boot if you would decide to use it in VWare Fusion (you will be prompted to do so anyway). More about VMWare HW Version here.

ESXI Script

Once again I’ll refer to my previous post here for a detailed discussion about this script, but I you’ll find the updated version with Catalina support on my github here.

The main thing I changed is adding darwin19-64 (representing macOS Catalina) and VMWare Hardware Version 15 to the script.

Upload the script to a suitable location in your ESXI Datastore.

As mentioned in my previous post, once again all credits go to Rich Trouton for this script. I only changed some numbers again!

Putting it all together !

So, with all the above updates you should be good to build a VMWare Fusion VM running Catalina, compatible with Apple’s Automated MDM Enrolment.

Note: For those who are not interested in auto-enrolling in MDM, just remember that a HW Model and SerialNumber is still required. In this case it does not need to be matching an existing device, but the HW Model must still be an existing (current) Mac model. The serial number can be anything you want, but must be alphanumeric (no special characters) and of the same lenght of a normal serial number.

Just follow the steps in my previous post:

  • Create a macOS DMG with AutoDMG
Note: I mentioned earlier that I had 1 remark. The pre-release version I used worked fine, but I had to move the macOS Cataline installer into a DMG to make it work. To do this add the installer to a folder and use Disk Utility to create a new DMG from that folder. Without this step, the build process of AutoDMG errors.
  • Run vFuse using the dmg above and the template. Run the following command in Terminal after installing vFuse:
vfuse -t /path/to/template.json
  • Grab the .vmdk file from the package content of the VM and upload it to your ESXI Datastore.
Note: in my previous post I mentioned 2 VMDK files. A normal one and a flat one. In my current test I only get 1 .vmdk file. Need to check why, but just using that 1 file seemed to work fine.
  • Run the ESXI Script in the ESXI console (or over SSH):
/vmfs/volumes/SSD/Scripts/ -n macOS10_15_1 -d /vmfs/volumes/5b6e08bb-4e1d2549-f33c-685b35d36842/Templates/macOS151.vmdk
Note: make sure to change the path to the script matching the location in your datastore, as well as the location and filename of your vmdk file.

Grab a coffee… and wait for your VM to be deployed. The heavy lifting is done only once. From the moment you have the vmdk and the script in ESXI, creating new VM’s over and over again is just a matter of running the ESXI script again, or adding a button in iOS with Shortcuts 🙂

Just remember that for those who are using VMWare Fusion, you can stop after creating the VM with vFuse. I’ll have a look at the manual creation of Catalina VM’s in VMWare Fusion and Parallels Desktop later, and update the blog accordingly where needed.

That’s all folks! I hope this quick first post post my absence is somewhere usefull for someone. At least it’s a start to get back into bloggin action!

As always, if you like this blog, tell your friends about it and leave a comment down below. Don’t hesitate to correct any mistakes or add some additonal value!