Troubleshooting
Find the message you see, or the symptom, and follow the fix. Messages are quoted as vz prints them, with names and numbers replaced by placeholders such as <node>.
TIP
The background lab process writes everything it does to lab.log in the lab's state directory: ~/.vz/state/<lab>/lab.log by default. When a lab misbehaves, read that first. vz up prints its last 40 lines when startup fails.
First checks
vz version # which vz
sw_vers -productVersion # macOS 27 or newer?
uname -m # arm64?
codesign -d --entitlements - "$(command -v vz)" | grep virtualization
vz validate # is the lab file valid?Installing and building
this vz binary is not signed with the com.apple.security.virtualization entitlement
Virtualization.framework only runs binaries signed with that entitlement. Builds made with plain swift build or swift test do not have it. Rebuild with make build (or make release), or sign an existing binary:
./scripts/sign.sh .build/debug/vz entitlements.plistBuild fails with "Operation not permitted"
.build has files owned by root, from a build under sudo. Fix it once, then never build with sudo again (only make install needs it):
sudo chown -R "$(id -un)" .buildthe JSON Schema resource is missing or bundled examples are missing
An installed vz looks for ../share/vz/schema and ../share/vz/examples next to its binary. Keep bin/ and share/ together when you move a release, or reinstall. A development build uses the SwiftPM resource bundle: rebuild with make build.
Starting a lab
lab '<lab>' is already running (pid <pid>). Stop it with vz down.
A lab with this state directory is running. Use it, or stop it with vz down. Two different labs need different names (or state directories).
lab failed to start, a node stopped during startup or every node stopped during startup
The lines printed after the message come from lab.log. Common causes:
- A disk file does not exist:
node '<node>': disk file not found: <path>. Pull the image (vz image pull <name>) or fixpath. vz only creates a missing file when the disk has asizeand nooverlay. - The guest powered itself off. Check the console log (
consoleLog: true, thenvz node logs <node>) or open the display (vz node display <node>). - A vmnet error, see Networking below.
timed out waiting for the lab to start
vz up waits up to 180 seconds for every node to reach running. Look at the log file named in the message. A very slow disk (for example a base image on a network share) is one cause; the cache: true disk option can help there.
the state directory path is too long for its control socket
Unix socket paths are limited to 104 bytes on macOS, and the socket lives in the state directory. vz validate and vz up report it before anything starts. Use a shorter state: path in the lab file, a shorter --state, a shorter lab name, or a shorter $VZ_HOME.
cpus <n> is more than this Mac allows
Lower cpus for that node. The limit is the number of CPUs Virtualization.framework allows on your Mac.
nested virtualization is not supported on this Mac (needs M3 or newer)
Remove nestedVirtualization: true, or run the lab on a Mac with an M3 chip or newer. vz validate warns about this before you start.
Rosetta is not installed. Run: softwareupdate --install-rosetta
Install Rosetta on the Mac with that command, or remove rosetta: true.
init not found or init directory has no user-data
init: is resolved relative to the lab file. It must be a file (used as user-data) or a folder that contains a file named exactly user-data. See cloud-init.
share '<tag>' folder not found
The path of a share must be an existing folder on the Mac, relative to the lab file or absolute. Create it, or fix the path.
size <size> is smaller than the base image or the disk is already <size>; it cannot shrink
On an overlay disk, size is the size the guest sees. It can only be larger than the base image, and it can grow later but never shrink. Raise size, or remove it. To go back to a smaller disk, reset the node (this deletes its overlay):
vz down
vz node reset <node> --yesUSB passthrough failed or USB device <id> is not connected
USB passthrough uses Accessory Access, which needs the com.apple.developer.accessory-access.usb entitlement and a Developer ID signature. Builds from source and the release tarball are ad-hoc signed and cannot claim USB devices. Remove the usb: list to run the lab. If you do have a suitably signed build, check that the device is plugged in and that vendorId/productId match.
Networking
vmnet: ... failed: general failure (VMNET_FAILURE), out of resources (VMNET_MEM_FAILURE) or Internet Sharing is busy
Usually another running lab already uses the same subnet, or a lab that just stopped has not released it yet. Check vz ls, give each lab its own ipv4Subnet, or wait a few seconds and run vz up again.
access denied (VMNET_INVALID_ACCESS)
The binary is not signed with its entitlement. See the first entry under Installing and building.
node ls shows no address
vz finds addresses from the Mac's DHCP reservations and lease file. A NIC without a reservation shows nothing until the guest has asked for an address. Wait for the first boot to finish, then try again. If it never appears:
- Is the NIC on a switch with
dhcp: true(the default)? Links have no DHCP. - Does the guest configure that NIC? With several NICs, write a
network-configthat matches each NIC by MAC. See cloud-init. - Check
vz portandconnected:: an unplugged NIC gets no address.
macOS's DHCP server no longer holds its reservation (or "dropped the reservation" after node restart)
The reservation is missing from /etc/bootptab, so the guest gets a pool address instead. This happens when a node restarts (vz node restart, or a reboot inside the guest) while another NAT lab is running: macOS's Internet Sharing rewrites /etc/bootptab from the lab it was started for and leaves out the other lab's reservations. vz node restart warns a few seconds after the restart when this happened.
vz down and vz up create the switch again and put the reservation back. Until the cause is fixed, avoid restarting or rebooting nodes of a lab while another NAT lab runs.
is using <ip>, not its reservation <ip>: the guest's DHCP client id is not its MAC
vmnet matches DHCP reservations by MAC, but some guests (Debian, for example) send a DUID as their DHCP client id instead. Tell the guest to use its MAC, in network-config:
version: 2
ethernets:
mgmt:
match: { macaddress: "52:54:00:30:01:00" }
set-name: mgmt
dhcp4: true
dhcp-identifier: macThen vz down, vz node reset <node> --yes so cloud-init runs again, and vz up.
Port forwarding works on the Mac's switch address but not on localhost
For TCP rules vz also listens on 127.0.0.1 and ::1. If another program already uses that port, lab.log says localhost:<port> (127.0.0.1) is already in use; leaving that address to vmnet. Free the port or pick another hostPort. UDP rules are only forwarded by vmnet.
A VM has no internet access
- The switch needs
nat4: true(ornat6: truefor IPv6). Without NAT it is host-only. - With
dhcp: false, the guest needs a static address, a gateway (the Mac's address, the first in the subnet) and DNS. See example 04. - Links never route to the internet. A node that only has links needs a router node with NAT.
Consoles and displays
The console window is empty
The console replays the most recent output when you attach, then shows new output. If the guest is idle, press Enter to get a fresh login prompt. If nothing ever appears, the OS may not use the virtio serial console: open the display instead with vz node display <node>. A platform: apple (macOS) node has no serial console at all. Use vz node display <node>, or SSH.
could not open a <app> window
vz node console opens Terminal, or the app named in $VZ_TERMINAL. Check that the name is an installed app that can open .command files, for example VZ_TERMINAL=iTerm.
node '<node>' has no display: the lab file says displays: []
Remove displays: [] (a node gets one 1280x800 display by default), or list a display. Then restart the lab.
The display window stays black on Debian
The debian-13 and debian-12 images use Debian's small cloud kernel, which has no driver for the virtio GPU. Use debian-13-generic (full kernel) for anything that needs a screen, and log in on the serial console otherwise.
has no console log for boot <n>
Console logs are only written with consoleLog: true on the node. Add it and start the lab again. vz starts a new log file each time the lab starts the node: --boot 0 is the newest file, --boot 1 the one before. A reboot inside the guest keeps writing to the same file.
Images
does not match its published checksum. The mirror may be updating; try again later.
The download was damaged or the mirror is between releases. vz deleted the partial file. Try again later.
is not in the checksum list; the release may have moved or download failed: HTTP 404
The distribution moved or renamed the file. Update vz. If it still fails, please open an issue with the output of vz image pull.
After pulling an image again, a node no longer boots or its files look corrupt
An overlay only stores the blocks the guest changed, on top of the exact base it was made from. vz image pull --force (or a newer release) replaces the base, and old overlays no longer match it. Reset the nodes that use the image:
vz down
vz node reset <node> --yesNo space left on device inside the guest
An overlay disk is 10GiB by default (more if you set size). Check what the guest sees and uses:
df -h / # in the guestIf / is still the size of the image (about 3GiB), the guest did not grow its file system: cloud-init's growpart runs on boot, so check cloud-init status --long. If the disk is simply full, raise size on that disk in lab.yaml and restart the node; disks only grow:
- { path: ~/.vz/images/debian-13-genericcloud-arm64.raw, overlay: true, size: 64GiB }vz node restart <node>Commands
lab '<lab>' is not running. Start it with vz up.
Runtime commands (node ls, node console, link, port, ...) need a running lab. Check that you are in the right folder or pass -f <lab file>; vz ls lists running labs and their files.
pass --yes to confirm
node reset and destroy ask before deleting. In a script, CI, or anywhere stdin is not a terminal, pass --yes.
lab '<lab>' is running. Run vz down before reset.
A node's disks cannot be reset while the lab runs. Stop the lab first.
node '<node>' is not part of this running lab
The lab was started with only some nodes (vz up <node>...), or the node was added to the lab file after the lab started. Changes to the lab file take effect at the next vz up.
Still stuck?
Open an issue with:
vz versionandsw_vers -productVersion- your
lab.yaml(and theinitfiles, if relevant) - the output of the command that failed
~/.vz/state/<lab>/lab.log
See Contributing for how to report bugs.