Search This Blog

Wednesday, October 2, 2019

MacOS Catalina On VMware ESXi 6.7

Creating a MacOS Catalina 
on VMware ESXi 6.7 U2



** UPDATE 04/15/2020**
Seems you need to start at Mojave to be able to download the full Catalina package from the App Store. I started from Mojave so I never ran into the issues found in the comments. Check the comments for what Adam had to say...

** 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), You 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...

Note: You need to start at Mojave to upgrade to download the fill Catalina package. 

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 (Search: macos catalina). Just don't run the installer. You need the app 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\ Catalina.app/Contents/Resources/createinstallmedia --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 file 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


Next...
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
CDROM
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.



















15 comments:

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).

Anonymous said...

The solution you provide in this blog post seems to be lacking. Namely when the following command is run:
"sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build"
This error message is presented:
"/Applications/Install macOS Catalina.app does not appear to be a valid OS installer application."
This sent me on a rabbit trail to either download a full copy of Catalina or build and ISO from scratch. I used varying resources, this one got me the closest: "https://apple.stackexchange.com/questions/324710/install-macos-high-sierra-app-does-not-appear-to-be-a-valid-os-installer-applica"
In the above answer, you have to initiate the Catalina install stub, but stop it before the machine has a chance to reboot. The stub will download several files to "/macOS Install Data". The answer suggests created a "SharedSupport" folder in the Catalina installer and then copying the files from the "macOS Install Data" directory, then create an ISO. After following this process I picked up in your tutorial and the ISO booted. However, when kicking off the install it quickly fails with the following error message:
"does not appear to be a valid os installer application"
I'm curious for those who found success, where did you get the Catalina installer that already has the SharedSupport folder with all the necessary files?

Jomebrew said...

There might be a problem with the command. I don't remember but make sure the slashes are right.

"sudo /Applications/Install\ macOS\ Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build"

It might be:
"sudo /Applications/Install/macOS/Catalina.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build"

Anonymous said...

The backslashes (\) are an escape character for spaces. So the path is actually:
"/Applications/Install macOS Catalina.app/Contents/Resources/createinstallmedia" because the Catalina app file has two spaces in the file name "Install macOS Catalina.app". So the path is correct.

Adam said...

Thank you for posting and thanks to the commenter "Anonymous"! I too got the error: "/Applications/Install macOS Catalina.app does not appear to be a valid OS installer application." because the app from App Store is only 19 MB (not the full installer). I even tried using the optional --downloadassets parameter that the createinstallmedia seems to say is available, but that did not work either. I too was wondering where people are getting the full Catalina.app? Thank you for posting that the advice here: https://apple.stackexchange.com/questions/324710/install-macos-high-sierra-app-does-not-appear-to-be-a-valid-os-installer-applica worked for you! I haven't tried that yet but will. What other choice is there?

Jomebrew said...

I guess Apple changed something or the process might have changed slightly. I'll see what happens on my system and update this article.

Adam said...

@Jomebrew: turns out yesterday I was able to get the ~8.2 GB FULL Catalina installer (aka "/Applications/Install macOS Catalina.app") from the App Store, NOT the limited 19 MB one. I got it by trial and error: I had a Mojave VM just freshly installed. Went to the App Store and downloaded Catalina, and it asked me if I want to download the whole thing, and it did. My previous attempts were from Sierra Macs, and those consistently only gave me the 19 MB smaller version only for Catalina (but FULL versions for Mojave, High Sierra etc.), So I started with Mojave.app (used your instructions to convert it to a .dmg > .cdr > .iso and booted it up and downloaded Catalina.app on it).
After downloading the Catalina.app, I was able to use your (excellent, thank you!) instructions to create the dmg, then the .cdr, and rename it to an .iso and upload the .iso to ESXI server.
For what it's worth, I successfully installed Catalina on the latest ESXI 7 (as of this writing) running on a Mac Pro "Ashtray" Desktop, without having to go through all the hoops you did to get it running on ESXI 6.7.
So, I have Catalina running on ESXI 7, have not used it much. First hurdle will be to get vmware tools installed: "Failed - The required VMware Tools ISO image does not exist or is inaccessible" which might fix the low resolution and perhaps fix the choppiness when moving mouse around the UI(?)

Thanks again for posting!

Jason Graun said...

I tried that same process using the 10.15.4 DMG and it doesn't seem to work. I had to increase the ISO file 16000M, using 8000M I received an error about not enough when copy the DMG into the install_build.

During the boot, I get the Apple Logo and it starts to install, but then I get an "unsuccessful boot" message and it gets stuck. I have tried changing the boot order but with no luck.

Steven said...

I have an issue too. The VM boot on the ISO, there is a progress bar, and this go to 75 % and the VM rereboot on the ISO.
Sometimes there is "unsuccessfull boot" error and other time "boot failed".
Deployment never reaches 100% ... :(