Hypervisor framework

Also known as: Hypervisor.framework

On this page 7

The Hypervisor framework, also written Hypervisor.framework, is the low-level macOS programming interface that gives ordinary user-space applications access to the hardware virtualization features of the processor. It lets an app create a virtual machine, map memory into it and run virtual CPUs at near-native speed, without installing a kernel extension.

Within Apple silicon and compatibility, the framework is the foundation on which most virtualization software on the Mac is built, either directly, as in QEMU-based tools such as UTM, or indirectly through the higher-level Apple Virtualization framework. It deliberately provides only the CPU and memory core of a hypervisor and leaves every virtual device to the calling application.

How the Hypervisor framework runs a virtual machine

The framework works as a thin user-space wrapper around the virtualization support in the macOS kernel. The application creates a VM, allocates ordinary memory in its own address space, maps that memory into the guest physical address space, and creates one or more vCPUs, each bound to a dedicated host thread.

When the application calls the run function on a vCPU, the processor switches into guest mode and executes guest instructions directly. Execution returns to the application on a VM exit, for example when the guest touches an unmapped address, executes a privileged instruction or receives an exception. The application then emulates the device or instruction and resumes the vCPU.

The table below lists the main responsibilities and shows which side handles each one.

ResponsibilityHandled byNotes
VM and vCPU creationHypervisor frameworkOne VM per process
Guest memory mappingHypervisor frameworkHost memory mapped with chosen permissions
Instruction executionProcessor in guest modeNative speed for most code
Device emulationCalling applicationDisks, network, display, timers
Firmware and bootCalling applicationLoads kernel or UEFI image
Scheduling of vCPUsmacOS schedulerEach vCPU is an ordinary thread
Division of work between the framework and the application

Hypervisor framework on Intel and Apple silicon Macs

Apple introduced the framework in OS X Yosemite for Intel Macs, where it exposes Intel VT-x with extended page tables. On Apple silicon, the same framework name covers a different API built on the Arm virtualization extensions, so code written for one architecture does not compile unchanged for the other.

AspectIntel-based MacApple silicon Mac
Hardware featureIntel VT-x with EPTArm virtualization extensions
Native guest architecturex86-64ARM64
Register accessVMCS fields and x86 registersArm system and general registers
Interrupt controller supportEmulated by the applicationVirtual GIC available in recent macOS
Typical guestsWindows, Linux x86-64Linux ARM64, macOS, Windows on Arm
Architecture differences

The crucial limitation is that hardware virtualization never translates instruction sets. An Apple silicon Mac can virtualize only ARM64 guests at native speed; running an x86-64 operating system requires full instruction emulation, which is many times slower. Rosetta 2 and Rosetta for Linux translate applications, not whole operating systems.

Hypervisor framework compared with Apple Virtualization framework

The two frameworks form a layered stack: the Apple Virtualization framework, introduced in macOS Big Sur, uses the Hypervisor framework underneath and adds ready-made virtual devices, boot loaders and a configuration model. Developers choose between them according to how much control they need.

CriterionHypervisor frameworkVirtualization framework
Abstraction levelCPU and memory primitivesComplete virtual machine
Virtual devicesWritten by the developerVirtio storage, network, display, sound
macOS guestsImpractical to build aloneSupported on Apple silicon
Effort to ship a VM appHigh, months of workLow, a few hundred lines
Typical usersQEMU, custom emulators, researchLightweight VM managers, CI runners
Choosing the right layer

Commercial products such as Parallels Desktop and VMware Fusion combine their own device models with Apple’s frameworks on Apple silicon, because third-party kernel-level hypervisors are no longer an option on modern macOS.

Entitlements, security and practical requirements

An application must be signed with the com.apple.security.hypervisor entitlement before the framework allows it to create a VM. Without that entitlement, the creation call fails, which prevents arbitrary processes from silently starting guests.

  • No kernel extension is needed, so virtualization tools install and update like ordinary apps.
  • Guest memory is process memory, which means it counts toward the host app and can be swapped or compressed by macOS.
  • Crashes stay contained: a failing VM process does not take down the host kernel.
  • Sandboxed apps can use the framework when they hold the entitlement, which makes App Store distribution possible.
  • Developers must handle timing, because a vCPU thread competes with other threads for CPU time.

Limitations and common misconceptions

Most misunderstandings come from expecting the framework to be a complete virtualization product. It is a building block, and several capabilities depend on macOS version, chip generation or the application on top.

MisconceptionActual situationPractical consequence
It emulates x86 on Apple siliconIt only runs native ARM64 codex86 guests need slow emulation
It provides graphics accelerationNo GPU virtualization is includedApps add paravirtual display drivers
It replaces Boot CampGuests run beside macOS, not insteadSome games and drivers still fail
Nested virtualization always worksDepends on chip and macOS versionCheck support before planning
Misconceptions and the actual situation

Performance is usually close to native for CPU-bound work, while workloads heavy in disk, network or graphics activity depend largely on the quality of the device emulation written by the application.

The idea in brief

The Hypervisor framework is the part of macOS that lets an app run a second computer inside the Mac. The processor has special support for this, and the framework hands that support to the app safely.

It gives the app only the engine: a processor and memory for the guest system. Everything else, such as the virtual disk, network card and screen, the app must build itself. Think of it as a car engine without a body; virtualization apps supply the rest of the vehicle.

A practical scenario

A backend developer on a MacBook Air with an M2 chip needs to test a service on ARM64 Linux. Using UTM, which runs QEMU with the Hypervisor framework as its accelerator, the developer creates a VM with 4 vCPUs and 8 GB of memory. The Linux guest boots in seconds and compiles the project at close to native speed, because guest instructions run directly on the M2 cores.

Later, the same developer tries an x86-64 Linux image for a legacy tool. UTM must now use full instruction emulation instead of the Hypervisor framework, and the same compilation takes several times longer. The developer switches the test pipeline to ARM64 images and keeps x86 emulation only for the rare legacy check, which saves hours of waiting each week.