Skip to content

Instantly share code, notes, and snippets.

@Kutkovsky
Created June 26, 2019 10:17
Show Gist options
  • Star 21 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save Kutkovsky/613e29f35d3ef420b23b59ecdf7a28e0 to your computer and use it in GitHub Desktop.
Save Kutkovsky/613e29f35d3ef420b23b59ecdf7a28e0 to your computer and use it in GitHub Desktop.
The steps allowing to create macOS 10.15 Catalina VM on vSphere or ESXi
#!/bin/bash
# Steps to create the macOS Catalina (10.15) VM:
# login to developer.apple.com or beta.apple.com to download a tester's profile for your OS. Install it.
# Go to System Preferences > Software Update and start the update process
# When the Catalina Installer (few MBytes) is started, it downloads the remain part of installation.
# After all `Install Catalina Beta.app` should lay in the /Applications folder with approx. 6.5g size
# Proceed with the following script.
set -eux
mkdir -p out
sudo hdiutil create -o out/Catalina.cdr -size 7g -layout SPUD -fs HFS+J
sudo hdiutil attach out/Catalina.cdr.dmg -noverify -mountpoint /Volumes/install_build
sudo /Applications/Install\ macOS\ Catalina\ Beta.app/Contents/Resources/createinstallmedia --volume /Volumes/install_build --nointeraction
hdiutil detach /Volumes/Install\ macOS\ Catalina\ Beta
hdiutil convert out/Catalina.cdr.dmg -format UDTO -o out/Catalina.iso
mv out/Catalina.iso.cdr out/Catalina.iso
rm out/Catalina.cdr.dmg
# Now there should be an ISO called Catalina.iso in the `out` folder
# Upload the resulted ISO to vSphere datastore (upload to an ESXi host)
# Create a new VM as Guest OS set to `Other:Apple macOS 10.14 64-bit`. Don't start a VM
# Then compatibility should set to `ESXi 6.7 update 2 and later` and Guest OS to `Windows 10 64-bit`
# Start the VM, make sure that CDROM with datastore ISO (Catalina.iso) is connected
# Disable the Network boot option in vSphere BIOS menu. Restart VM
# Installer should start. You should choose Disk Utility, and initialize the VMware Virtual SATA Hard Drive Media
# (since keyboard ain't work - using existing `Untitled` name)
# Wait util installer completes. VM will not boot. Shutdown VM, change Guest OS profile back to `Other:Apple macOS 10.14 64-bit`
# Once Catalina is installed, download the latest VMware tools and install it.
# It took two reboots for me to completion (will require to unblock security extension)
# Credits to Intel008 and Bogdam from https://communities.vmware.com/thread/611961
# Credits to mkuzmin https://github.com/jetbrains-infra/packer-builder-vsphere/blob/master/examples/macos/setup/iso-macos.sh
# Credits to pat-s https://gist.github.com/agentsim/00cc38c693e7d0e1b36a2080870d955b
@esutton
Copy link

esutton commented Oct 24, 2019

@Kutkovsky Thank you for sharing! This works great for the released version of Catalina after increasing size from 7g to 9g

The released version of Catalina I downloaded is 8.1GB in size.

sudo hdiutil create -o out/Catalina.cdr -size 9g -layout SPUD -fs HFS+J

The resulting Catalina.iso was 9.66GB in size

-rw-r--r--   1 edward3  staff  9663676416 Oct 24 08:43 Catalina.iso

I need to update my ESXi host before I can try it out.

@ttimasdf
Copy link

Is 6.7 version of ESXi a mandatory requirement? I've gone through a similar procedure on ESXi 6.5. The install successed without problem, but the installed vmdk cannot boot after changed OS Profile back to macOS. Will try to upgrade 6.7 later..

@mymaor89
Copy link

Thanks worked on 6.7U3
But where can I find darwin.iso proper for this?
(Hardware I use is: MacPro6.1)

@tjone270
Copy link

tjone270 commented May 2, 2020

But where can I find darwin.iso proper for this?

use the darwin.iso from VMware Fusion - it's the same VMware Tools. Don't use the darwinPre15.iso - it's for versions 10.10 and earlier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment