I’ve been running OS X El Capitan on ESXi for quite a while now and I love it!
This is a new and updated version of my guide on how to install Mac OS X Yosemite on ESXi. This guide will assume that you already have ESXi running and access to a real Macintosh in order to make the installation disk.
Enable OS X support on ESXi
ESXi doesn’t support OS X out of the box so you’ll have to unlock this feature before creating the virtual machine. Fortunately it’s quite simple and all you have to do is to download an unlocker tool from insanelymac.com. There are two versions of the unlocker tool currently available. VMware Unlocker for OS X 1.3.0 used for ESXi 5.0/5.1/5.5 and Unlocker 2.0.8 for ESXi 6.0. Please note that you will need to register on the site in order to download these files.
Follow these instructions in order to install the unlocker tool:
- You need to enable SSH on your ESXi host. In order to do that, login to your host using the “VMware vShpere Client” and navigate to Configuration->Security Profile. From here click on “Properties” in the upper right corner where it says “Services”. The “Services Properties” dialog should appear and from there you can click on SSH->Options and choose “Start and stop with host”. Click Start and then close all of the open windows.
- Depending on your operating system, you will need to download WinSCP or another SCP-client in order to transfer the unlocker-files. Make sure you extract the files somewhere on your client and connect to your ESXi host using the IP-address and the user root. Once connected, navigate to /vmfs/volumes/datastore01/ , replacing “datastore01” with your actual datastore name. Create a new folder called tools and transfer the unlockerXXX directory.
- Now cd into the uploaded directory and ensure the ESXi scripts have execute permissions by running chmod +x esxi-install.sh and chmod +x esxi-uninstall.sh. Finally install the unlocker by running the install script ./esxi-install.sh.
- Reboot your ESXi host
1. Any changes you have made to local.sh will be lost. If you have made changes to that file, you will need to merge them into the supplied local.sh file.
2. The unlocker runs at boot time to patch the relevant files and it now survives an upgrade or patch to ESXi as local.sh is part of the persisted local state.
Prepare the installation disk
You’ll need a Macintosh in order to create the installation disk. The first step is to obtain a copy of the latest version of the Mac OS X operating system. The easiest way of doing that is to launch the App Store and search for “OS X” or take a look at the “Quick Links” on the right hand side. Next click on download, and authenticate with your Apple ID to start the download.
When the download is complete it’s time to extract the installer from the package. First close the OS X installer by right clicking on its icon in the dock. Next open Finder and go to “Applications”, right click on “Install OS X El Capitan” and select “Show package contents”. Navigate to /Contents/SharedSupport/ and copy InstallESD.dmg to the desktop.
Since ESXi doesn’t support dmg files, we’ll need to convert the file. The easiest way to do that is by opening the Terminal and type the following commands.
First let’s change the directory to the Desktop.
Download the script
curl -o createdisk.sh https://idmedia.no/wp-content/uploads/2015/12/el_capitan_createdisk.sh_.txt
It will take some time to complete, but should create a OSXInstaller.iso file on your Desktop when done.
Create the virtual machine
The next step should be fairly simple if you have used ESXi before. As usual open your datastore and transfer the iso to wherever you normally store your installation media. Then create a new vm, select “Typical” and you should be able to select “Other” and then “Apple Mac OS X 10.10 (64-bit)”. Complete the wizard, mount the iso and install Mac OS X as usual. Please note that you must format the hard drive using the “Disk Utility” before it will be visible in the installation wizard.
Configure the virtual machine
It’s very important to install the “VMware Tools” as soon as possible after the installation has finished. Choose to mount a new CD/DVD from datastore and select darwin.iso from /vmimages/tools-isoimages/. Without “VMware Tools” Mac OS X might not awake from sleep and in general be very unreliable. I also recommend to turn off sleep and the screensaver in settings as these may cause issues or unnecessary high load in general. Especially the screen saver may in some cases takes up quite a lot of resources.
While most features work out of the box you won’t be able to change the display resolution to anything else then 1024×768. Fortunately there’s an easy workaround for changing the display resolution.