macos-virtualbox
Push-button installer of macOS Catalina, Mojave, and High Sierra guests in Virtualbox on x86 CPUs for Windows, Linux, and macOS
A single shell script that automatically downloads a genuine macOS installer from Apple and creates a working macOS virtual machine in VirtualBox on Windows, Linux, or macOS with minimal user input.
This repository contains a single shell script that automates the process of creating a macOS virtual machine inside VirtualBox. VirtualBox is free software that lets you run one operating system inside another. The script downloads a genuine macOS installer directly from Apple's servers and walks through the entire setup without requiring you to manually configure VirtualBox settings or interact with the virtual machine beyond pressing Enter a handful of times when prompted.
The script supports macOS Catalina (10.15), Mojave (10.14), and High Sierra (10.13). It runs on Windows, Linux, and macOS host systems, as long as the computer has an x86 processor with hardware virtualization support. On Windows, it requires running through a compatibility layer called Cygwin. The script checks for common problems, including one where certain Windows security features block VirtualBox from using hardware virtualization, and exits with a clear error message if it detects an incompatible setup.
The default installation creates a virtual disk of 80 gigabytes, which takes up about 25 gigabytes of actual space on your computer at first. Several display resolutions are supported. Some features of a real Mac do not work inside the virtual machine, including audio, USB devices, FileVault disk encryption prompts, and display scaling. The README explains workarounds involving a third-party bootloader called OpenCore for some of these limitations, but configuring OpenCore is outside the scope of this script.
The script is designed as a starting point. Once you have a working macOS virtual machine, the README notes you can move it into faster virtualization software or use it as a base for automated deployment systems. The project is currently looking for a new maintainer, as the original author has stepped back from active development.
Where it fits
- Run macOS Catalina, Mojave, or High Sierra on a Windows or Linux machine inside VirtualBox for development or testing without buying Apple hardware.
- Create a macOS base image to use as a starting point for automated deployment systems or CI testing pipelines.
- Test macOS-specific software or apps you're developing on a machine that isn't a Mac.