A Docker-like experience for VMs using libkrun.
vmm lets you run container images as lightweight virtual machines on macOS, providing full Linux VM isolation with the familiar Docker workflow.
- Docker-like CLI - Familiar commands:
run,stop,rm,ls,pull - Container image support - Run any OCI container image as a VM
- Short names - Use
fedora,ubuntu, etc. instead of full registry paths - Auto-login - VMs boot directly to a shell as your user
- Home directory sharing - Your macOS home directory is mounted in the VM via virtiofs
- Docker (for pulling container images)
git clone https://github.com/ecurtin/vmm.git
cd vmm
make releaseThis builds and signs the binary with the required Hypervisor.framework entitlement.
The binary will be at ./target/release/vmm.
Note: On macOS, the binary must be signed with the
com.apple.security.hypervisorentitlement to use the Hypervisor.framework. The Makefile handles this automatically. If you build withcargo builddirectly, runmake signafterwards.
# Run a Fedora VM
vmm run fedora
# Run Ubuntu with custom resources
vmm run ubuntu --cpus 4 --memory 4096
# List VMs
vmm ls
# Stop a VM
vmm stop <vm-id>
# Remove a VM
vmm rm <vm-id>| Command | Description |
|---|---|
run <image> |
Run a VM from a container image |
ls / images |
List all VMs |
stop <vm> |
Stop a running VM |
start <vm> |
Start a stopped VM |
rm <vm> |
Remove a VM |
attach <vm> |
Attach to a running VM |
inspect <vm> |
Show VM details as JSON |
pull <image> |
Pull a container image without running |
| Option | Description |
|---|---|
-v, --verbose |
Enable verbose output |
-h, --help |
Print help |
-V, --version |
Print version |
| Option | Description |
|---|---|
--cpus <N> |
Number of vCPUs (default: all available) |
--memory <MiB> |
Memory in MiB (default: highest power of 2 less than host memory) |
--name <NAME> |
Custom name for the VM |
vmm integrates systemd-based Linux distributions:
- Fedora (recommended, uses 16k Fedora Asahi kernel)
- Ubuntu
- Debian
- Image Pull - vmm uses Docker to pull the container image
- Rootfs Extraction - The image layers are extracted to create a root filesystem
- VM Setup - Auto-login, user creation, and systemd configuration are applied
- Kernel Extraction - A kernel and initrd are extracted from the container image
- Disk Creation - An ext4 disk image is created from the rootfs
- VM Launch - libkrun boots the VM with the disk and kernel
VM data is stored in:
~/.vmm
This includes:
vms/- VM disk images and rootfskernels/- Extracted kernels and initrd filesstate.json- VM state tracking