Which 9p/other kernel modules are required for incus-agent?

I saw some threads on setting up OpenWRT for it.

I was curious and looked here: https://openwrt.org/packages/table/start?dataflt[Name_pkg-dependencies*~]=9p

kmod-9pnet and kmod-fs-9p are available, so I should be able to mount the agent disk without needing a custom volume, no?

What other support do I need in the kernel for it to work? Over what qemu-guest-agent needs, that’s available so its needs are covered.

Right, you need 9p to mount the agent drive, then the agent interacts with the host through both virtio-serial and virtio-vsock, that’s typically:

  • 9p
  • 9pnet
  • 9pnet_virtio
  • vmw_vsock_virtio_transport
  • vmw_vsock_virtio_transport_common
  • vsock
  • virtio_console

Thanks, I’ll boot it up tomorrow and take a look around and see if anything is missing.

If fs-9p also needed for an agent:config disk attached to a VM?

Is this still current?

mount -t 9p config /mnt
cd /mnt
./install.sh
reboot

The docs are a bit sparse on the details here :slight_smile:

No, if agent:config is attached, then you can mount a cdrom instead of using 9p.

The installation instructions above are correct, but they only work on systemd systems, so in the case of OpenWRT, you’ll need to write your own init script to load and start the agent.

My fighting with the OpenWRT VM showed:

  1. Modules: 9p, 9pnet, 9pnet_virtio and netfs are needed only once on incus-agent installation. (9pnet depends on netfs)
  2. Modules: vsock, vmw_vsock_virtio_transport_common and vmw_vsock_virtio_transport are required for the incus-agent and provides vsock transport between host and guest
  3. The /dev/virtio-ports/org.linuxcontainers.incus virtual device is required to kickoff communication between incusd on the host and incus-agent in the VM. You can create a link to /dev/vport5pX device where X is determined by context of /sys/class/virtio-ports/vport5pX/name. (See Stéphane’s comment at Incus-agent in OpenWRT VM - #8 by tregubovav) .
1 Like