Why?

I imagine that’s the first thing that comes to mind. Well, just about everything server-wise is virtualised and centrally managed, so when the requirement came that more macOS power was required for building apps, it made sense to do the same here. There is just one problem – official support.

The lack of official support for Mac minis means there isn’t a lot of information out there for installing ESXi on Mac minis. Most of what I could find was a little outdated and focused on the 2012 model. This model is popular because it’s upgradable and gave you a bit more control over the hardware, unlike the most recent 2014 model which is what we got. In fact we got 4 of them, each with a 256GB SSD and 16GB RAM. Sadly they only have a single Ethernet port, so we got some thunderbolt to gigabit Ethernet adapters, which I’ll come to later. Finally, we also got four 16GB Sandisk Ultrafit USB 3.0 drives to install ESXi on to.

Seeing as I wasn’t 100% confident that this would actually work, the first thing to do was power up one of the Macs and set up macOS. This was so I could create a backup image and burn it to a USB stick, so if this did fail miserably I wouldn’t be left with 4 expensive but shiny bricks. I also needed an ISO to create the VM’s from – just a minor detail.

Once that was done we could start with the fun stuff – installing ESXi. My first attempt was with the latest and greatest that VMware had to offer with version 6.5 U3. All I’ll say about this is if you are thinking of doing it, don’t. There were various issues and to put it simply, it wasn’t a happy bunny.

Next up – 6.0. This installed perfectly. It was quick and easy and I was able to format the SSD as a datastore without issue. So that’s the end of it, right? Nope.

Our VMware clusters are all based on 5.5, so all of the licenses are for 5.5. We weren’t in a position to upgrade everything to 6.0 just yet, and we weren’t going to just for the sake of a few Mac minis. The project was also in the Proof of Concept stage, so 5.5 it was.

First impressions were good and 5.5 installed without issue. However, when I went to create a datastore on the SSD, it wasn’t there. I knew straight away what the problem was – drivers, or more specifically, lack of. I’ve built custom ESXi images in the past for this reason, but I was dealing with a Mac. Good luck finding out the exact model of the SSD, let alone an appropriate driver to go with it.

A few too many hours were spent trying to create custom images and sideloading drivers through the CLI before I was pointed to this article, which showed how to enable support for other drivers. Among the list of supported devices was one that I thought was what the Mac mini used – Samsung XP941 PCIe SSD. Out of pure hope I got in to the command line, followed the guide in the article, rebooted the mac and crossed my fingers…

IT WORKED!

Datastore created, ISO uploaded and VM created, but would the VM boot? Yes, happily.

So all done now, right? Well, not quite. Firstly I needed to create a new cluster in Vsphere and add it in. That was easy enough.

Secondly, and one of the main reasons why we wanted the virtualise macOS in the first place, was connecting the Mac’s to the SAN so that they can have a shared datastore where templates and snapshots could be stored for easy management. Here is where those thunderbolt adapters come in. I have to admit I had no idea if this would actually work. However, with the adapters plugged in, Mac’s rebooted and some configuration changes on our SAN and voila, I had performed black magic.

I had a fully functioning ESXi install running on a Mac mini hosts with a shared datastore on a local SAN and managed within Vsphere. I just needed to do it 3 more times… but I did and this is the result.

Four Mac hosts, each with a macOS VM with 2 cores, 4GB RAM and 60GB disk. This allows for 2 or 3 VM’s per host. It doesn’t sound like a lot, but it’s doubling the capacity of the physical hosts as well as enabling better management and disaster recovery.

In case you were doubting me, he’s some proof that they are indeed Mac minis.

Here you can see the local datastore as well as the shared datastore located on the SAN.

There we have it, a Mac mini ESXi 5.5 cluster. I’ll go pat myself on the back.