Installing OS X El Capitan or later on ESXi

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:

  1. 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.
  2. 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.
  3. 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.
  4. Reboot your ESXi host

Note:
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

Run it

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.

 

Share this:

49 comments, add yours.

Klaus Löfflad

Hi. VM freezes with a spinning ball after around ¾ of booting ElCapitan.iso. Already had this issue once?

Benjamin Krause

Benjamin Krause

Author

Hi, are you using ESXi 5 or 6? You may try the following:

After creating the VM go to the datastore and download the .vmx file. Try to add or modify these two values and upload the edited file, overwriting the existing one:
smc.present = “TRUE” smc.version = “0”

Klaus Löfflad

Hi. It seems to be an issue of the client. I tried to use the ui since there is no esxi mac client. After I tried on windows to create the VM it actually worked.

Benjamin Krause

Benjamin Krause

Author

Good to hear that you got it working! 🙂

Andrew

Hello Benjamin. Thank you very much for detailed guide. I have only one question. Do I need to enable OS X support on ESXi that is installed on a Mac computer?

Benjamin Krause

Benjamin Krause

Author

Hi Andrew, you’ll need to run the unlocker tool in order to be able to run OS X.

Vergil

Hello
I watched your video on youtube and follow your processes order by order
but the installation freeze when the white gauge reaches the middle
im using HP g7 and im running ESXi 6
Best Regards

Benjamin Krause

Benjamin Krause

Author

I’ve received feedback from quite a few people who struggle with this, but I can’t reproduce it. Have you tried to set the following parameters in the vmx file?

smc.present = “TRUE”
smc.version = “0”

Dan

Awesome guide, helped a complete n00b get up and running.
Just wanted to share some additional hints in case someone else runs into them:

For the hanging/freezing installation, the following worked for me:
VM options -> Advanced -> Configuration parameters

ich7m.present true
smc.present true
smbios.reflectHost true

Also once installed, my sata hardware wasn’t detected. I had to enable additional support:
esxcli software acceptance set –level=CommunitySupported
esxcli network firewall ruleset set -e true -r httpClient
esxcli software vib install -d http://vibsdepot.v-front.de -n sata-xahci

from:
http://www.v-front.de/2013/11/how-to-make-your-unsupported-sata-ahci.html

Keep up the good work, love reading your stuff.

Benjamin Krause

Benjamin Krause

Author

Thank you so much for your comment! Appreciate the additional info!

eyal

Do anybody here know how to connect an iPhone or an Android Phone to OSX on ESXi VM?
The VM recognize a simple disk on key flash drive. but it fails to recognize an iPhone at all, nor can it open an Android machine .

aufdenschlips

Thank you for the tip concerning the smc paramters! Solved my install hang on a HP Micro Gen8.

Alex

Hello,
my install hangs on the apple logo too, i have tried to make your changes in the vmx but no luck. I try to install el captain on ESXi 5.1 build 2323236.

Benjamin Krause

Benjamin Krause

Author

I haven’t tried it on ESXi 5.1. I would probably recommend to upgrade to ESXi 6.0 first if possible. 🙂

Chuck Brantley

I have El Capitan installed on ESXi 5.5, but I can’t get VMWare tools installed. It fails during installation. Is there something special that needs to be performed.

Chuck Brantley

Disregard, I finally got them installed.

Benjamin Krause

Benjamin Krause

Author

Does it provide you with an error message? It shouldn’t require any special steps. Be sure to check the log file /tmp/vmtools.log (if I remember correctly).

Scott

SP-iMac: Desktop Sp$ sh createdisk.sh
createdisk.sh: line 1: syntax error near unexpected token newline'
createdisk.sh: line 1:

Hello, seem to be getting this error when trying to run the script. Any ideas?
Thanks

Benjamin Krause

Benjamin Krause

Author

Did you download the script using the curl command above? I’m not able to reproduce that error. Please download the script again and open it with nano or similar to verify that no extra characters are added to the first line of the script.

Scott

I downloaded it again and ran the script and still received the same error messsage. I downloaded the script as noted above. I checked the script and it looks normal.

Scott

Is there any other way I can convert this DMG to an ISO?

Scott

Moved?? do you have a new address of the script file?

301 Moved Permanently

Moved Permanently
The document has moved here.

Apache/2.4.7 (Ubuntu) Server at idmedia.no Port 80

scott

ok located the proper script, but it saved it as a name of “OS X Base System” cdr.dmg. How do I convert this to iso?

scott

all good now! thanks for your help. I was looking at the script but it was the one on the website and not the downloaded one, Thanks Much!!

Benjamin Krause

Benjamin Krause

Author

Good to hear that you got it working. 🙂

Anton

Downloaded capitan, converted to iso, made the following changes on esxi6

ich7m.present true
smc.present true
smbios.reflectHost true

Also once installed, my sata hardware wasn’t detected. I had to enable additional support:
esxcli software acceptance set –level=CommunitySupported
esxcli network firewall ruleset set -e true -r httpClient
esxcli software vib install -d http://vibsdepot.v-front.de -n sata-xahci
(rebooted)
Apple logo ,then “waiting for a connection”…then it shuts off. Any ideas?

Running on an old Dell poweredge r805 with amd opteron cpu

William Reigle

I was getting the spinning beach ball at about 75% of loading the installer when using the VMware web GUI. After countless attempts I installed the desktop client and got El Capitan installed successfully on the first try. Damn you VMware web client.

Mike

Has anyone had any luck getting iMessage to work using this method?

Frank

This is the error I’m getting when I try to create the iso.

createdisk.sh: line 1: syntax error near unexpected token newline'
createdisk.sh: line 1:

any help?

thanks

Frank

createdisk.sh: line 1: syntax error near unexpected token newline'
createdisk.sh: line 1: "
‘ “

Phil

I’m getting the same error as Frank and Scoot when I run the sh createdisk.sh

Any ideas? How did scott fixed his?

Patrick

I’m getting the same error as Frank and Scoot and Phil when I run the sh createdisk.sh

Simpatizer

Hi, guys.
I have HP ML310e and ESXi 6;
I folowed procedure step-by step but in any sort of combination, instalation stop at 2/3 – apple icon become “stop” mark. What can be a reason?
I download dwg file from internet…
Thanks

Derek Pelt

can you relink the script for dmg to iso, its missing now

derek

hey guys you can use this script on this page for the dmg to iso

https://www.linkedin.com/pulse/install-mac-os-x-el-capitan-1011-vmware-esxi-60-apple-abhinav-biswas

cheers

Krishnamurthy Hegde

Dear Benjamin,

Thanks for this outstanding article, and I was able to setup elcapitan on a ESXI VM easily! I am not able to achieve the following two items, despite various trials;
a) having the iPad (connected to the windows host desktop’s USB drive) being recognized by the mac VM.
b) routing the audio from the mac VM to the windows host machine.

Any help/advice is sincerely appreciated.

Krishna

Internet

having the dreaded 50-60% install and freeze. Anyone have a solid way to address this? I have checked the recommended settings above and still no go. El Captain install.

jj

Thanks so much for this guide. I had the same issue with the install freezing, but after rebooting 5 times, it finally worked!

I then forgot to disable sleep and the screensaver, so it froze after that, but seems to be working fine now.

Thanks so much!

Snickasaurus

For those having issues with the install stopping at the “white bar halfway” it seems some of these .vmx file changes are working. I would like to add to make sure you remove the floppy drive from the settings before starting the vm. This is the only thing I’ve had to do.

phiko

The guide works perfect for my mac mini 4,1 wit ESXi 6. But I would like to disable any Bluetooth Connection at the ESXI -Host, due to that reason, that the mac mini is catching my wireless keyboard and mouse from my other iMac.

Xian

Hi ! Nice video, I have tried to follow the video, but the VM starts up with an apple logo, and nothing more happens… I have tried the vmx mod. But no luck.

Christian Canal

Hi! Excellent guide! Any hint on audio support would be very appreciated!

brian

I get the following error.

./install.sh
VMware Unlocker 1.3.0
===============================
Copyright: Dave Parsons 2011-14
Installing local.sh
cp: cannot remove ‘/etc/rc.local.d/local.sh’: No such file or directory

Any ideas? I’m using VMware 5.0 (can’t upgrade).

David Bridwell

Thanks for the Tutorial!

I have macOS 10.11.x running in esxi 6.5, on a MacPro 5.1, had to use unlocker 209, found it on Github, the unlocker208 borked my esxi install, live and learn ;-} !!

The upgrade to Sierra went smoothly too!

Krunal

Is there a script for Sierra?

Benjamin Krause

Benjamin Krause

Author

I’ve used it for Sierra and it works great. Just rename the final iso to whatever you want. 🙂

Cody Franklin

Thanks so much!!!

priyantha perera

I am getting this error in when trying to execute the esxi-uinstall.sh command

[root@localhost:/vmfs/volumes/5984c519-0d73f160-f416-003ee1caa0ad/Tools] ls
esxi-install.sh esxi-uninstall.sh
[root@localhost:/vmfs/volumes/5984c519-0d73f160-f416-003ee1caa0ad/Tools] ./esxi-
esxi-install.sh esxi-uninstall.sh
[root@localhost:/vmfs/volumes/5984c519-0d73f160-f416-003ee1caa0ad/Tools] ./esxi-uninstall.sh
VMware Unlocker 2.0.8
===============================
Copyright: Dave Parsons 2011-15
Uninstalling local.sh
cp: can’t stat ‘/etc/rc.local.d/.#local.sh’: No such file or directory

Travis Vigneau

When i start my virtual machine it’s not seeing the ISO file. Any idea?

6 Trackbacks

  1. By Computer Froze While Installing El Capitan | camhr on September 23, 2016 at 22:51

    […] Installing OS X El Capitan or later on ESXi | IDmedia – 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 […]

  2. By Computer Froze Installing El Capitan | khmerbank on November 22, 2016 at 01:00

    […] Installing OS X El Capitan or later on ESXi | IDmedia – 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 […]

  3. […] Installing OS X El Capitan or later on ESXi […]

  4. […] Installing OS X El Capitan or later on ESXi […]

  5. […] Installing OS X El Capitan or later on ESXi […]

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.