DEV Community

Tiago Rangel
Tiago Rangel

Posted on • Originally published at blog.tiagorangel.com on

Installing MacOS in VMware

This guide will teach you on how you can set up a MacOS VM using VMWare in Windows. I'll try to make this as simple as possible. I'm currently using VMware Workstation Pro (paid), but you can also use VMWare Workstation Player (free).

Before you start, make sure your PC has virtualization enabled by opening Task Manager, tapping Performance, CPU and looking at Virtualization. If you don't have it enabled, just enable it in BIOS. There are plenty of tutorials on Youtube on how to do that.

Step 1: Downloading a copy of MacOS

This step is pretty simple. First, make sure you have the latest version of Python installed. If you don't, install in the python.org website.

You now need to download OpenCore. Go to https://github.com/acidanthera/OpenCorePkg/releases and download the latest releases ZIP file. It should be something like OpenCore-XXXXX-RELEASE.zip .

Then, simply extract it. On the extracted folder, go to Utilities > macrecovery . Then, right-click any empty space, tap "More options" and "Open in terminal" or "Open PowerShell window here".

Next, you want to go here, scroll a bit down, and run the command for your version. It might take a while. Close the window and go back to the macrecovery folder. Look for the newly generated BaseSystem.dmg and copy it to your Desktop or Documents folder.

Step 2: Create a VMware disk

Installing QEMU

Now that we have the BaseSystem.dmg file, we want to make it so VMware can read it. For this, we're using an open-source software called QEMU .

Go to https://qemu.weilnetz.de/w64/ and select the qemu-w64-setup-XXXXXXXXX.exe file. Run the installer. If you get a Windows Smartscreen warning, simply tap "Run Anyway".

Wait for QEMU to install. If you get an error during installation saying a file cannot be written, just tap Retry button. Then, close the installation window.

Creating the VMDK

After installing QEMU, we need to use it to convert the BaseSystem.dmg to a VMWare .vmdk disk image. Open the folder where you put the BaseSystem.dmg file, open powershell again and run the following command:

& "C:\Program Files\qemu\qemu-img.exe" convert -O vmdk -o compat6 BaseSystem.dmg recovery.vmdk
Enter fullscreen mode Exit fullscreen mode

As soon as the script ends, you should see a new recovery.vmdk file in your computer.

Step 3: Preparing & Unlocking VMWare

For you to even be able to load a macOS system into VMWare, you will need to use a program called Auto-Unlocker to patch your VMWare installation.

šŸ’”

If you have VMWare version 15 or older, use the following URL: https://github.com/paolo-projects/unlocker/releases/tag/3.0.4, extract the zip, open win-install.cmd as Administrator

Download the file here and extract the zip file. Open the Unlocker.exe file and tap "Patch".

Once the patch is complete, close the app.

Step 4: Creating the VM

This section will detail how to create the base virtual machine using the recovery disk we created earlier.

  1. Open VMware and press File > New Virtual Machine

  2. Tap Custom Installation and start navigating through the New Virtual Machine setup screens.

  3. In "Install from", select "Install OS later"

  4. On the Select a Guest Operating System page, select Apple Mac OS X, as well as the corresponding macOS version

  5. On the Processor Configuration page, select 1 for the Number of processors.

  6. On the Memory for the Virtual Machine page, select at least 4096 MB (recommended 8096 MB)

  7. On the Network Type page, select Use network address translation (NAT).

  8. On the Select a Disk page, select Use an existing virtual disk.

  9. On the Select an Existing Disk page, browse & select the recovery.vmdk disk we created earlier.

  10. Finish the setup.

  11. Edit your VM's settings.

  12. Add a new Hard disk:

Step 4: Patching the Virtual Machine

  1. First, navigate to your VM's files (C:\Users<username>\Documents\Virtual Machines<machine name>).

  2. Duplicate the .vmx file and append .bak to the end of it

  3. Open your virtual machine's original Configuration File (.vmx) in a text editor

  4. Paste this into the file:

  5. If you have an AMD CPU (like me), also add the following to your .vmx file.

Now, save the file and try booting your VM. If everything goes well, you should have MacOS boot up!

Common Issues

  • Stuck on Apple Boot Logo : If you attempt to boot your virtual machine and it's stuck on the Apple Boot Logo, do the following to fix the issue. Power off the Virtual Machine, then open the virtual machine's settings. Once the settings window opened beside the Hardware tab click on Options. Change the Apple Mac OS X selection to Microsoft Windows then click OK. Power on the virtual machine again. Once all installed then go back to settings and set it back to Apple Mac OS X

  • The CPU has been disabled by the guest operating system : Enable virtualization in your computer's BIOS

  • Feature 'cpuid.ds' was absent, but must be present : This is due to a corrupted vmx file. Try using a backup of your .vmx file and edit the .vmx file carefully this time.

  • Module 'featurecompat' power on failed : In your .vmx file, make sure that your editor is not converting the quotes (") to "greek" quotes

  • Not enought physical memory : Run VMware as administrator

But we're not finished yet. Now, we need to install MacOS.

Step 5: Installing MacOS

Once you're able to boot into the recovery setup, follow these steps to properly install macOS.

šŸ’”

Note : You may want to power off your virtual machine and take a snapshot before continuing. If anything goes wrong during setup, you can always revert back to your snapshot.

  1. Start by selecting your language.

  2. As soon as the "Recovery" page pops up, select Disk Utility and hit Continue.

  3. On the Disk Utility page, select the Hard Disk you created (not macOS Base System).

  4. With the Hard Disk selected, click Erase in the top right of Disk Utility.

  5. Close Disk Utility.

  6. On the recovery page, select Reinstall macOS <version> and hit Continue.

  7. Continue through the setup.

  8. When prompted to select the disk to install macOS, select the disk you just formatted.

  9. Once the operating system is installed, navigate through the macOS setup.

  10. Create your macOS computer account, finish the setup, and login.

Congratulations! You've just created your first MacOS Virtual Machine!

Once everything is setup, you may edit the Virtual Machine's settings and remove the recovery.vmdk Hard Disk. Do not delete the Hard Disk you created manually (to store the install).

šŸ’”

You may want to power off your virtual machine and take another snapshot before continuing.

By default, your macOS deployment will not support iServices such as iMessage. To solve this, please use this guide.

Top comments (0)