Incus agent fails to start

incus launch images:debian/11 --vm
incus console keen-mongoose
Booting `Debian GNU/Linux'

Loading Linux 5.10.0-27-amd64 ...
Loading initial ramdisk ...
[FAILED] Failed to start Incus - agent.

Is there a way to see why the agent fails?

I tested a random ubuntu image which seems to work:

incus launch images:ubuntu/jammy/cloud ubuntu-jammy-vm --vm

Hmm, that exact same VM works fine here, what’s your host?

It’s possible to do some debugging by stopping the VM, map the block device of the VM, mount the second partition from that, set a root password, unmount and start the VM, at which point you can login locally fine.

1 Like

We used incus exec NAME -- sh -c 'systemctl isolate' as check if the vm is ready.
Which seems to be the issue. But good to know that i could set a password.

To check if a VM is ready, you can also

$ incus start vm1
$ incus exec vm1 -- systemctl is-system-running
$ incus exec vm1 -- systemctl is-system-running
$ incus exec vm1 -- systemctl is-system-running
incus exec "$CONTAINER_ID" -- sh -c "systemctl is-system-running | grep -qE 'running|degraded'"

That is almost what i did, but we added degraded as ok state since there is a surprising amount of images with services which are non essential but are started and fail. :sweat_smile: