VMFS Recovery™
Recover data from damaged or formatted VMFS disks or VMDK files
Recover data from damaged or formatted VMFS disks or VMDK files
Last updated: Mar 12, 2024

How to Install and Run macOS on VMware ESXi

Running Windows OS or Linux on a virtual machine is never a big deal, but sometimes, trying to run macOS on a VM can be challenging because, by default, macOS is not supported on virtual machines. But then, VMware virtualization platforms support macOS, which makes it much more seamless for such deployments. This article explains how you can run Apple’s macOS platform on a VM hosted on VMware ESXi or VMware Workstation.

VMware ESXi and VMware Workstation Overview

Both ESXi and Workstation are hypervisors developed by VMware for virtualization. These platforms are compatible with all versions and editions of Windows OS and offer an intuitive dashboard for management. While Workstation is freeware for personal and non-commercial use, ESXi is a paid hypervisor for enterprise-level functions.

Over the years, these VMware platforms have become the favorite of many IT professionals for hosting and running all kinds of virtual machines for various purposes. Interestingly, VMware ESXi and Workstation come with multiple flexible features and support for integration with other tools. VMware platforms do not require high system specifications to run smoothly.

Why Run macOS on VMware ESXi and WMware Workstation?

It’s common to run Windows OS or Linux OS on virtual machines, but someone may want to try out macOS. However, macOS is not supported by default on VMs, which is where VMware ESXi and VMware Workstation come in handy. These hypervisors are much more flexible and intuitive; setting up macOS on any of these is achievable and the process is explained below.

How To Run macOS on VMware ESXi

First things first, you have to set the ground for your new VM to run macOS. To achieve this, you must install a macOS image on the new VM.

Pre-requisites:

You need to download the macOS installer ISO file from the official Apple repository. However, you need a MacBook or a system running native macOS platform to download the installer file. If you use a Windows or Linux system, browsers on these systems may not detect Apple macOS store links. Also note, the MacBook must be running on macOS 12.0 or later versions.

A macOS restore image is an installation media file that specifies the macOS version your VM will run. You can download this by going to the Apple App Store, switching to the macOS tab, and searching for the newest macOS version, for example, macOS Ventura 13.2. In the search results, open the resulting app and click on “Get,” then “Download.”

When the file is completely downloaded, DON’T CLICK ON “INSTALL” or “UPGRADE.” Simply go to the Applications folder and find the downloaded macOS Ventura installer file. Right-click on the file and select “Show Package Contents,” then go to “Content” 🡺 “Shared Support.” Here, you will find the ISO installation file, which is named InstallESD.dmg – but, you must have to convert this file to a bootable file compatible with VMs using the “hdiutil” CLI tool.

Converting Your macOS ISO Image to a VM Bootable File

Launch Apple’s command-line utility, called Terminal, and run the hdiutil command. The hdiutil command is used to alter macOS disk images. On the Terminal interface, run the following commands:

  • To get root privileges: sudo –i
  • Now, create a blank Ventura ISO image of 16384 MB with a single partition in /tmp/ directory: hdiutil create -o /tmp/Ventura -size 16384m -volname Ventura -layout SPUD -fs HFS+J
    • Where the Apple partition layout is SPUD and the “journaled” macOS file system is HFS+J.
    • Note: You can create a larger image than the size of all the files in an installer image, but you can’t create a smaller image.
    • The created Ventura.dmg file will be saved in the /tmp/ directory.
  • Mount the Ventura installer image to /Volumes/Ventura: hdiutil attach /tmp/Ventura.dmg -noverify -mountpoint /Volumes/Ventura
    • You should get an output result like this:
      • /dev/disk3         Apple_partition_scheme
      • /dev/disk3s1     Apple_partition_map
      • /dev/disk3s2     Apple_HFS    Volumes/Ventura
    • At this point, the mounted disk should appear in the Disk Utility menu, and then it’s time to create the bootable installation media.
  • Create bootable media from the new mount point: /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/Ventura –nointeraction
    • Note: ensure you entered the paths correctly.
  • Remove the attached installation disk image: hdiutil eject -force /Volumes/Install\ macOS\ Ventura
  • Now, convert the bootable .dmg image to .cdr and save to your desktop or any directory you prefer: hdiutil convert /tmp/Ventura.dmg -format UDTO -o /Users/testuser/Desktop/Ventura.cdr
  • Rename the file to Ventura.iso: mv -v /Users/testuser/Desktop/Ventura.cdr /Users/testuser/Desktop/Ventura.iso

Now, the macOS Ventura installation ISO image is ready for you to run on your VMware ESXi or Workstation VM. If you wish, you can delete the dmg file to free up some space on your storage and exit the console/terminal afterward: rm -fv /tmp/Ventura.dmg

Prepping the ESXi Host for macOS Installation

With the ISO file ready to be used, you need to prepare your ESXi VM to run the macOS platform. You will need to allow SSH access, download the macOS unlocker patch, and then patch the ESXi server.

  • Access your VMware host client using the IP address, and log in with your credentials.
  • Go to Host 🡺 Actions 🡺 Services 🡺 Enable Secure Shell (SSH)

A patch is needed to customize your VMware host to show and run macOS as a guest OS platform during initial setup. Unlocker 2 is a macOS patch file that unlocks Mac OS X versions for ESXi and Workstation VMs; it also allows you to access VMware Tools for macOS.

Unlocker 2 is a Python-based program capable of modifying macOS VMs VMX files so they can run on other platforms. While Unlocker 2 supports VMware ESXi 6.0 and VMware Workstation 15, its newer version, Unlocker 3, has different editions for each hypervisor.

Download the Unlocker Patch here.

Transfer The Files To Datastore

With the patch file downloaded, copy it along with the macOS ISO image file to your ESXi datastore at once. You can do this by uploading both files to your ESXi datastore using the “Upload” feature in the “Datastore Browser” page of the ESXi datastore where you want the new VM’s data to be saved.

Install the Patch via SSH

Connect your host to an SSH client, for example, PuTTY. Run these commands to install the Unlocker patch on your ESXi host and unlock macOS.

  • Access the directory where you saved the unlocker patch file: cd /vmfs/volumes/datastore1
  • Extract the files: unzip esxi7-unlocker-master.zip
  • Configure the permissions: chmod 0775 -R esxi-unlocker-301/
  • Recheck if the executable files have the correct permissions to run the patch: ls -al esxi-unlocker-301/
  • Return to Unlocker patch directory: cd esxi-unlocker-301/
  • Install the macOS unlocker patch: ./esxi-install.sh
  • To confirm you installed the macOS unlocker patch correctly: ./esxi-smctest.sh
    • If you got “smcPresent = false” as output, the patch was not installed.
  • If the patch was installed correctly, shutdown any running VM and restart the server: reboot

Creating a New macOS VM on an ESXi Host

Now that you have copied the ISO file and patch file to the datastore, it’s time to launch your new macOS VM. The procedure is similar to how you have been creating your other virtual machines.

  • Step One: Right-click on Virtual Machines (on your VMware ESXi host client) and select Create/Register VM.
  • Step Two: In the New Virtual Machine Wizard interface, set your configurations: firstly, choose “Create a Virtual Machine.” In the next step, you will have to set a name for the Guest OS (you can use macOS VM), then proceed to select the Guest OS family (Mac OS), and Guest OS version (Apple macOS 13.2 (64-bit)).
  • Step Three: Select the datastore to bind with the new VM, you can use a different datastore, other than the one you copied the Unlocker patch and ISO image file.
  • Step Four: Set your VM configurations, such as the CPU cores, RAM, storage allocation, and other settings you may want to adjust. But very importantly, on the CD/DVD Drive tab, make sure you click on Datastore ISO File and import the Ventura.iso file you converted from the onset, then check the “Connect at power on” box.

Step Five: With all the settings and configurations done, you just have to review the parameters you chose, and then click “Finish” to save the VM.

Adjusting Your macOS VM Configurations

Yes, you have just installed a new VM to run macOS as a guest operating system, but, in order to make the VM more operational, you need to “tune” the configurations. To do this, you need to edit the VM’s .vmx configuration file, otherwise, you may randomly experience downtimes. Also, you need to connect to your ESXi host via SSH for this task.

  • Open the macOS VM directory: cd /vmfs/volumes/datastoreXX/macOS13-2/
  • Access the configuration file and open it in a text editor: vi macOS13-2.vmx
  • Go to the end of the file and press “a” to enter Append Mode, which is the editing mode. Add this line to the .vmx file: smc.version = “0”
  • Search for this line of command: ethernet0.virtualDev = "e1000e"
  • Edit the line and change “e1000e” to “vmxnet3”: ethernet0.virtualDev = "vmxnet3"
  • Now, press the Esc. button and type :wq, then hit the Enter button to save the configuration.
  • Close the Editor when you’re done.

VMX Configuration for macOS on AMD processors

Natively, Apple macOS is compatible with Intel processors and AMD, so if you must run a macOS VN on a system with AMD processors, you need to make certain configuration adjustments. It’s also about editing the .vmx configuration file (smc.version = “0”)

smc.version = "0"

cpuid.0.eax = "0000:0000:0000:0000:0000:0000:0000:1011"

cpuid.0.ebx = "0111:0101:0110:1110:0110:0101:0100:0111"

cpuid.0.ecx = "0110:1100:0110:0101:0111:0100:0110:1110"

cpuid.0.edx = "0100:1001:0110:0101:0110:1110:0110:1001"

cpuid.1.eax = "0000:0000:0000:0001:0000:0110:0111:0001"

cpuid.1.ebx = "0000:0010:0000:0001:0000:1000:0000:0000"

cpuid.1.ecx = "1000:0010:1001:1000:0010:0010:0000:0011"

cpuid.1.edx = "0000:0111:1000:1011:1111:1011:1111:1111"

smbios.reflectHost = "TRUE"

hw.model = "MacBookPro14,3"

board-id = "Mac-551B86E5744E2388"


Note: this is a highly technical action.

Installing macOS as Guest OS on a VMware VM

Boot the new VM and install the macOS version that is running on the ESXi host. Once you load the macOS installer file, the installation wizard will launch and you can install macOS according to your preferences. However, you must set out a partition on your virtual hard disk for this VM, here’s how”

  • As the macOS Recovery Menu launches, click Utilities 🡺 Disk Utility
  • In the Disk Utility page, select your VMware virtual disk in the left pane, set a name for the drive, for example, vmdskA, pick a macOS file system (eg: APFS), set the partition scheme (GUID Partition Map), and then click Erase on the top menu; this is to erase the media on the partition (not the partition itself)
  • Once the media is erased, close Disk Utility and go back to the Recovery Menu.
  • Back on the Recovery Menu, select Install macOS Ventura.
  • Consent to the user license agreement and select the virtual disk you prepped for this installation: vmdskA.
  • Wait for the OS to install completely; the VM should reboot automatically after the installation.
  • Once the VM boots up from the virtual hard drive you selected earlier, you can then proceed to complete the installation configurations and sign in with your Apple ID.

How To Fix MacOS Screen Resolution on VMware VMs

You need VMware Tools installed on the macOS VM to be able to fix screen resolution problems. improves performance and graphics. By default, your macOS VM will run with 1024×768 resolution, to change this, you can use VMware Remote Console.

Click the Full-Screen button on the interface of VMware Workstation or Fusion, it will change the resolution of your macOS VM to the full resolution supported by your monitor, which could be 1920×1080.

Disabling a Screen Saver and Sleep Mode

Setting a screen saver or sleep mode will consume more system resources when the macOS VM is idle. To fix this, it is advisable to disable screen savers and sleep mode on the VM.

How to disable a screen saver:

  • Open System Preferences 🡺 Lock Screen
  • Disable the screen saver and sleep mode functions.
  • Go back to System Settings 🡺 Displays 🡺 Advanced 🡺 Turn off Prevent automatic sleeping when the display is off.
  • Again, go back to System Settings 🡺 Energy 🡺 turn off “Put hard disks to sleep when possible”

You’re done.

How to install macOS on Windows in VMware Workstation

The procedure is quite similar to installing macOS on ESXi, here, you need Unlocker v3.0 for VMware Workstation.

  • Step One: Get the macOS Unlocker V3.0. Extract the content and run the win-install.cmd file as an Administrator.
  • Step Two: Download the macOS VMware VMDK disk image file from Google Drive by becoming a TechLabs member.
  • Step Three: Launch VMware Workstation and create a New Virtual Machine. Follow the installation wizard prompts, when it gets to guest OS installation, select “I will install the OS later.”  However, indicate Apple Mac OS X as the Guest OS and choose a version, for example, High Sierra macOS 10.13.
  • Step Four: Set a name for your VM and set its storage drive. Complete the storage setup configurations, review your settings, and click Finish.
  • Step Five: On the VMware Workstation home screen, select the VM you just created and click on Edit Virtual Machine Settings. Now, set the RAM and processor settings; on the CD/DVD tab, uncheck the “Connect at power on” box.
  • Step Six: You will now have to upload the downloaded macOS recovery disk image to boot the VM from it and run the macOS installer. The VM will then have two virtual hard drives: the recovery disk macOS-recovery.vmdk and the one you selected for the OS installation.
    So, on the hardware tab, click on “Add” 🡺 Hard Disk 🡺 SATA 🡺 Existing Virtual Disk 🡺 import the VMDK file here and click Finish. When the confirmation dialogue box pops up, click “Keep Existing Format.”
  • Step Seven: You will now boot the VM from the recovery disk. The macOS installer will launch at this time, choose your installation preferences.
  • Step Eight: On the macOS Utilities menu, run the Disk Utility tool to erase the OS disk: Set the name to macOS VM or any name of your choice, the “Format” should be set to Mac OS Extended (Journaled), and the Scheme set to GUID Partition Map. Exit the Disk Utility menu – go back to the macOS Utilities menu and select Reinstall macOS – consent to the license agreement, select the disk you just formatted as the storage drive to install your macOS, and then complete the setup. Shut down the VM afterward.
  • Step Nine: Go back to Workstation home screen and select the Edit VM link again. This time, go to the hardware settings and remove the VMDK file you used to boot the VM previously.
  • Step Ten: Power the VM again to install VMware Tools from the VMware Workstation main menu – go to VM 🡺 Install VMware Tools, that’s all.

Note: If VMware Tools won’t install directly on Workstation, you can download the Darwin.iso file from a trusted third-party website. VMware Tools for macOS are referred to as Darwin because “Darwin” is the open-source core operating system of macOS.

How to Install VMware Tools ISO Image (Darwin ISO Image)

Download the archive file from a trusted source and launch it; follow the on-screen instructions and “continue installation.” You will be prompted to “Allow” or “Deny” VMware app installation, select “Allow,” and Finish the installation.

Conclusion:

This is a well-detailed guide to installing macOS on VMware VMs hosted on VMware ESXi or Workstation platforms. It is important that you follow each step closely to avoid any critical error that could lead to loss of files and to ensure a successful installation. However, if you notice any of your VMware VM files went missing, DiskInternals VMFS Recovery can help to get it back.

FAQ

  • Can you run macOS on ESXi?

    If VMware Workstation or VMware Fusion is installed on your machine, you can link to your ESXi server and access the macOS virtual machine hosted on that ESXi server.

  • Is it possible to install macOS in VMware?

    You have the ability to install Mac OS X, OS X, or macOS within a virtual machine. Upon creation of the virtual machine, Fusion launches the operating system's installation assistant and proceeds with the installation of VMware Tools. VMware Tools is essential as it installs the necessary drivers to enhance the performance of the virtual machine.

  • How to install macOS Big Sur on ESXi?

    1. Check Compatibility and Licensing:

      • Ensure your hardware is supported and complies with Apple's licensing requirements for running macOS.
      • Verify that your version of ESXi is compatible with macOS Big Sur.
    2. Prepare the macOS Big Sur ISO:

      • Download the macOS Big Sur installer from the Mac App Store.
      • Use a tool or script to create an ISO image from the macOS installer.
    3. Create a New Virtual Machine:

      • Log in to your ESXi server using the vSphere Client.
      • Right-click on your datacenter or cluster and choose to create a new VM.
      • Select "Custom" and proceed to configure the VM with the recommended settings for macOS (e.g., hardware compatibility, guest OS version as macOS 10.16 or later, etc.).
    4. Edit VM Settings for macOS Compatibility:

      • Adjust the VM settings to allocate sufficient CPU and RAM resources.
      • Configure the VM to use the ISO image you created as the CD/DVD media.
      • Ensure other settings like network and storage are appropriately configured.
    5. Install macOS Big Sur:

      • Power on the VM and boot from the macOS Big Sur ISO.
      • Follow the on-screen instructions to install macOS Big Sur, formatting the virtual disk as required.
    6. Install VMware Tools (Optional but Recommended):

      • Once macOS Big Sur is installed, you can install VMware Tools to enhance the VM's performance and user experience.
      • Mount the VMware Tools ISO to the VM, and follow the installation prompts.
    7. Finalize the Installation:

      • Complete any remaining setup steps such as setting up a user account and system preferences.
      • Restart the VM to ensure all changes are applied and macOS Big Sur runs smoothly.
  • How to install macOS Ventura on ESXi?

    1. Verify Compatibility and Licensing:

      • Ensure your ESXi server is running on Apple hardware to comply with macOS licensing.
      • Confirm that the ESXi version supports macOS Ventura.
    2. Obtain the macOS Ventura Installer:

      • Download macOS Ventura from the Mac App Store.
      • Create a bootable ISO image of macOS Ventura using the downloaded installer.
    3. Create a New Virtual Machine:

      • Log in to the ESXi web interface or use the vSphere Client.
      • Initiate the creation of a new VM, choosing "Custom" settings.
      • Configure the VM with specifications suitable for macOS, selecting macOS 13 as the guest OS version.
    4. Adjust VM Settings for macOS:

      • Allocate appropriate CPU and memory resources.
      • Set the CD/DVD drive to use the macOS Ventura ISO you created.
      • Ensure network and storage configurations are correctly set up.
    5. Install macOS Ventura:

      • Start the VM and boot from the ISO image.
      • Proceed with the macOS installation steps, formatting the virtual drive as required.
    6. Install VMware Tools (Recommended):

      • After macOS installation, enhance your VM's performance by installing VMware Tools.
      • Attach the VMware Tools ISO to the VM and follow the installation prompts.
    7. Complete the Setup:

      • Finish any remaining configuration steps like user account creation and system settings.
      • Reboot the VM to ensure macOS Ventura runs effectively.
  • Can you put macOS on a VM?

    To initiate and operate macOS within a virtual machine, you must initially install a macOS image on the new VM. The installation process of macOS on a new virtual machine involves these key steps: Acquire a restoration image and establish a VM configuration that is compatible.

  • How to install macOS in ESXi?

    1. Ensure Compatibility and Adherence to Licensing:

      • Confirm that your ESXi server is running on Apple hardware, in line with macOS licensing agreements.
      • Check that your ESXi version is compatible with the macOS version you plan to install.
    2. Download macOS Installation Media:

      • Obtain the macOS installer from the App Store or Apple's download resources.
      • Convert the downloaded installer to an ISO format suitable for use with ESXi.
    3. Configure a New Virtual Machine:

      • Access your ESXi interface and opt to create a new virtual machine.
      • Choose custom settings and specify the guest OS as macOS, selecting the correct version corresponding to your ISO.
    4. Adjust Virtual Machine Settings:

      • Allocate sufficient CPU and memory resources based on the requirements of the macOS version you are installing.
      • Set the VM to boot from the macOS ISO file by configuring the CD/DVD drive settings.
    5. Install macOS:

      • Power on the virtual machine and boot from the ISO.
      • Follow the on-screen prompts to install macOS, including disk formatting and OS installation steps.
    6. Install VMware Tools (Optional but Recommended):

      • After macOS installation, improve the VM's performance and usability by installing VMware Tools.
      • Mount the VMware Tools ISO to the VM and proceed with the installation.
    7. Finalization:

      • Complete any additional setup tasks, such as configuring user accounts and system preferences.
      • Restart the VM to ensure macOS is fully operational.

Related articles

FREE DOWNLOADVer 4.20, WinBUY NOWFrom $699

Please rate this article.