Noureddine RAMDI / GhostVM: macOS virtual machines on Apple Silicon with native integration and CLI automation

Created Mon, 04 May 2026 10:23:03 +0000 Modified Sat, 23 May 2026 20:41:27 +0000

groundwater/GhostVM

GhostVM uses Apple’s Virtualization.framework to create and manage macOS virtual machines on Apple Silicon, a platform combination that isn’t widely supported by mainstream VM tools yet. It packages each VM as a self-contained .GhostVM bundle, making workspaces portable and easy to back up. Beyond just running a VM, GhostVM integrates deeply with macOS features like APFS snapshots for cloning and rollback, and provides a guest agent for seamless host-guest communication over vsock. The project targets macOS 15+ on Apple Silicon (M1 or later), delivering near-native performance and rich automation capabilities.

Native macOS VM management with Apple’s Virtualization.framework

GhostVM is a native macOS app written in Swift and built on top of Apple’s Virtualization.framework. This framework enables hardware-assisted virtualization on Apple Silicon, which is essential since traditional x86 hypervisors don’t run macOS ARM VMs efficiently.

The repo is structured as a SwiftUI app accompanied by a helper process dedicated to each VM instance, a shared framework for common functionality, and a guest agent called GhostTools running inside the VM. This guest agent uses the vsock protocol to communicate with the host, enabling features like clipboard sharing, file sharing, and port forwarding.

Each VM is stored as a .GhostVM bundle, which is essentially a self-contained directory with all VM state, disk image, and snapshot data. This design makes it easy to move or back up entire VM workspaces.

Key features include:

  • Near-native performance leveraging Apple Silicon’s virtualization extensions
  • Snapshot and clone support using APFS copy-on-write for efficient disk state management
  • Deep integration with the host OS for clipboard sync, file sharing, and network port forwarding
  • Full automation via a command-line interface called vmctl and a Unix socket API for programmatic control

The use of APFS snapshot technology is particularly interesting as it allows quick VM state saves and restores without requiring large disk copies. This aligns well with macOS’s native filesystem semantics.

Deep host-guest integration and automation capabilities

What distinguishes GhostVM is its strong focus on seamless host-guest experience and automation. Unlike many hypervisors that treat the VM as an isolated black box, GhostVM includes a guest agent (GhostTools) that communicates over vsock—a socket abstraction designed for VM-host communication.

This agent enables:

  • Clipboard synchronization between the host and VM
  • File sharing that feels native rather than relying on network shares or complex mount setups
  • Port forwarding to expose VM services on the host

The vmctl CLI provides a comprehensive programmatic interface to manage the VM lifecycle. You can initialize, install, start, snapshot, clone, remotely execute commands inside the VM, and synchronize clipboard contents—all from the command line. This level of control is rare in macOS virtualization tools and is particularly useful for automation workflows.

The codebase reflects modern macOS app design with SwiftUI, separating UI logic from VM management and guest communication. The helper processes per VM enforce a clear boundary and simplify resource management.

The tradeoff is platform specificity: only macOS 15+ on Apple Silicon is supported, limiting use cases to developers with this hardware and OS. Also, the reliance on Apple’s Virtualization.framework means the VM capabilities are bounded by what Apple exposes, which might lag behind more mature hypervisor ecosystems in some advanced features.

Still, the focused integration offers a smooth experience for running macOS VMs without the overhead or complexity of cross-platform hypervisors.

Quick start with vmctl CLI for macOS virtual machines

Getting started with GhostVM is straightforward if you meet the requirements: macOS 15+ on Apple Silicon.

Installation steps:

  1. Download the latest DMG from the releases page
  2. Open the DMG and drag GhostVM.app to your Applications folder
  3. Launch GhostVM and create your first workspace

Once installed, you can create and manage VMs entirely from the command line using the vmctl tool. For example, to create a new VM, install macOS, and start it:

vmctl init ~/VMs/dev.GhostVM --cpus 6 --memory 16 --disk 128
vmctl install ~/VMs/dev.GhostVM
vmctl start ~/VMs/dev.GhostVM

This sets up a VM bundle at ~/VMs/dev.GhostVM with 6 CPUs, 16GB RAM, and a 128GB disk, installs macOS, and boots it up. The CLI supports many other operations like snapshotting and remote command execution, enabling rich automation.

Verdict: a specialized macOS virtualization tool with strong integration for Apple Silicon

GhostVM fills a niche that isn’t well served by general-purpose hypervisors—native macOS VMs on Apple Silicon with deep host integration and snapshot support leveraging APFS. Its architecture and tooling make it especially suitable for developers who need isolated macOS environments with near-native performance.

The tight coupling with macOS 15+ and Apple Silicon hardware is a clear limitation, but within that scope, it offers a polished developer experience with strong automation via vmctl.

For anyone building workflows that require macOS sandboxing, such as testing macOS software, running isolated macOS agents, or experimenting with system-level automation, GhostVM offers a compelling solution. Its design choices favor integration and developer control over cross-platform generality.

The project is worth exploring if you have the hardware to run it and want an efficient, scriptable macOS VM platform without the overhead of more generic hypervisors.


→ GitHub Repo: groundwater/GhostVM ⭐ 333 · Swift