Apple Virtualization framework

The Apple Virtualization framework is a macOS programming interface for creating and running virtual machines with macOS or Linux on Apple hardware.

The Apple Virtualization framework is part of macOS. It lets an application create and run virtual machines on a Mac. It first appeared in macOS 11 in 2020. It builds on the lower-level Hypervisor framework, which gives access to the hardware virtualization of the processor.

The framework handles the virtual hardware of each virtual machine, such as processors, memory, disks, network, display, and shared folders. On Macs with Apple silicon, it can run macOS as a guest, as well as Linux. Many virtualization tools for the Mac are built on it. The license of macOS limits how many macOS virtual machines can run on one Mac at the same time.

macOS can run only on Apple hardware, so macOS sandboxes need real Macs as hosts. The Virtualization framework turns each Mac into a host for macOS virtual machines. Each sandbox runs in its own virtual machine with its own disk and user account. This lets agents and build jobs use macOS tools, such as Xcode, in an isolated environment.