explaingit

myspaghetti/macos-virtualbox

13,541ShellAudience · developerComplexity · 2/5Setup · moderate

TLDR

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.

Mindmap

mindmap
  root((macos-virtualbox))
    What It Does
      Download macOS installer
      Configure VirtualBox
      Automated VM setup
    Supported macOS
      Catalina 10.15
      Mojave 10.14
      High Sierra 10.13
    Host Platforms
      Windows via Cygwin
      Linux
      macOS host
    Known Limitations
      No audio support
      No USB devices
      No FileVault
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Run macOS Catalina, Mojave, or High Sierra on a Windows or Linux machine inside VirtualBox for development or testing without buying Apple hardware.

USE CASE 2

Create a macOS base image to use as a starting point for automated deployment systems or CI testing pipelines.

USE CASE 3

Test macOS-specific software or apps you're developing on a machine that isn't a Mac.

Tech stack

ShellVirtualBoxCygwin

Getting it running

Difficulty · moderate Time to first run · 1h+

Requires VirtualBox with hardware virtualization enabled, Windows users need Cygwin and may face Hyper-V conflicts that block VirtualBox.

In plain English

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.

Copy-paste prompts

Prompt 1
I want to use macos-virtualbox to set up a macOS Catalina VM on Ubuntu Linux. What are the exact prerequisites and steps to run the script successfully?
Prompt 2
The macos-virtualbox script is failing on Windows, I think it's a hardware virtualization conflict with Hyper-V. How do I diagnose and fix this so VirtualBox can use hardware virtualization?
Prompt 3
After running macos-virtualbox and getting a working macOS VM, how do I migrate it to VMware Fusion for better performance, or use it as a base for an automated deployment image?
Open on GitHub → Explain another repo

← myspaghetti on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.