Unable to run dae, unable to find BTF in kernel

dae requires the kernel to have BPF enabled. I created an AppVM based on a Fedora template where dae was already installed. However, when running sudo systemctl start dae in the AppVM, dae fails to start.

Through sudo systemctl status dae, I found some errors in the logs. Based on my research, including consulting ChatGPT, the errors seem to indicate that the kernel lacks BPF support.

Here is the error log:

 dae.service - dae Service
     Loaded: loaded (/usr/lib/systemd/system/dae.service; disabled; preset: disabled)
    Drop-In: /usr/lib/systemd/system/service.d
             └─10-timeout-abort.conf
     Active: failed (Result: exit-code) since Fri 2025-01-17 18:10:37 CST; 3s ago
       Docs: https://github.com/daeuniverse/dae
    Process: 1084 ExecStartPre=/usr/bin/dae validate -c /etc/dae/config.dae (code=exited, status=0/SUCCESS)
    Process: 1090 ExecStart=/usr/bin/dae run --disable-timestamp -c /etc/dae/config.dae (code=exited, status=1/FAILURE)
   Main PID: 1090 (code=exited, status=1/FAILURE)
        CPU: 55ms

Jan 17 18:10:36 sys-dae dae[1090]: level=info msg="Waiting for network..."
Jan 17 18:10:36 sys-dae dae[1090]: level=info msg="Network online."
Jan 17 18:10:36 sys-dae dae[1090]: level=warning msg="No node found."
Jan 17 18:10:36 sys-dae dae[1090]: level=warning msg="No interface to bind."
Jan 17 18:10:36 sys-dae dae[1090]: level=info msg="Loading eBPF programs and maps into the kernel..."
Jan 17 18:10:36 sys-dae dae[1090]: level=info msg="The loading process takes about 120MB free memory, which will be released after loading. Insufficient memory will cause loading failure."
Jan 17 18:10:37 sys-dae dae[1090]: level=fatal msg="load eBPF objects: field LocalTcpSockops: program local_tcp_sockops: apply CO-RE relocations: load kernel spec: no BTF found for kernel version 6.6.65-1.qubes.fc37.x86_64: not supported: you should re-compile linux kernel with BTF configurations; see docs for more information"
Jan 17 18:10:37 sys-dae systemd[1]: dae.service: Main process exited, code=exited, status=1/FAILURE
Jan 17 18:10:37 sys-dae systemd[1]: dae.service: Failed with result 'exit-code'.
Jan 17 18:10:37 sys-dae systemd[1]: Failed to start dae.service - dae Service.

According to dae’s documentation, the kernel version only needs to be greater than or equal to 5.17, and the kernel version provided by Qubes OS is already much higher.

Documentation:

I also tested this on an Arch Linux template and encountered a similar error, so I believe this issue is not related to the Fedora or Arch templates themselves. It is very likely related to the kernel. If you can help solve this issue, I would greatly appreciate it, as I am trying to use dae to build some high-performance gateways for the community.

1 Like

The Qubes kernel is missing some kernel configs, which is probably why you’re getting this. Try using the in-qube kernel instead:

  • PVH: provided by qube as kernel and grub2-xen-pvh installed in dom0
  • HVM: provided by qube as kernel
1 Like

Thanks for the answer, the problem has been solved, I replaced grub2-xen-pvh, the dae was successfully started, but I was curious what provide by qube means, I chose this option to start qube, qube is in a yellow state, can’t be closed and can’t be started

1 Like

Provided by qube uses the qube’s distro kernel installed in the template instead of the one provided by Qubes, which comes from dom0.
If the qube hangs, you should check its logs and see what the problem is. There could be many different reasons.

1 Like