This is a preconfigured macOS VirtualBox Virtual Machine, along with a script for preparing a bootable install ISO image from a downloaded Mac OS installer app.
Note: The create_install_iso.sh
script is tailored to macOS hosts, and the macOS High Sierra installer app. The script will will need to be modified to work with the installer app for other versions of macOS.
- You need a Mac to run the script
create_install_iso.sh
and generate HighSierra.iso file. - You need a Virtualbox installed on your hypervisor host (Win/Linux/Mac/whatever)
- Download the macOS installer app if you have not already. It should be located in your
Applications
directory. - Copy
create_install_iso.sh
script from this git repo to your Mac. - Run
create_install_iso.sh
, which will create a file namedHighSierra.iso
on your desktop, which is based on the downloaded macOS installer app. It will take about 1-2 minutes or more. - Copy the resulting
HighSierra.iso
file from your desktop to your hypervisor host
In the VirtualBox GUI:
- Open the virtual machine from the repo
- Create a new virtual hard disk. Make sure that your new virtual hard drive is not set as an SSD, otherwise the High Sierra installer will format the drive as APFS, which is not yet recognized/supported by VirtualBox's EFI BIOS and you will not be able to boot from the hard drive.
- Set the
HighSierra.iso
as an inserted disk in the VM's optical drive
- For Windows hosts, go to
%USERPROFILE%\.VirtualBox
directory - Checkout the
macOS.vbox
file from this git repo and copyuuid
andname
properties ofMachine
XML tag from the.vbox
of your freshly created configuration intomacOS.vbox
. - Remove the
.vbox
file created by the Virtualbox (and copy the name of it to the clipboard) - Rename
macOS.vbox
to the name from your clipboard. Put it into this directory (%USERPROFILE%\.VirtualBox
) - Edit the VM's CD and HDD - it will point to a wrong places until you edit it. Point them to a correct images you have created before.
- Start the VM, and wait for the macOS installer boot.
- When the boot completed, open Disk Utility. From the View menu enable the option to "Show all devices", and erase the virtual hard disk you have attached to this VM before.
- Quit the Disk Utility, and install MacOS to the newly initialized hard drive.
- When the installer completes, reboot the VM.
- Remove the ISO disk from the virtual optical drive and reboot the VM again.
- With the Installer ISO image not available to boot from, you will be dumped into the EFI Shell. Enter the following at the EFI prompt to boot macOS from the virtual hard drive and finish installation:
FS1:"macOS Install Data\Locked Files\Boot Files\boot.efi"
Alternatively, you can enterexit
at the prompt to go to the EFI BIOS boot screen, and use theBoot from file
option to navigate to boot.efi. This is required only once.
If you don't need to bind with your Apple ID (for example, if you are preparing the redistributable image), skip this step on the welcome step. The skip option will be on the top of the form which asks your e-mail/Apple ID.
- No 2D/3D/OpenGL acceleration is supported for macOS, no 3D rendering is working (DRI/OGL view shows as an empty zone on the screen)
- No Virtualbox Guest Tools are available for macOS, no shared folders are available
- 1024x768 pixels screen size