Mac OS X Yosemite running on ESXi

Installing Mac OS X Yosemite on ESXi

Ever wanted to run Mac OS X in a virtual machine for developing or educational purposes? It’s actually quite easy to do.

One of the main reason for me to use ESXi instead of other hypervisors such as Hyper-V is the broad amount of different operating systems it supports. Not only is it able to run Windows and Linux, but I’ve been running Mac OS X and even Android for quite some time with great result. In this tutorial I’ll cover how to install Mac OS X on ESXi 5.5 or 6.0.


You will need a server running ESXi 5.5 or 6.0 (obviously). I haven’t made a guide on installing it yet, but I might do that as well in the upcoming days. Meanwhile there are a lot of guides all over the web and the installation itself is actually much simpler then most. You will also need a real mac in order to download and convert the Yosemite installation disk.

Prepare ESXi for running Apple OS X operating systems

ESXi doesn’t support OS X out of the box. The first thing you will have to do is to download a unlocker tool from If you have ESXi 5.5 this tool is for you, or if you are running 6.0 as I am, download this version instead. Please note that you will need to register on the site in order to download these files. In order to install the unlocker tool follow these instructions:

  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 dialog Services Properties should appear and from here you can click on SSH->Options and choose Start and stop with host. Click Start and then close all the open dialogs.
  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 your unlockerXXX directory.
  3. Now cd into the uploaded directory and ensure the ESXi scripts have execute permissions by running chmod +x  and chmod +x Now run ./  in order to install the unlocker.
  4. Reboot your ESXi host

1. Any changes you have made to will be lost. If you have made changes to
that file, you will need to merge them into the supplied file.
2. The unlocker runs at boot time to patch the relevant files and it now survives
an upgrade or patch to ESXi as is part of the persisted local state.

Download and create the Yosemite ISO

Now that ESXi is ready, we need to create the Yosemite ISO. For this step I use a real MacBook because I want to grab the latest and greatest Yosemite.dmg from the Appstore. From your Mac, open the Appstore and download Yosemite. Once downloaded minimize the installer.

Open the terminal and change directory to /tmp:

cd /tmp

Create a new file for our script:


Paste the following into the file and save:


# Mount the installer image
hdiutil attach /Applications/Install\ OS\ X\ -noverify -nobrowse -mountpoint /Volumes/install_app

# Convert the boot image to a sparse bundle
hdiutil convert /Volumes/install_app/BaseSystem.dmg -format UDSP -o /tmp/Yosemite

# Increase the sparse bundle capacity to accommodate the packages
hdiutil resize -size 8g /tmp/Yosemite.sparseimage

# Mount the sparse bundle for package addition
hdiutil attach /tmp/Yosemite.sparseimage -noverify -nobrowse -mountpoint /Volumes/install_build

# Remove Package link and replace with actual files
rm /Volumes/install_build/System/Installation/Packages
cp -rp /Volumes/install_app/Packages /Volumes/install_build/System/Installation/

# Copy Yosemite installer dependencies
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/install_build/BaseSystem.chunklist
cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/install_build/BaseSystem.dmg

# Unmount the installer image
hdiutil detach /Volumes/install_app

# Unmount the sparse bundle
hdiutil detach /Volumes/install_build

# Resize the partition in the sparse bundle to remove any free space
hdiutil resize -size `hdiutil resize -limits /tmp/Yosemite.sparseimage | tail -n 1 | awk '{ print $1 }'`b /tmp/Yosemite.sparseimage

# Convert the sparse bundle to ISO/CD master
hdiutil convert /tmp/Yosemite.sparseimage -format UDTO -o /tmp/Yosemite

# Remove the sparse bundle
rm /tmp/Yosemite.sparseimage

# Rename the ISO and move it to the desktop
mv /tmp/Yosemite.cdr ~/Desktop/Yosemite.iso

Now ensure that the scripts has execute permissions by running chmod +x and run with sh ./ This will take some time, so just be patient. Once done it should have created a file called Yosemite.iso on your desktop.


Create a virtual Mac OS X VM

MacOSXThe 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 files. 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 install wizard.

Configure Mac OS X

It’s very important to install the VMware Tools as soon as possible after the install has finished.  Without it 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. Especially the screen saver takes up quite a lot of resources.

Known issues

The only known issue so far is that the virtual machine is stuck with a low resolution of 1024 x 768 unless you add a GPU to your server and use pass-through mode. I haven’t tested it, but it should work according to other users. If anyone figures out another workaround for this issue, please share it!

There’s now a way to overcome the resolution limitation using this workaround.


Share this:

One comment, add yours.



OS X Yosemite VMWare Tools installation hangs at “Running Package Scripts” stage. any way to fix this?

Leave a comment

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