When you download and run untrusted applications (or any application you do not know well) from the internet you will never know what they will do to your computer and private information you have in your computer. You can setup a virtual machine and run untrusted applications in it to eliminate this security risk. The applications you run in the virtual machine will not have access to anything in your host machine. You can maintain a separate virtual machine with similar configuration to your host machine to run all your not so trusted applications. Make sure not to store any sensitive information in this virtual machine. Use your host machine as usual to keep them safe.
This post will show you how to install macOS Catalina virtual machine on Virtualbox on macOS Catalina host.
This guide has been tested on the following setup.
Download the latest macOS installer from the Mac App Store. At the time of writing it is macOS Catalina 10.15.4. You should have the installer app in your “/Applications” directory.
Next, you have create a macOS installer image. You can create the installer disk ISO automatically using this script. To use the script, download it. Open the terminal and navigate to the directory where you downloaded the script.
Tip: If you want to add terminal and many other things to your macOS right click menu check this tool.
Then enter the following command in the terminal. Make sure to change the macOS installer app’s name (Install macOS Catalina.app) to the name of the macOS installer app you have in your “/Applications” directory.
./create-macos-bootable-for-virtualbox.sh "/Applications/Install macOS Catalina.app"
The script will create a macOS installer disk in iso format in the current directory of the terminal.
Download Virtualbox and install it if you do not have it already in your host machine.
Now open Virtualbox and create a new virtual machine with the following configurations. When creating a disk for the virtual machine make sure to allocate at least 30GB. Otherwise the macOS installer will not allow you to proceed with the installation halfway through. You can adjust the amount of memory etc. according to the resources you can allocate.
To create the VM,
Follow the instructions to create the VM. Create the disk with a size around 30GB while following the on screen instructions.
To configure the VM, go to VM Settings:
You should mount the macOS installer ISO that we created above in the virtual machine that you just created. Select the virtual machine > click on settings > select storage > select the optical drive > browse the installer iso.
After doing this, you can start the virtual machine. It will take some time to start. The initial loading screen will look like following.
Then the loading screen will become an apple splash screen.
After the loading is completed the installer will ask for the language.
Next the macOS installer screen will be shown.
The first step in the installer is to open the disk utilities to format the disk.
In disk utilities select the disk and format it with the default settings.
Then you can start the installer.
At the installer select the disk that you formatted in the previous step.
Then follow the instructions to proceed with the installation.