UPDATE 18/10/16: Changed to support 10.12
We have got quiet few VMware ESXi Servers running in our environment. The basic management of these servers are done using the VMware vSphere Client from Windows OS. We have quiet few Administrators who uses Mac OS X 10.9 as their main Laptop and they also would like to administer the VMware Servers from Mac. I have a Mac mini that hosts VMs of every OS X/macOS version from Leopard to Mojave using VMware ESXi 6.0. Because I’m already an old Dutch guy who hates change, I wanted to see if it was possible to get a Catalina VM running without having to upgrade to ESXi 6.5 or 6.7, which would require abandoning its.NET client that I still prefer.
For one reason or another you need macOS on ESXi tells you that it isn't possible unless your host is a Mac itself. That isn't particularly true...
The ESXi Unlocker
Thanks to Donk over at InsanelyMac, a patch has been created to install macOS on ESXi (5.5 only) but also supports Workstation (8, 9, 10), Player (4, 5, 6) and Fusion (4, 5, 6). Have a look at it here or try out version 2 which supports Workstation 11, Player 7 Fusion 7 and ESXi 6.
Disclaimer: The following process potentially violates Apple’s End User License Agreement for macOS. Please check the Agreement before following these steps.
Setup
Here is my current setup and what I have:
- Whitebox ESXi host
- macOS Sierra 10.12 (but any will work) - NOTE: lags heaps but can be slightly tolerable with the beamoff application.
Install the Unlocker Patch
For this, I used the Windows vSphere client instead of the web client
1. Connect directly to your ESXi host instead of vCenter
2. Unzip the unlock-all-v130.zip file
3. Open a datastore (Configuration > Hardware > Storage) by right-clicking it and selecting 'Browse Datastore...'
4. Copy the 'esxi' folder to the datastore by selecting 'Upload Folder' making note of the warning of replacing any existing folders you may have with the same name
5. Enable and connect to SSH on the host (Configuration > Software > Security Profile > Services > Properties > SSH > Options > Start > OK)
6. Change directory over to your VMFS datastore
7. I recommend changing the name of the unlocker's folder to something else such as osx_unlocker
8. Go into the unlocker folder afterwards
9. Make the install and uninstall file executable
10. Run the install script file
11. Reboot your ESXi host
Create the ISO image
If you have 10.9 or greater, you will need a Mac to create the ISO.
If you have a Mac or using 10.9 and greater
For macOS or OS X 10.6 to 10.12, you can use this Mac only script to create the ISO if the InstallESD.img or Install.app is in the Applications folder: https://gist.github.com/calvinbui/3cc1594d85583077a88d6d60eac01aa8
Windows/Linux
Only supports 10.8 and below.
- Download OS X installation however you wish. Apple provide it free on their Mac App Store such as this: Yosemite Installation
- Browse the 'Install OS X.app' and extract the InstallESD.dmg file under /Contents/SharedSupport/
- Follow one of the options below depending on your operating system:
Windows - Convert the DMG file to an ISO using dmg2img. I used version 1.65.
Linux (Ubuntu) - Convert the DMG to ISO also using dmg2img (sudoapt-get install dmg2img)
Create the Virtual Machine and Install
Make sure to select Apple Mac OS X as your Guest Operating System.
Power on the VM and mount the ISO image to install.
If you get the error 'darwin11_64guest is not supported', try starting the VM directly from the host instead of vCenter.
We all know VMWare start to supporting Mac OS X as VM on latest ESXi hypervisor releases. According to Apple licensing policies, VMware only supports the virtualization of Apple Mac OS X 10.10 (Yosemite) client or server, Apple Mac OS X 10.11 (El Capitan) client or server, Mac OS X 10.9 (Mavericks) client or server, Mac OS X 10.8 (Mountain Lion) client or server, Mac OS X 10.7 (Lion) client or server, 10.6 (Snow Leopard) server and 10.5 (Leopard) server.
The End User License Agreement (EULA) for Apple Mac OS X legally and explicitly binds the installation and running of the operating system to Apple-labeled computers only. Mac OS X 10.5 Leopard Server, 10.6 Snow Leopard Server, 10.7 Lion client or server, 10.8 Mountain Lion client or server and 10.9 Mavericks client or server are fully supported on VMware Fusion while running on supported Apple hardware.
In this HOWTO, provided the steps to create an Mac OS X 10.9 Mavericks as a VM in ESXi 6.0 Host for a test case scenario. Before deployment, you must read EULA for Apple Mac OS X license, given link at the end of this HOWTO.
8 Steps total
Step 1: Steps to do
1. VMware ESXi 6.0 doesn’t support OS X out of the box. So, the first thing you need to do is to customise the hypervisor layer by executing an Unlocker script by insanelymac.com. You will need to register on the site in order to download the Unlocker tool.
2.You need to enable SSH server service on your ESXi host. In order to do that, login to the host using VMware vSphere 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.
3.Transfer the Unlocker-files to the host using any SFTP client. Make sure you extract the files somewhere on your client before transfer and connect to the ESXi host using the user root. Once connected navigate to /vmfs/volumes/datastore/, replacing datastore with your actual datastore name. Create a new folder (mkdir) called tools and transfer your unlockerXXX directory.
4.Now cd into the uploaded directory and ensure the ESXi scripts have execute permissions by running chmod +x esxi-install.sh. Now run ./esxi-install.sh in order to install the Unlocker.
5. Reboot ESXi host.
Step 2: Download and create the bootable OS X Sierra ISO
Grab the Sierra installer app from the Apple App Store. Note, you need a Genuine Mac machine in order to download and convert the Sierra installation disk. Once downloaded, minimize or close the installer.
Open the terminal and run the below command one after another.
# Mount the installer image
hdiutil attach /Applications/Install macOS Sierra.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
# Create the Sierra Blank ISO Image of 7316mb with a Single Partition – Apple Partition Map
hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
# Mount the Sierra Blank ISO Image
hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
# Restore the Base System into the Sierra Blank ISO Image
asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
# Remove Package link and replace with actual files
Mac Os X Vmware Player
rm /Volumes/OS X Base System/System/Installation/Packages cp -rp /Volumes/install_app/Packages /Volumes/OS X Base System/System/Installation/
# Copy Sierra installer dependencies
cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS X Base System/BaseSystem.chunklist cp -rp /Volumes/install_app/BaseSystem.dmg /Volumes/OS X Base System/BaseSystem.dmg
# Unmount the installer image
hdiutil detach /Volumes/install_app
# Unmount the Sierra ISO Image
hdiutil detach /Volumes/OS X Base System/
# Convert the Sierra ISO Image to ISO/CD master (Optional)
hdiutil convert /tmp/ElCapitan.cdr.dmg -format UDTO -o /tmp/ElCapitan.iso
# Detach the volumes
Install Mac Os X Vmware
hdiutil detach /Volumes/install_app
hdiutil detach /Volumes/OS X Base System/
hdiutil convert /tmp/Sierra.cdr.dmg -format UDTO -o /tmp/Sierra.iso
# Rename the Sierra ISO Image and move it to the desktop
mv /tmp/Sierra.iso.cdr ~/Desktop/Sierra.iso
Note : Once done it should have created a file called Sierra.iso on your desktop.
Step 3: Create a virtual Mac OS X VM
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 files.
1. Create a New VM
2.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.
Step 4: Mac OS X Installation steps - Language selection
Choose desired language once you see the welcome screen
Step 5: Mac OS X Installation step - Formatting the hard drive.
Also note that you must format the hard drive using the disk utility before it will be visible in the install wizard.
Step 6: Mac OS X Installation step - Choose Virtual disk and erase the partition
Choose Virtual disk and erase the partition
Step 7: Mac OS X Installation step - Choose Virtual disk and erase the partition 2
Give a name and click “Erase”.
Mac Os X For Vmware Esxi Vm
Click “Continue” button on the next consecutive screen, choose the Virtual HDD which is created and proceed the installation with on-screen instructions
Step 8: Configure Mac OS X after install
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.
Very Important : I also recommend to turn off sleep and the screensaver in settings as these may cause issues.
Finally, reboot and start enjoying your virtual Mac on non-Apple hardware.
You may also wish to read the software license agreement for Mac OS Sierra provided in the References section.
As said, using Apple Mac OS X as a VM on vmware environment is subject to apple EULA. VMWare recommend to use VMWare fusion for installing Mac OS X 10.9 Mavericks.
References
- Apple EULA
- Installing OS X 10.9 Mavericks as a guest operating system in VMware Fusion (2056603)
- Virtualizing Apple Mac OS X (1000131)
3 Comments
Esxi Os X
- Anaheimthelaz Apr 25, 2017 at 03:30pm
Tried this - didn't work for me. Never made it to install screen. Did I miss anything that says this is for Apple hardware only? There's a ton of these guides out there that are generally the same - to my knowledge those that include the unlocker step are for non-Apple platforms.
- AnaheimMaster RX Sep 25, 2018 at 09:32pm
Hello, it worked for me. with the process I was able to create an ISO for Yosemite macOS. however it does not work for me to create an iso of macOS Mojave. you know if the creation process has changed or if it's just mojave can not be used with VM
- HabaneroGopal (Vembu) Sep 26, 2018 at 06:03am
Master RX
Yes, We tried with Yosemite and Sierra macOS only, since it was the latest that time. We have not tried with Mojave yet, and not sure process has changed.