Creating macOS installer disk images for VMware Fusion and ESXi with create_macos_vm_install_dmg
I’ve had a tool available for a while named create_vmware_osx_install_dmg, but it looks like it has reached the end of the road with macOS 10.12.3. The reason for this is because macOS 10.12.4 has introduced a change that prevents the addition of third-party packages to the OS installer. create_vmware_osx_install_dmg uses the addition of a third-party installer package, so unfortunately this tool cannot be used to generate 10.12.4 or later OS installers.
That said, I still want to be able to create macOS installer disk images for VMware Fusion and ESXi, so I’ve forked create_vmware_osx_install_dmg into a new script named create_macos_vm_install_dmg. create_macos_vm_install_dmg will generate stock OS installer disk images for the following OS versions:
- Mac OS X 10.7.x
- OS X 10.8.x
- OS X 10.9.x
- OS X 10.10.x
- OS X 10.11.x
- OS X 10.12.x
This script does not use a third-party package, so it is able to build a macOS 10.12.4 installer disk image. For more details, see below the jump.
Downloading the script
The create_macos_vm_install_dmg script is available from the following location:
https://github.com/rtrouton/create_macos_vm_install_dmg
Once you have the script downloaded, run the create_macos_vm_install_dmg script with two arguments:
- The path to an Install macOS.app or the InstallESD.dmg contained within.
- A directory to store the completed disk image in.
Example usage:
If you have a 10.12.4 Sierra installer available, run the script using this command:
sudo /path/to/create_macos_vm_install_dmg.sh "/Applications/Install macOS Sierra.app" /path/to/output_directory
You will be given a choice as to whether or not you want an .iso file for use with ESXi.
If you choose to not create the .ISO file, this should produce a .dmg file inside the specified output directory that is named something similar to macOS_InstallESD_10.12.4_16E195_20170329111134.dmg. This DMG will install a stock factory install of macOS 10.12.4.
If you choose to create the .ISO, you should have two files inside the specified output directory, named something similar to macOS_InstallESD_10.12.4_16E195_20170329111134.dmg and macOS_InstallESD_10.12.4_16E195_20170329111134.dmg.iso
Creating a VM with the OS installer disk image
1. Launch VMWare Fusion 8.5.x
2. In VMWare Fusion, select New… under the File menu to set up a new VM
3. In the Select the Installation Method window, select Install from disc or image.
4. In the Create a New Virtual Machine window, click on Use another disc or disc image…
5. Select your macOS installer disk image file and click on the Open button.
6. You’ll be taken back to the Create a New Virtual Machine window. Verify that the disk image file you want is selected, then click the Continue button.
7. In the Choose Operating System window, set OS as appropriate then click the Continue button.
In this example, I’m setting it as follows:
- Operating System: Apple OS X
- Version: macOS 10.12
8. In the Finish window, select the Customize Settings button if desired. Otherwise, click the Finish button.
9. Save the VM file in a convenient location.
The VM is now configured and set to use the macOS installer disk image. To install macOS, start the VM and then do nothing. The VM should begin automatically installing macOS on the VM’s boot drive and reboot itself to the Setup Assistant when finished.
works very well, thank you!
The script doesn’t work for Mojave anymore … Any chance you’ll be updating it?
I just used it on Mojave for Fusion 11. I works great.
Not working on my new Mac mini 2018 6core, it runs thru install and then when the vm reboots it kernel panics inside the VM. Trying to install macOS High Sierra
I’m running OS X Mojave 10.14.6. I tried running the create_macos_vm_install_dmg.sh script to create an El Capitan 10.11 image but it failed and gave me this error message:
— This script supports building installer disk image files for macOS 10.12.0 and later.
— Please use an installer app which installs macOS 10.12.0 or later.
So I tried using the other script create_vmware_osx_install_dmg.sh and got this error message
— /Users/richardcacciato/Downloads/create_os_x_vm_install_dmg-master/support/First Boot Package Install.pkg not found! This is needed for the OS to install properly, exiting..
— The script is expecting the following:
— A. That a first boot installer package is stored in /Users/richardcacciato/Downloads/create_os_x_vm_install_dmg-master/support.
— B. That the first boot installer package is named as follows: First Boot Package Install.pkg
What am I doing wrong? Thanks.