1 This script prepares customized OS X installer disk images for use with VMware Fusion and ESXi. It's adapted from the prepare_iso script created by Tim Sutton: https://github.com/timsutton/osx-vm-templates/tree/master/prepare_iso
5 1. This script and the associated support directory. This script and the support directory must be both stored in the same directory in order for the script to work properly.
7 2. A 10.7.x, 10.8.x, 10.9.x, 10.10.x, 10.11.x, or 10.12.x installer from Apple's Mac App Store.
12 Run the create_vmware_osx_install_dmg.sh script with two arguments: the path to an "Install OS X.app" or the InstallESD.dmg contained within, and an output directory.
17 If you have a 10.11.x El Capitan installer available, run this command:
19 sudo /path/to/create_vmware_osx_install_dmg.sh "/Applications/Install OS X El Capitan.app" /path/to/output_directory
21 This should produce a DMG file at output_directory that's named OSX_InstallESD_10.11_15A284.dmg. An MD5 checksum is printed at the end of the process.
26 1. Mounts the InstallESD.dmg using a shadow file, so the original DMG is left unchanged.
28 2. minstallconfig.xml is also copied, which is looked for by the installer environment's
29 rc.* files that first load with the system. This allows us to never actually modify the
30 BaseSystem.dmg and only drop in these extra files.
32 3. Additional installer packages can be added using a first boot package, which is added to
33 the OS X install by way of the OSInstall.collection file. The script is expecting the following:
35 A. That the first boot package is named "First Boot Package Install.pkg" (no quotes)
36 B. That the first boot package is stored in the support directory.
38 This first boot package can be generated by First Boot Package Install Generator.app, which will generate a
39 distribution-style flat package that can be used with 10.7 / 10.8 / 10.9 / 10.10 / 10.11 OS installs.
41 The instructions for using this tool to generate first boot packages are documented here:
42 https://github.com/rtrouton/First_Boot_Package_Install_Generator
44 4. If desired, a second disk image in .iso format can be generated for use with VMware ESXi
45 servers running on Apple hardware.
48 Once you have the customized DMG file created, you can choose it as an install disk image in VMware Fusion when creating virtual machines in VMware Fusion.
50 This script has been tested with Apple's 10.7.5, 10.8.5, 10.9.5, 10.10.5, 10.11.6, and 10.12.0 installers from the Mac App Store.
57 1. A pre-generated First Boot Package Install.pkg is stored in the support directory as a zip file named First_Boot_Package_Install.zip. Unzip the file before running the script. This first boot package will automatically install all available Apple software updates following the OS installation, but provide no other customization.
59 2. The 10.9.x disk images created with this method will not install a recovery partition into a VM. As a workaround, it appears that this can be addressed via using Per Olofsson’s Create Recovery Partition Installer to generate an installer that can install the missing recovery partition:
61 Create Recovery Partition Installer is available from here on GitHub:
62 https://github.com/MagerValp/Create-Recovery-Partition-Installer
64 Unfortunately, that installer would be too large to include as part of First Boot Package Install’s payload (available space is around 350 MBs, the Recovery Partition installer is around 485 MBs.)
66 In my testing, 10.7.x, 10.8.x, 10.10.x, 10.11.x and 10.12.x disk images will successfully install a recovery partition into the VM.