Wednesday, October 2, 2019

MacOS Catalina On VMware ESXi 6.7

Creating a MacOS Catalina 
on VMware ESXi 6.7 U2

** UPDATE 10/17/2019**
After applying the first update, the VM was rendered un-bootable again. That is the same crash that is originally experienced.  SEE Boot Work Around at the bottom.

This exercise was to get a running MacOS Catalina VM instance running on VMware. I first wrote this for Catalina Beta but afte rthe official release, a couple things changed.  So now it is how to install Catalina on ESXi 6.7.

I am using a 2013 Mac Pro with VMWare 6.7 U2 installed. I have High Sierra and Mojave VMs running on the host. Running VMs on VMware is something I've done for a few years. 

A lot has changed in Catalina. Admittedly, I am not a MacOS expert. I'm not particularly good a Mac user either. So, I can't speak to the changes only that it is not currently (Oct 1, 2019) frienld to install on VMware ESXi. Catalina runs fine once you get a working VM though.

The MacOS Part

As of this writing (10/10/2019), Youo cannot upgrade and existing VM running High Sierra or Mojave. At least, I could not successfully upgrade and boot to Catalina.  

If at first You Don't Succeed...

I started with trying to upgrade a Mojave VM to Catalina. I just downloaded Catalina from the Apple Store (Search: macos catalina). 

I followed the prompts and downloaded the Catalina installation image. I ran though the installation process which seemed to go pretty well. That is until it booted from the upgraded image. Then, it crashed. You can't see the crash, you just has an frozen Apple logo.

To see what is happening, reboot the VM and hold down the Windows Key + v for Verbose mode and see the boot attempt and the kernel panic. Changing VMware setting had no affect. After a couple hours, I gave up.

Try Something Else... And It Worked!

My next tack was to boot from a Catalina ISO. First, I had to create one. I'd done this before on Mojave so it wasn't all unfamiliar.  The steps are below. I am not sure where they came from.

First, I had to boot back to Mojave. I had found by rebooting the VM to the Boot Manager settings (you can set this in the VM settings or press escape before the OS loads in a VM console) and Selecting the EFI VMware Virtual SATA Hard Drive (0,0) option (not Mac OS X), that boots to my original Mojave image.

To start from scratch on a Mojave instance, download Catalina from the app store as described above. Just don't run the installer. You need the image to create the ISO.

Once Mojave loaded, to build the ISO file, I start by making the virtual disk:

hdiutil create -o /tmp/catalina -size 8000m -layout SPUD -fs HFS+J

Then, I mount it to I can copy the installer to it

hdiutil attach /tmp/catalina.dmg -noverify -mountpoint /Volumes/install_build

Now I copy the installer to the mounted image

sudo /Applications/Install\ macOS\ --volume /Volumes/install_build

The image is automatically mounted and is on your desktop. Select it and un-mount the image.

Now convert the image to an ISO file. You can put the fiel anywhere but I used ~/Downloads for simplicity

hdiutil convert /tmp/catalina.dmg -format UDTO -o ~/Downloads/catalina

Now rename the file from catalina.cdr to catalina.iso

mv ~/Downloads/catalina.cdr ~/Downloads/catalina.iso

You can delete /tmp/catalina.dmg. 

Copy the ISO to your PC or where ever you want to attach it to the VM via a console session.  I use WinSCP to copy to my PC.

The VMware Part

Updated 10/10/19

I created a blank VM with the following settings:

These are important. Just follow my lead here.
Guest OS: Other
Guest OS Version: Apple macOS 10.14 64-bit
2 vCPU
4GB Memory
100GB Disk space
The rest is default

VMware settings

Once the VM is saved, edit the settings and change to
Guest OS: Windows
Guest OS Version: Windows 10 64-bit
Changed to Windows 10

Open a Remote Console (VMRC)
Power on the VM
Click VMRC --> Removeable Devices --> CD/DVD --> Connect to Disk Image File
Navigate to the catalina.iso file you saved where ever, Click Open

Attach ISO

Now ALT+CTRL+Insert in the VM to reboot it. It will boot from the ISO automatically. If not select the SATA CDROM frm the EFI menu.  Note, sometimes it took several reboots for it to successfully boot from the ISO. usually, just one.

Once the installer image loads, use the disk tool to erase the VMware virtual disk (100GB in my case)

Use the default erase options (Note: Your keyboard doesn't work so just accept "Untitled")

Quit the disk utility

Next, choose to install MacOS

Follow the install steps and install Catalina

Once the install finishes, it will reboot to the OS.  Make sure you detach the ISO so you don't boot to the installer again.

Reset the VM

The VM should boot to the image and continue installing Catalina. When it finishes (10 or so minutes) it will reboot.

After the reboot, it will freeze on the blank Apple logo or unsuccessfully load MacOS X. Don't fret.. We're OK.

Power off the VM
Edit the VM setting and change the OS values.
Guest OS: Other (Apple Mac OS X)
Guest OS Version: Apple macOS 10.14 64-bit

Power on the VM and it will boot to and load Catalina.

Once you go through the setup steps and Catalina is ready to go.

Good luck on your adventure!

Boot Work Around

Added 10/17/2019

After applying the update, the VM was no longer booting. Same cast at boot with the Apple Logo and no progress.  

the work around is to change the boot order in EFI boot settings to boot to SATA Hard Drive 0.0

You need to enter EFI boot configuration for the VM. You can hit escape a the VMware logo or go to the VM settings and set to boor to EFI next boot. Boot/reboot to get the EFI menu

 Enter Setup

Configure Boot Options

Change Boot Order

Press Enter then change the boot order in the pop up window using + and - keys. Press Escape when done editing.
Move EFI Virtual SATA Hard Drive (0.0) to the Top
You can see I change the overall boot order to:
Hard Drive
Mac OS X

Press Enter to Commit changes and exit
Exit boot manager and reset the VM.

Now the VM will always boot to the Hard Drive. 

I am avoiding applying updates.


Anonymous said...

Well done, followed the same procedure for VMWare Player 15.5. Thanks...

Anonymous said...

I am unable to install VMware tools as it gives this error: "The VMware Tools upgrade operation was canceled. Vix error code = 21004". Does anyone know how to solve?

Anonymous said...

Used above guide installed Catalina 10.15.1 on ESXi 6.7 U2, everything is working! Thank you so much!

Anonymous said...

For Catalina 10.15.1 on ESXi 6.7 U2, when you change screen resolution, follow these steps:
1. Install VMware Tool ver 11, Allow it under security settings, reboot MacOS.
2. Install VMware Tool ver 11 again. Do not know why, but somebody else (not only me) find 2nd installation (without uninstall) is necessary. Reboot MacOS.
3. Open Terminal, change zsh shell to old bash version: chsh -s /bin/bash . Restart Terminal program, you should see $ instead of %.
4. Run the command under Terminal: sudo /Library/Application\ Support/VMware\ Tools/vmware-resolutionSet 1920 1080 . Or the other resolution numbers you want. The change should take effect right away.
Good Luck.

Anonymous said...

What did you use to Unlock ESXi? There is no link to the download!

Jomebrew said...

I have vCenter and vSphere licenses. You should be able to create a free account and download trial vCenter and ESXi if that is what you desire.

I did not do this on free ESXi. There is nothing I did that should preclude this from working exactly the same on the free key.

Unknown said...

In reply to the comment 'December 8, 2019 at 11:13 AM'

One part I overlooked (as this did not work for me) was the resource allocation to the macos VM. I am using esxi 6.7 and by default the vm was only allocated 4mb of video ram. I had to manually edit the video card settings (gave it 128mb) and from that point onward the resolution worked correctly (and natively).