Home > create_vmware_osx_install_dmg, Mac OS X, Scripting, VMware > Creating customized OS X installer disk images for VMware Fusion

Creating customized OS X installer disk images for VMware Fusion

My preferred way to create VMs in VMware Fusion is by leveraging NetBoot and DeployStudio, but not all environments have access to NetBoot or DeployStudio. For those environments, there’s now a scripted way to create customized OS X 10.7.x or 10.8.x installer disk images for use with VMware Fusion. This allows the creation of OS X VMs in VMware Fusion that can configure themselves in an automated fashion without needing access to either NetBoot or server resources. See below the jump for the details.

The script below prepares a customized OS X installer disk image for use with VMware Fusion. It’s adapted from the prepare_iso script created by Tim Sutton.


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.


Screen Shot 2013-08-01 at 8.17.19 PM


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.


Screen Shot 2013-08-01 at 8.20.57 PM


Configuring First Boot Package Install.pkg for use with the script

First Boot Package Install.pkg is an installer package that enables other packages to be installed at first boot. The script adds First Boot Package Install.pkg to the OS X installer and allows installer packages that can’t run in the OS X Installer environment to be be installed during the first boot of the VM.

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 configure First Boot Package Install.pkg, please see this post:



Running the script to create a customized OS X install .dmg file

Once you have First Boot Package Install.pkg configured with your packages, run the create_vmware_osx_install_dmg script with two arguments:

A. The path to an Install OS X [Mountain] Lion.app or the InstallESD.dmg contained within.

B. An directory to store the completed disk image in.

Example usage:

If you have a 10.8.4 Mountain Lion installer available, run this command:

sudo /path/to/create_vmware_osx_install_dmg.sh "/Applications/Install OS X Mountain Lion.app" /path/to/output_directory

Screen Shot 2013-08-01 at 4.10.04 PM



Screen Shot 2013-08-01 at 4.48.42 PM


This should produce a DMG file inside output_directory that’s named OSX_InstallESD_10.8.4_12E55.dmg. This DMG will install both OS X 10.8.4 and First Boot Package Install.pkg.

Creating a VM with the customized OS X install .dmg file

1. Launch VMWare Fusion 5.x

2. In VMWare Fusion, select New… under the File menu to set up a new VM

3. In the Create New Virtual Machine window, select Continue without disc.


Screen Shot 2013-08-01 at 3.50.29 PM


4. In the Installation Media window, select Use operating system installation disc or image, then click on Choose a disc or disc image…


Screen Shot 2013-08-01 at 3.51.02 PM

Screen Shot 2013-08-01 at 3.51.03 PM


5. Select your customized OS X install disk image file


Screen Shot 2013-08-01 at 3.50.54 PM


6. In the Choose Operating System window, set OS as appropriate. In this example, I’m setting it as follows:

Operating System: Apple Mac OS X

Version: Mac OS X 10.8 64-bit


Screen Shot 2013-08-01 at 3.51.17 PM


7. In the Finish window, select Customize Settings if desired. Otherwise, click Finish.


Screen Shot 2013-08-01 at 5.20.52 PM


8. Save the VM file in a convenient location.


Screen Shot 2013-08-01 at 3.52.43 PM


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 First Boot Package Install.pkg, 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 First Boot Package Install.pkg.


Screen Shot 2013-08-01 at 4.00.12 PM
Screen Shot 2013-08-01 at 6.11.54 PM


Once the installation completes, the VM will then reboot.


Screen Shot 2013-08-01 at 6.12.10 PM


On reboot, the login window will be stopped from loading while the packages included with First Boot Package Install.pkg are installed. Once the packages finish installing, the VM will reboot again.

After the second reboot, the VM should now be automatically configured with the desired applications and settings.


Screen Shot 2013-08-01 at 5.47.56 PM

  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: