Trellis VM won't start after reboot: "vz driver is running but host agent is not"

Just ran into an issue after rebooting my machine where trellis vm start failed with this error:

❯ trellis vm start
Running command => limactl start example.com
INFO[0000] Using the existing instance "example.com"
FATA[0000] errors inspecting instance: [vz driver is running but host agent is not]
Error starting VM.
exit status 1

Running limactl list showed the VM with a “Broken” status:

❯ limactl list
WARN[0000] instance "example.com" has errors               errors="[vz driver is running but host agent is not]"
NAME                STATUS     SSH                VMTYPE    ARCH       CPUS    MEMORY    DISK      DIR
radicle.com         Stopped    127.0.0.1:56224    vz        aarch64    4       4GiB      100GiB    ~/.lima/radicle.com
example.com         Broken     127.0.0.1:52190    vz        aarch64    4       4GiB      100GiB    ~/.lima/example.com

I had rebooted my machine with several VMs running, but only one of them had a “Broken” status

When looking at ~/.lima/example.com/ha.stderr.log:

2026-05-23T11:49:07  Shutting down VZ
2026-05-23T11:49:07  fatal  vz: CanRequestStop is not supported

Lima’s host agent received SIGTERM but crashed during shutdown without cleaning up vz.pid

After reboot, the PID in vz.pid gets reassigned to an unrelated process, so Lima’s liveness check returns a false positive & thinks vz is still running. Removing the stale pidfile fixes it:

rm ~/.lima/example.com/vz.pid
trellis vm start

Also added this to the Trellis docs for troubleshooting

Yeah I’ve had this happen several times over the past years. I thought I was the only one, so it’s nice to see that my curse is shared.

If you write “trellis vm stop” at this time you get another suggestion for how to fix it.

limactl stop -f example.com

After that you can start it like usual with “trellis vm start”

Didn’t know the stop -f worked! Thanks for letting me know — will change the docs to mention that since it’s a lot cleaner