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