Enable iMessage on Mac for ESXi (in 2017)
Running virtual Macs on ESXi is a great way to become familiar with the operating system and server software without buying your own Mac lab. To install MacOS on ESXI 5.5 and above is pretty trivial, since VMWare’s hypervisor almost natively supports the OS. There are several steps that must be done however before the OS will boot properly, and even still, before iMessage will work.
To install MacOS you will need a legitimate installer for the operating system, which can be produced by any Mac that has purchased the OS. Note: just because your Mac came with a specific version of MacOS doesn’t mean that you have it available in the app store. You must ‘purchase’ it for free before you can make installers for it.
This guide assumes that you are using ESXi 6.5, but specific versions of Unlocker can be downloaded for any version of ESXi that you’re running. Let’s assume you’ve gotten as far as installing and configuring ESXi 6.5 and are ready to make your Mac VM run. I’ll assume you know a thing or two about ESXi as well.
- Create a new VM with 128 mb of video memory and at least 4gb of RAM. These are practically the only requirements to boot macOS, but you can customize it as you like.
- Enable SSH on your ESXi host through the web console.
- SSH into your host and
cdinto your datastore (
- Download Unlocker 2.1.0 from Dave Parson’s Github:
wget https://github.com/DrDonk/unlocker/archive/c6ff390a8793a3cf37f91cad33c5cda803e59165.zipThis script will modify ESXi’s local.sh that will allow MacOS to boot fully.
- Extract the zip file with
cdinside the newly spawned directory and make the esxi script bootable:
chmod +x esxi-install.sh
- Run the script:
- Reboot the host.
- After the host comes back up, you should be able to successfully install MacOS into the VM. Upload your install ISO for macOS that you made before and attach it to the CD drive of the VM. Run through the installer like normal and get your Mac to the desktop.
- Power down the mac and SSH back into the host.
cdback into your datastore (
/vmfs/volumes/yourdatastorename). You should see a folder with the name of your VM. CD into that folder. Do an ls and you should see a VMX file of your Mac:
- Back up this file before making any changes to it:
cp ExampleMac.vmx ExampleMac.vmx.orig
- Now comes the fun part. You’ve already proven that your virtual Mac will install and run, but a lot of features won’t work on it until we can convince it that several of the fake values from our SMC are Apple-esque enough for it. Without these values iMessage will not work. By manually adding the values to the VMX file we make the VM think it’s a Mac.
- Open up the vmx file with vi:
- Find and replace
ethernet0.addressType = "generated"and replace it with
ethernet0.addressType = "static"
- Find and replace
- Look up a random Apple-owned MAC address for your virtual Mac. This is a good place to look through all the Apple owned MAC addresses.
- Convert that string to lowercase and replace your address listed under
ethernet0.Addressso it looks like so:
ethernet0.Address = "d8:a2:5e:00:00:00"
- Add the following lines at the end of the file. This will make your virtual Mac a Mac Pro, the one that’s shaped like a trash can. You can generate values for other Macs with Clover Configurator and use those values here instead:
ethernet0.checkMACAddress = "FALSE"
board-id.reflectHost = "FALSE"
board-id = "F5KLA770F9VM2BC3A"
hw.model.reflectHost = "FALSE"
hw.model = "MacPro6,1"
serialNumber.reflectHost = "FALSE"
serialNumber = "F5KLA770F9VM"
smbios.reflectHost = "FALSE"
efi.nvram.var.ROM.reflectHost = "FALSE"
efi.nvram.var.MLB.reflectHost = "FALSE"
efi.nvram.var.ROM = "3c0754a2f9be"
efi.nvram.var.MLB = "C0720270FQVDKP2AT"
- Save your changes to the VMX file and start it up. If your VM fails to start don’t worry, you can usually fix whatever it doesn’t like by reading the error message posted in the logs at the bottom. If that doesn’t work, you can restore your vmx file from the backup you created.
- Once the Mac has started up fire up iMessage and log in. If all goes as planned you should be presented with a fresh message pad to send iMessages from.
I know this was a quick and dirty tutorial and a lot of details have been skipped, so if you get stuck on any part please let me know in the comments and I’ll help you out!