How to install incus-agent on linux VM

I have some migrated VMs (from vmware, done by incus-migrate via raw image from boot disk) which do not run incus-agent. What would be the “offical” way to install incus-agent on existing VMs?

What at least worked, but is more like a one time shot without updates was to install the deb package from debian sid. I also found Setting up the LXD agent inside the VM (not required anymore) in simos Blog or here in the formus Install lxd-agent manually on custom OS? and just adapted:

mount -t 9p config /run/incus_agent/
cd /run/incus_agent/
./install.sh

When I reboot the VM, the service is not running, but I can not systemctl enable incus-agent since it is static. What do I miss? Am I on the wrong path?

What would be the strategy for older ubuntu (e.g. 14.04) or other OS like FreeBSD/pfsense?

Thanks!

Hmm, the instructions above should have worked. They rely on you having udev inside of the instance and having udev generate the /dev/virtio-ports/ devices on boot. When those show up, the systemd unit will get called.

So it’d be interesting to look closer at what’s going on on boot following running install.sh to see if there’s an issue on our end or something weird going on with the particular VM.

For 14.04 and FreeBSD, that gets trickier. If they’re using systemd and have kernel drivers for virtio-serial, 9p and virtio-vsock, then install.sh is the way to go. But that’s not going to cut it for FreeBSD.

There, your best bet is to setup a local user that you can use with incus console and get SSH up for normal day to day access.

The work done in Incus 0.5 makes it possible to get a FreeBSD agent eventually, but someone will need to do some work to make such an agent build possible.

Indeed, it was a leftover from previous deb package install. A reinstall/purge of incus-agent and following install.sh worked without error and fixed it.

On FreeBSD/pfsense I already use --console=vga for emergency and ssh for daily usage. So all good. I will do the same for the outdated linux test systems.

Thanks @stgraber!