Is there a way to check that the VM agent is running in an incus VM?
I want to wait until the agent is running before using the Incus API to configure the VM (e.g. call InstanceServer.ExecInstance). Otherwise, I get the error “VM agent isn’t currently running”.
As a workaround, I added a delay between creating the instance and trying to run something in it.
I am now thinking of polling the agent by trying to ExecInstance /bin/sh (with empty input). Is there a better way?
Ok, that provides some information. Processes is accessible from InstanceServer.GetInstanceState. But still, the agent is not the first process started, so there may be processes but no agent yet. So I still need to poll the agent, by trying to perform an operation that uses it.