Incus on Fedora 41

Fedora 41 has incus in the official repos now. So i wanted to try it out. I setup a fresh fedora 41 server with btrfs and installed incus directly from dnf.

I then enables incus with systemd and ran

# echo "root:1000000:1000000000" >> /etc/subuid
# echo "root:1000000:1000000000" >> /etc/subgid

as described in Getting Started with Incus on Fedora · ganto/copr-lxc4 Wiki · GitHub linked from the incus docs.

However then running
incus launch images:alpine/edge alpine1 results in
Error: Failed instance creation: Failed to run: /usr/libexec/incus/incusd forkstart alpine1 /var/lib/incus/containers /run/incus/alpine1/lxc.conf: exit status 1

here is the output of incus info for the container

# incus info --show-log alpine1
Name: alpine1
Status: STOPPED
Type: container
Architecture: x86_64
Created: 2024/11/15 21:36 CET
Last Used: 1970/01/01 01:00 CET

Log:

lxc alpine1 20241115203711.737 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 1
lxc alpine1 20241115203711.737 ERROR    start - ../src/lxc/start.c:lxc_init:845 - Failed to run lxc.hook.pre-start for container "alpine1"
lxc alpine1 20241115203711.737 ERROR    start - ../src/lxc/start.c:__lxc_start:2034 - Failed to initialize container "alpine1"
lxc alpine1 20241115203711.761 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 1
lxc alpine1 20241115203711.761 ERROR    start - ../src/lxc/start.c:lxc_end:945 - Failed to run "lxc.hook.stop" hook
lxc alpine1 20241115203712.292 ERROR    utils - ../src/lxc/utils.c:run_buffer:571 - Script exited with status 1
lxc alpine1 20241115203712.292 ERROR    start - ../src/lxc/start.c:lxc_end:986 - Failed to run lxc.hook.post-stop for container "alpine1"
lxc alpine1 20241115203712.292 ERROR    lxccontainer - ../src/lxc/lxccontainer.c:wait_on_daemonized_start:829 - No such file or directory - Failed to receive the container state

any ideas what to do? Am i holding it wrong or is the official fedora package broken?

After the changes to `/etc/sub?id’, do you restart the Incus service in order to re-read those files?

I restarted the server afterwards.

Looks like this is a issue with fedora, broken for over 160 days:

is there any workaround or is incus on fedora just broken?

It’s pretty odd that nobody on the Fedora side has processed that PR by now…

@Conan_Kudo can you help with that?

As for workarounds, you can pretty trivially add the Environment=INCUS_SOCKET=/run/incus/unix.socket to your own systemd unit, either directly or as an override through systemctl edit.

1 Like

Incus on Fedora 41 still seems to be quite neglected. The repositories still has Incus on 6.2 [1] and the socket environment variable hasn’t been touched for a few months [2].

I know this isn’t my place, and my relatively newness on the forums, but I wonder if it’s best to de-list the Incus instructions given that it’s broken out of the box, although easily fixable, and seemingly unmaintained.

[1] 2279094 – incus-6.8.0 is available
[2] As linked by @Viability, 2292096 – incus.service missing an environment variable INCUS_SOCKET

@Conan_Kudo anything that can be done to have the Fedora package more actively looked at?

I added a co-maintainer to help out recently, but I’ve been struggling to get incus to be updated and working because of all the weird path problems with the incus socket.

BTW this fix works but only when using the root user. When setting up projects for individual users it fails with an error Error: The incus daemon doesn't appear to be started (socket path: /var/lib/incus/unix.socket).

So there’s a bit more to do then just change the systemd service file to get it to fully work.

Incus update to 6.8: FEDORA-2024-0912cd3ad9 — security update for incus — Fedora Updates System

Want to report the 6.8 version of Incus from the test repositories appears to be working without any issues.

Then give feedback and karma on the update. It helps with getting updates delivered faster.

1 Like