Install macOS Catalina in a free virtual environment

IaC
スポンサーリンク
スポンサーリンク

Introduction

When you want to test the developed program in a clean environment or when you want to check the operation of the tools downloaded for trial, you may or may not want to install it directly on your usual macOS. think.

In such a case, it is convenient to be able to easily prepare a clean OS environment using the virtual environment and destroy it when finished using it.

This time, I would like to create a macOS virtual environment on macOS that is necessary for such a case.

This page only describes the steps to create a macOS Catalina virtual machine on Virtual Box using a virtual machine building script(vm-configure).

If you want to know what you are doing in the script, please refer to the link below.

Regarding macOS virtualization, there is the following description in the macOS Catalina software license agreement in Apple’s software contract, and it seems that there is no license problem even if you create up to two virtual environments for testing purposes on a Mac computer. is.

(iii) to install, use and run up to two (2) additional copies or instances of the Apple Software
within virtual operating system environments on each Mac Computer you own or control that is
already running the Apple Software, for purposes of: (a) software development; (b) testing during
software development; (c) using macOS Server; or (d) personal, non-commercial use.

https://www.apple.com/legal/sla/docs/macOSCatalina.pdf

About the environment

Host environment

This environment is required on the host side to build a virtual environment.

If you have not installed VirtualBox, please refer to the page below to install it.The Vagrant installation procedure is included, but it is not used in this virtualization, so you do not have to install it.

Build environment

The script executed this time installs the following software in the actual environment.

  • macOS Catalina: Used to create an OS installer for a virtual environment.

Download build script

Download the script file for building the environment from here and unzip it to an appropriate folder.

Please do not change the folder structure of the downloaded script file, because some of them are referenced with a relative path when executing the script.

If you cannot execute the downloaded script file by double-clicking it according to the procedure, check the page below.

Virtual environment construction procedure

Execute /vm-configure/host-osx/macOS-Catalina/vm-create.command included in the downloaded build script in the terminal or double-click to start downloading the macOS installer.

On the way, the password of the system administrator is required to create the ISO file (disk image), so enter the password.

After a while, the virtual machine will start and the macOS installation will start.

The language selection screen is displayed. Select “English”.

First, click “Disk Utility” to initialize the disk where macOS will be installed

After selecting “VBOX HARDDISK Media”, click “Erase”.

Give the disc an appropriate name (Macintosh HD, etc.) and click “Erase”.

When you click “Done”, the disc you named above will be created.Now that the disk initialization is complete, click “Disk Utility”-“Quit Disk Utility” in the menu.

Return to the screen of the macOS utility. Next, select “Install macOS” and click “Continue”.

Click “Continue”.

Confirm the contents and click “Agree”.

In this license agreement, there is the following description about macOS virtualization.

(iii) to install, use and run up to two (2) additional copies or instances of the Apple Software
within virtual operating system environments on each Mac Computer you own or control that is
already running the Apple Software, for purposes of: (a) software development; (b) testing during
software development; (c) using macOS Server; or (d) personal, non-commercial use.

Click “Agree”.

Since the disk you named earlier is displayed, select it and click “Install”.

The installation will start and wait for it to complete.

After the restart is performed, the welcome screen is displayed. Select country and click “Continue”.

Click “Continue”.

Click “Continue”.

Select “Don’t transfer any information now” and click Continue.

Click “Set Up Later”.

Click “Slip”.

Review the macOS Software License Agreement, then click Agree.

Click “Agree”.

Set the account name and password to log in to macOS, and click “Continue”.

Click “Continue”.

Click “Continue”.

Click “Continue”.

Uncheck Enable Ask Siri and click “Continue”.

Click “Continue”.

When the setting is completed, macOS will be displayed and you can use virtualized macOS on the Virtual Box.

Procedure for destroying virtual environment

If you run /vm-configure/host-osx/macOS-Catalina/vm-destroy.command included in the downloaded building script by terminal or double-click, the Catalina virtual machine will be deleted.

This script does not delete the ISO file created during installation.When creating a virtual environment again, it speeds up by reusing the created ISO file.

GitHub

The script I used is available on GitHub.

GitHub - Collbow/vm-configure: Virtual machine configurate
Virtualmachineconfigurate.ContributetoCollbow/vm-configuredevelopmentbycreatinganaccountonGitHub.

Comment

スポンサーリンク