Quantcast
Channel: rtrouton – Der Flounder
Viewing all articles
Browse latest Browse all 764

Building macOS installer disk images for virtual machines with create_macos_vm_install_dmg

$
0
0

A while back, I wrote a couple of scripts which built installers for Mac virtual machines:

However, Apple made some changes to the macOS installer starting in macOS Sierra 10.12.4 which broke the method I was using to build the installers. Recently though, I figured out that I could use Apple’s createinstallmedia tool to help me with building installers for Mac virtual machines again. After a substantial re-write, create_macos_vm_install_dmg is able to create bootable disk images for virtual machines running macOS Sierra, High Sierra and Mojave.

One change from the previous version of the create_macos_vm_install_dmg script is that the resulting installer no longer runs an automated installation. Instead, it will be necessary to follow the prompts to select the language and drive to install the OS onto. For more details, please see below the jump.

Downloading the script

The create_macos_vm_install_dmg script is available from the following location:

https://github.com/rtrouton/create_macos_vm_install_dmg

Once you have the script downloaded, run the create_macos_vm_install_dmg script with two arguments:

  • The path to an Install macOS.app.
  • A directory to store the completed disk image in.

Using the script

If you have a macOS Mojave 10.14.3 installer application available in your Mac’s /Applications directory, run this command:

/path/to/create_macos_vm_install_dmg.sh "/Applications/Install macOS Mojave.app" /path/to/output_directory

Screen Shot 2019 01 24 at 3 34 17 PM

If you had chosen to not create the .iso file, this should produce a .dmg file inside the specified output directory named macOS_10143_installer.dmg. This disk image will install a stock factory install of macOS 10.14.3.

Screen Shot 2019 01 24 at 3 35 17 PM

If you chose the option to create the additional .iso disk image, you should have two files inside the chosen directory: macOS_10143_installer.dmg and macOS_10143_installer.iso

Screen Shot 2019 01 24 at 3 40 14 PM

Screen Shot 2019 01 24 at 3 40 57 PM

Creating a VM with the OS installer disk image using VMware Fusion 11.x

1. Launch VMWare Fusion 11.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.

Screen Shot 2019 01 24 at 4 36 37 PM

4. In the Create a New Virtual Machine window, click on Use another disc or disc image…

Screen Shot 2019 01 24 at 4 36 43 PM

5. Select your macOS installer disk image file and click on the Open button.

Screen Shot 2019 01 24 at 4 37 20 PM

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.

Screen Shot 2019 01 24 at 4 37 26 PM

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: macOS 10.14

Screen Shot 2019 01 24 at 4 38 04 PM

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

Screen Shot 2019 01 24 at 4 38 28 PM

Otherwise, click the Finish button.

Screen Shot 2019 01 24 at 4 38 29 PM

8. Save the VM file in a convenient location.

Screen Shot 2019 01 24 at 4 38 34 PM

The VM is now configured and set to use the macOS installer disk image. To install macOS, start the VM and then run through the normal installation process when prompted.

Screen Shot 2019 01 24 at 4 42 19 PM

Screen Shot 2019 01 24 at 4 42 28 PM

Screen Shot 2019 01 24 at 4 42 42 PM

Screen Shot 2019 01 24 at 9 34 06 PM


Viewing all articles
Browse latest Browse all 764

Trending Articles