Skip to content

Troubleshooting

Error: Lima VM 'mvm' is not available. Run 'mvmctl setup' or 'mvmctl bootstrap' first.

Fix: Run mvmctl bootstrap (macOS) or mvmctl setup (Linux with Lima installed).

The Lima VM exists but is stopped.

Fix:

Terminal window
limactl start mvm
# or
mvmctl dev # auto-starts Lima
Terminal window
limactl stop mvm --force
limactl start mvm

If that fails:

Terminal window
mvmctl uninstall
mvmctl bootstrap

The Firecracker process may have crashed. Check the logs:

Terminal window
mvmctl logs <name>
mvmctl logs <name> --hypervisor # Firecracker logs

Cause: Insufficient permissions or TAP device name collision.

Fix:

Terminal window
# Check for orphaned TAP devices (inside Lima VM)
limactl shell mvm bash -c "ip link show | grep tap"

Snapshot may be corrupted after a Firecracker version change.

Fix: Delete the snapshot and cold boot:

Terminal window
mvmctl template build <template> --force
mvmctl up --template <template> --name <name>
Terminal window
# Test the flake locally first
mvmctl dev shell
nix build .#default
# Check for errors in the flake
nix flake check

If builds are slow despite no code changes, check that flake.lock hasn’t changed. Any change to flake.lock invalidates the cache.

error: flake does not provide attribute ...

Cause: Your flake.lock references an old nixpkgs or guest-lib version that doesn’t have the expected outputs.

Fix:

Terminal window
nix flake update
mvmctl build --flake .
error: No space left on device

Cause: The Nix store or Lima disk is full.

Fix:

Terminal window
# Run garbage collection
nix-collect-garbage -d
# Check Nix store size (mvmctl doctor warns if >20 GiB)
mvmctl doctor
error: hash mismatch in fixed-output derivation
got: sha256-XXXX...

Cause: The npmHash or outputHash in your flake doesn’t match the fetched content (e.g., upstream package changed).

Fix: Update the hash to the value shown after got: in the error message, or use --update-hash:

Terminal window
mvmctl template build my-service --update-hash
error: Template 'foo' not found

Fix: Check available templates:

Terminal window
mvmctl template list
error: timed out waiting for ...

Cause: Network connectivity issue or a service failed to start within the expected time.

Fix: Check that the Lima VM has internet access and that your service binds to the correct port. Use mvmctl logs <name> to inspect guest output.

Terminal window
# Inside the Lima VM, check NAT rules
limactl shell mvm bash -c "sudo iptables -t nat -L"
# Check the TAP device exists
limactl shell mvm bash -c "ip link show tap0"

Can’t access project files inside microVM

Section titled “Can’t access project files inside microVM”

The Firecracker microVM has an isolated filesystem. Use mvmctl dev shell to access the Lima VM where your home directory is mounted, or pass volumes with --volume.

Adjust resources:

Terminal window
mvmctl uninstall
mvmctl dev up --lima-cpus 8 --lima-mem 16

Force a specific backend:

Terminal window
mvmctl up --flake . --hypervisor firecracker
mvmctl up --flake . --hypervisor apple-container
mvmctl up --flake . --hypervisor docker
mvmctl up --flake . --hypervisor qemu # microvm.nix
mvmctl doctor # check available backends

Rebuild without destroying the Lima VM:

Terminal window
mvmctl setup --recreate
Terminal window
RUST_LOG=debug mvmctl <command>
RUST_LOG=mvm=trace mvmctl <command>