This project is inspired by and a rewrite of lima-vm.
The major difference is macvz uses macOS new Virtualization API instead of QEMU for spinning up VM's.
- Higher or equal to macOS monterey (12.2)
- Golang
Check out Github Wiki page Why use virtualization framework to understand more on advantages of Virtualization framework
The following table contains result summary of some different workloads tested against macvz and colima
| Workload | Summary | macvz | colima |
|---|---|---|---|
| Sequential Reads | macvz handles 8x higher operations | 620K | 77K |
| Random Reads | macvz handles 3x higher operations | 82K | 25K |
| Random Reads/Writes | macvz handles 3x higher operations | 37K/12K | 14K/4K |
| Sequential writes | macvz performs almost equally | 37K | 38K |
| Random writes | macvz performs almost equally | 22K | 30K |
| Workload | Summary | macvz | colima |
|---|---|---|---|
| Sequential Reads | macvz handles 8x more data | 2500MB | 306MB |
| Random Reads | macvz handles 3x more data | 320MB | 98MB |
| Random Reads/Writes | macvz handles 3x more data | 140MB/50MB | 60MB/20MB |
| Sequential writes | macvz performs almost equally | 145MB | 150MB |
| Random writes | macvz performs almost equally | 90MB | 110MB |
- Start, stop, shell access for multiple VMs
- Filesystem mounting using virtfs
- Working docker example
- Port binding (Initial support present, Needs testing !!!)
- Run
brew install mac-vz/tap/macvzto install macvz
- Run
make allto compile and build binary - Run
make installto install the binary to /usr/local
To start a Docker VM, run the following command
macvz start https://raw.githubusercontent.com/mac-vz/macvz/main/examples/docker.yaml
Execute the following command in macOS host to update docker.sock location
export DOCKER_HOST=unix://${HOME}/.macvz/docker/sock/docker.sock
That's it !!
To get shell access to a running VM,
macvz shell docker
To stop a running VM,
macvz stop docker