create_vmware_osx_install_dmg script updated with El Capitan support
I’ve updated the create_vmware_osx_install_dmg.sh script that I had previously posted about here. The script now includes support for El Capitan, so the script can now be run on 10.7 – 10.11 to create custom OS X 10.7.x, 10.8.x, 10.9.x, 10.10.x and 10.11.x installers for VMware Fusion and VMware ESXi. See below the jump for the details.
Downloading the script and support files
Download a .zip archive containing all needed files from my GitHub repo. This will give you both the create_vmware_osx_install_dmg script and a directory named support which contains files that the script will be copying into the completed disk image.
Both the create_vmware_osx_install_dmg script and the support directory must be stored in the same directory in order for the script to work properly.
Once you have the .zip archive download and uncompressed, go into the support directory and unzip the First_Boot_Package_Install.zip file. First Boot Package Install.pkg is used by the script so it’ll need to be unzipped and prepared before running the script.
Note: The First Boot Package Install.pkg included with this script will automatically install all available Apple software updates following the OS installation, but provide no other customization for the VM.
Creating a customized first boot package
If you want to have a first boot package that installs other packages at first boot, I’ve written a tool named First Boot Package Install Generator.app that will generate a first boot package that works with this script.
NOTE: The customized OS X installer will have an upper limit of 350 MBs of available space for added packages. This is sufficient space for basic configuration, payload-free or bootstrapping packages, but it’s not a good idea to add Microsoft Office or similar large installers to this installer.
For details on how to use First Boot Package Install Generator.app to generate your first boot package, please see this post:
https://derflounder.wordpress.com/2014/10/19/first-boot-package-install-generator-app/
When using a first boot package with this script, the script has the following hard-coded requirements:
- That the first boot package is named First Boot Package Install.pkg
- That the first boot package is stored in the support directory.
Running the script to create a customized OS X install .dmg file
Once you have the first boot package available and configured to your preferences, run the create_vmware_osx_install_dmg script with two arguments:
- The path to an Install OS X.app or the InstallESD.dmg contained within.
- A directory to store the completed disk image in.
Example usage:
If you have a 10.11.0 El Capitan installer available, run this command:
sudo /path/to/create_vmware_osx_install_dmg.sh "/Applications/Install OS X El Capitan.app" /path/to/output_directory
If you had chosen to not create the .ISO file, this should produce a DMG file inside output_directory that’s named something similar to OSX_InstallESD_10.11_15A284.dmg. This DMG will install both OS X 10.11.0 and the first boot package.
If you chose to also create the .ISO, you should have two files inside the chosen directory: OSX_InstallESD_10.11_15A284.dmg and OSX_InstallESD_10.11_15A284.iso
Creating a VM with the customized OS X install .dmg file
1. Launch VMWare Fusion 8.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 customized OS X install 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.
6. 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: OS X 10.11
7. In the Finish window, select Customize Settings if desired.
Otherwise, click Finish.
8. Save the VM file in a convenient location.
The VM is now configured and set to use the customized OS X installer disk image. To install OS X and the packages included with your first boot package, start the VM and then do nothing. The VM should begin automatically installing OS X on the VM’s boot drive, followed by the installation of the first boot package.
If you want to build a customized version of this script, the script and its associated files are available on Github at the following address:
Anyway to make this an in-place updater instead of erase and install?
Just a note. My OS is installed on an external SSD with my Mac mini and I use the internal drive. Currently changing the tmp directories in the script to point to the different volume & location.
You do so much already to make lives easier, but if you have time is there any chance the script might be updated to account for a different default working / building location?
Awesome script. Thank you for putting it together. I went ahead and selected option 1 for ESXI. I’m getting the same thing that I have been receiving on other attempts. Black screen, white Apple Logo, progress bar approx 5/6 of the way across, and a spinning beachball. I’m booting in a VM w/ 6 GB ram, 1 socket, 2 cpus, esxi 6.0. Any thoughts. This is soooooo frustrating. I’m probably missing something simple, but I just can’t figure it out. Thanks!!!
Any help from anyone would be great appreciated! 🙂
Okay. figured it out. Apparently you still need to go into advanced > smc.present True