create_vmware_osx_install_dmg script updated with Yosemite support
I’ve updated the create_vmware_osx_install_dmg.sh script which I had previously posted about here. The script now includes support for Yosemite, so the script can now be run on 10.7 – 10.10 to create custom OS X 10.7.x, 10.8.x, 10.9.x and 10.10.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 available 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:
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.
- An directory to store the completed disk image in.
If you have a 10.10.0 Yosemite installer available, run this command:
sudo /path/to/create_vmware_osx_install_dmg.sh "/Applications/Install OS X Yosemite.app" /path/to/output_directory
When the command is run, you will be asked to choose whether or not you want to create an .ISO file for use with VMware ESXi.
If you had chosen to not create the .ISO file, this should produce a DMG file inside your selected output directory which is named something similar to OSX_InstallESD_10.10_14A389.dmg. This DMG will install both OS X 10.10.0 and the first boot package.
If you chose to create the .ISO, you should have two disk image files inside the chosen output directory which are named something similar to the following: OSX_InstallESD_10.10_14A389.dmg and OSX_InstallESD_10.10_14A389.iso
Creating a VM with the customized OS X install .dmg file
1. Launch VMWare Fusion 7.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 the Use another disc or disc image… button.
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.
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
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 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: