Create a macOS/OS X VM on VMware ESXi 6.5 & VMware Workstation 12.x

Create a macOS/OS X VM on VMware ESXi 6.5 & VMware Workstation 12.5.2 Pro

Running a MacOS/ OS X virtual machine is not anything new and has been supported for quite some time, as long as you are running said VM on a supported hypervisor with Apple Hardware.  But many of the “Non-Apple” users in the world would not be able to take advantage this without owning some type of Apple Computer.  Luckily, there is an alternative method to running a Mac-based VM on non-apple hardware-based VMware ESXi and/or VMware Workstation for Windows!  In this tutorial, I am going to show you just how to do so.  Please keep in mind that the methods described in this article are not supported nor endorsed by Apple or VMware in any way, so please use at your own risk.

Before we can begin, there are a few tools required to ensure this works flawlessly.

  • macOS Sierra installation media in .iso format (You can use an older OS as well but for this demo, I will be installing macOS Sierra 10.12.3)
    • This media will have to be created as the OS comes as an .app by default.
    • This link has a good tutorial for creating said media.
  • Unlocker Utility
    • Current Stable version 2.0.8 works up to OS X Yosemite on ESXi 6.0 and Workstation 11
    • Version 2.0.9 RC adds support for macOS Sierra on ESXi 6.5 and Workstation 12.x
  • Type 1 Hypervisor (ESXi) or a Type 2 Hypervisor (VMware Workstation)


Ready? Here we go!  I’ll start by showing you how to create a macOS Sierra VM on VMware Workstation 12.5.2 Pro….

VMware Workstation 12.5.2 Pro
  • Make sure that VMware Workstation is installed but not running.
  • Extract the contents on the Unlockler 2.0.9RC.
  • Open a command prompt and navigate to the extracted folder
  • Run win-install.cmd.  This will patch your VMware Workstation to unlock the capabilities to run a Mac OS.  It will also download the latest VMware Tools (darwin.iso) for macOS into the extracted directory.


  • Launch VMware Workstation and create the shell VM


  • When choosing the hardware compatibility, you can optionally change this to version 10 so that you do not need to manually edit the .vmx file after the shell has been created.


  • I am going to leave it at version 12 and manually edit the .vmx file afterwards.  Continue creating your shell by following along…


  • Now that we have the shell created, we still need to attach the ISO to the VM.  Click on the CD/DVD (SATA) option on the left side in the Devices pane.  Once in the settings, select the ISO image.

  • Next, navigate to the directory that houses the virtual machines files.  Edit the .vmx file with your preferred text editor.  I personally love using NotePad++.  Scroll to the bottom of the text and add the following line.  This will enable the VM to boot up.
    • If you opted to change the hardware version to version 10 in the earlier steps, disregard this and move on to the next step.
smc.version = "0"

  • At this point, the VM is ready to be powered on to install macOS Sierra.  I will cover the installation steps further down in this tutorial, but first let me cover the procedures for enabling this on ESXi.  I will be showing how to do so on ESXi 6.5a (Build 48872370)

VMware ESXi 6.5a (Build 48872370)

  • For ESXi we first need to copy the unlocker utility to a local or shared datastore.  You can accomplish this by using vCenter, ESXi Host UI, or WinSCP.  For simplicity, I opted to use WinSCP and copied the folder into a newly created “Tools” folder on a local datastore.  You can also take this time to upload the .ISO to the local datastore for use later in this tutorial.

  • Now that the files have been copied, open a SSH connection to your ESXi host, and navigate to the unlocker directory.

  • We can then type “ls” to view the contents of the directory.

  • Next, we must make the installation script executable.  I also like to make the uninstallation script executable as well.  Do so by running the following commands.
chmod +x

chmod +x

  • Typing “ls” again will now display the (2) scripts in green text, indicating that they are now executable.

  • Run the installer script by running the following command

  • The script will only take a brief moment to run, afterwards, a reboot is required.  Once it has finished type

  • After the ESXi host has restarted, connect to the ESXi Host UI and begin building the shell VM by following along.

  • Now that the shell VM is created, we need to go back into the VM’s settings and attach the .ISO that you uploaded to the datastore in a previous step.

  • At this point, the VM is ready to be powered on to install macOS Sierra!  Unlike with the VMware Workstation instructions, there is no need to change the hardware version to version 10 or manually modify the .vmx file.

  • In the next section I will cover the installation steps for MacOS Sierra.
Installing macOS Sierra

**The following instructions apply to both an ESXi and Workstation built macOS VM**

  • Start by powering on the virtual machine and opening the Remote Console view

  • Once the VM has booted the .ISO, you will be presented with this screen.  Click next and then go to the taskbar and open Disk Utility.  We need to create a partition to install macOS onto.

  • After the partition has been created, we can actually start the macOS installation.

  • After the VM has rebooted, we can continue the installation/configuration of macOS.

  • Finally, the macOS VM is ready to use!  For the finishing touches, it is recommended to install VMware Tools on this VM.  When we ran the installation script at the start of this procedure, it downloaded a “tools” folder inside of the unlocker tool folder and inside it contains the darwin.iso which is used to install VMware tools.  This should be the latest release of VMware Tools 10.1.0.  Optionally, you can always download the tools from VMware’s website.
  • In order to install the VMware Tools, we first need to eject the mounted install media.  Afterwards, connect the CD/DVD drive to the darwin.iso file.

  • Once the VMware Tools (darwin.iso) is mounted, double-click the “Install VMware Tools” package to begin the installation.  After it completes, reboot the VM for the changes to take effect.


Optional Tweaks
Adjusting Screen Resolution
  • Be default, the macOS VM will only support (1) resolution natively, 1024 x 768.  

  • If you’d like to change this to support a higher resolution for say…a larger monitor, please download the following file on the macOS VM.  Once the file has been downloaded to the “Downloads” folder in the VM. Open the “Terminal” application and navigate to the folder.  We need to make the script executable, just as wel did earlier with the unlocker scripts.
cd Downloads/VMware-Fix-resolution/

chmod +x vmware-resolutionSet

  • Now we can run the script and specify the desired resolution.  In this example, I am going to choose a 1440 x 900 resolution.  Do so by running the following
./vmware-resolutionSet 1440 900

  • On the ESXi-based VM, I did notice that it does not set a resolution higher than 1176 x 885 while in the Remote Console.  But, the VMware Workstation-based VM does indeed set the desired resolution.


Disable Beam Synchronization to Improve VM Performance
  • Download the following application and place it in the “Applications” folder.  Double-click it to launch the application.  Afterwards, add it to the user’s “Logon Option” so it runs every time at logon.

I hope that you’ve found this information useful.  Please do leave comments below and subscribe to my blog!  Thanks for stopping by!



CC BY-NC-SA 4.0 Create a macOS/OS X VM on VMware ESXi 6.5 & VMware Workstation 12.x by virtualex is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

  • Pingback: ESXi = Win+Mac Xamarin iOS dev nirvana – /* BeejBlog */()

  • TimB

    Great walkthrough, thanks for the effort. The 1176×885 resolution limit on ESXi is down to only allocating 4MB Video RAM. Increasing it to 16MB allowed me to go full screen on my 1600×900 laptop.

    • @disqus_1HbK3aGTeU:disqus – thanks much for the feedback and for pointing this out! I will test on my end as well and update the post.

      • dan f

        thanks for the walk through as well!!
        adding the following lines to the .vmx files worked for me.. they came from a vmware KB article on changing resolutions for windows clients. I have both Sierra and ElCapitan working

        svga.autodetect = “FALSE”
        svga.vramSize = 20971520
        svga.maxWidth = 1400
        svga.maxHeight = 900
        it won’t auto size; just drag the VMRC window ( like you are resizing) and it should fix itself.

        • @disqus_T69MntdwwV:disqus – this is great! Thx for pointing out this workaround!

  • AJSchot

    I installed OSX 10.12 on ESXi 6.5a and try to find a working VMware Tools… but finding only old version and in ESXi it does not work when selecting VMware tools installer… where to find latest darwin.iso??

  • AJSchot

    How to get latest version of VMware Tools??? becuase i get a alert that this is an old version (it is for El capitan) and it does load in ESXi 6.5a so the guest tools does not work!!! anymbody have a newer verison or know how to upgrade?

    • @ajschot:disqus – thx for taking the time to check out this post and comment. I am assuming that you have successfully ran the unlocker 2.0.9 script on your ESXi host. When the script is executed, it connects to the VMware tools repository for VMware Fusion in order to download the darwin.iso which is the VMware Tools media for MacOS. It places the downloaded darwin.iso back into the unlocker scripts folder under a newly created “tools” directory. Go ahead and check the datastore where you placed the unlocker script, and see if there is a tools folder within. Hope this helps!

  • Matthew Toye

    This is very interesting.. Have you experimented with using pci passthrough on a dedicated graphics card to the OS? i would be interested in if you can run a fully functional workstation off this with qe/ci enabled..

    • @matthewtoye:disqus – thanks for commenting. I honestly have not experimented with this as I do not use any PCI GPU’s in my ESXi hosts. I am curious about it though so I will reach out to a friend of mine who does use PCI Passthrough in his setup and see if he can create a MacOS VM and test this out!

  • Martin Jessop

    A warning to anyone who has edited their file the unlocker install blows away any change you may have made. Also worth noting that the unlocker files should go on persistent storage for ease of access.

    • @martin_jessop:disqus – thx for commenting and pointing this out for the community!

  • John Smith

    im having issue with connecting a usb iphone device. it appears in xcode then disappears after 10-15 secs. i see in the console log that device gets disconnected error 61… also initially I never had a problem .. it happened when i created a new vm

    • @disqus_ZaJcgDrJGd:disqus – thx for commenting. Is your VM running on ESXi or on Workstation? Please keep in mind that that this method of using a MacOS VM is not supported by VMware nor by Apple on non-Apple hardware. Issues are to be expected and unfortunately I really cannot provide support for any issues you may experience while using said VM.

  • Schrammbo

    Will this process work for installing MacOS Server on ESXi 6.5a?