Skip to content

FAQ ​

Short answers to common questions. Each one links to the page with the details.

General ​

What is vz for? ​

Building throwaway or long-lived labs of Linux VMs and networks on a Mac: learning networking (routing, VLANs, BGP, firewalls), trying distributions, testing Ansible or Terraform code against real machines, running a small Kubernetes cluster, or reproducing a production topology on your desk. The examples show the range.

How is it different from a desktop VM app, Vagrant or Docker? ​

  • Declarative and topology-first. One file describes every VM and every network and cable between them. Point-to-point links, host-only and NAT switches, MTUs and DHCP reservations are first-class.
  • Native. It uses Apple's Virtualization framework and vmnet directly, with no hypervisor, kernel extension or helper daemon to install.
  • Real VMs, not containers. Each node has its own kernel, so you can load modules, run routing daemons, change sysctls or run Kubernetes.

vz is not a general desktop virtualization app, and it does not run Windows guests. A macOS guest is experimental: set platform: apple on the node. See Images.

Does it need root or sudo? ​

No. vz runs as your user. Only sudo make install (to copy into /usr/local) needs it.

Does it work on Intel Macs or older macOS versions? ​

No. It needs Apple silicon and macOS 27, because it uses APIs that are new in macOS 27.

Which guest operating systems work? ​

arm64 systems that boot with UEFI. Debian, Ubuntu, Fedora, AlmaLinux and Rocky Linux disks are tested and can be pulled with vz image pull. Any other arm64 UEFI disk or installer ISO can be listed under disks.

A macOS guest is experimental. Set platform: apple on the node and list the IPSW from vz image pull ipsw macos under disks, next to an empty disk; the first start installs macOS. There is no serial console: use vz node display. One Mac runs at most two of these nodes. See macOS guests and platform.

Can I run x86_64 programs in a guest? ​

Linux guests can run x86_64 Linux binaries through Rosetta. Set rosetta: true on the node; vz then offers Rosetta to the guest as a VirtioFS share with the tag rosetta, which you mount and register with binfmt_misc inside the guest. The guest itself must still be arm64. See Storage.

Using labs ​

Where are my VM's disks? ​

The pulled base image stays untouched in ~/.vz/images. With overlay: true, everything the guest writes goes to ~/.vz/state/<lab>/<node>/disk<N>.overlay.asif. See Files and environment.

How do I start over with a clean VM? ​

bash
vz down
vz node reset <node> --yes
vz up

node reset deletes the node's overlays, UEFI variables and cloud-init seed, so the next boot starts from the base image and runs cloud-init again.

Do changes to lab.yaml apply to a running lab? ​

No. The lab process reads the file once, at vz up. Stop the lab and start it again to apply changes. Runtime changes (cables, NIC ports, USB media, memory target) are made with commands instead: see Managing labs.

Can I run several labs at the same time? ​

Yes, as long as they have different names and their switch subnets do not overlap. Memory is usually the real limit. All 32 examples use distinct subnets and MACs, so any of them can run together. vz ls lists what is running.

Can I start only some nodes? ​

Yes: vz up r1 r2. The other nodes are not started, so a link to one of them has nothing on its far end.

Why does my VM get a different IP address than I expected? ​

vmnet assigns addresses from its own DHCP server. For a fixed address, set mac: on the interface, add a matching dhcpReservations entry on the switch, and make sure the guest uses its MAC as DHCP client id (dhcp-identifier: mac in network-config). vz node ls tells you when a reservation is not being used. See Networking.

How do I reach a service in a VM from my Mac? ​

On a switch, the Mac is a member, so it can reach the VM's address directly (ssh lab@10.30.0.11). To publish a port on localhost, add a portForwarding rule to a NAT switch. See Networking.

How do I copy files into a VM? ​

Use scp, or share a folder from the Mac with VirtioFS (shares: on the node) and mount it in the guest with mount -t virtiofs <tag> <dir>. See Storage.

How do I see the VM's screen? ​

vz node display <node> opens a window. Nodes get one 1280x800 display by default. Debian's genericcloud images have no GPU driver, so use debian-13-generic for desktops. See Consoles and displays.

How do I leave the serial console? ​

Close its Terminal window. Every key, including Ctrl+C, goes to the VM, so there is no escape sequence. The VM keeps running.

Automation ​

Can I script vz? ​

Yes. Every command accepts --json and exits with status 1 on failure. node reset and destroy need --yes when not run in a terminal. See Automation.

Can I run vz in CI? ​

Only on a macOS 27 runner with Apple silicon, and the runner must allow virtualization. vz's own CI builds and tests on such a runner but does not boot VMs. See Automation.

Project ​

Is the lab file format stable? ​

It is versioned by macOS release: every lab file says schemaVersion: 27, the format for macOS 27 (the schema is schema/27.json), and vz refuses versions it does not know. Expect new keys; check the release notes when you upgrade.

How can I help? ​

Report bugs, test images on your Mac, write an example lab, improve these docs, or send code. See Contributing.

See also ​