Failed to restart incus.service: Unit incus-lxcfs.service not found

Hi all.

Just to show how to deal with this error.
incus 0.6
ubuntu22.04 - jammy

systemctl restart incus

Failed to restart incus.service: Unit incus-lxcfs.service not found.

#) rm /etc/systemd/system/incus-lxcfs.service
#) cp /opt/incus/lib/systemd/system/incus-lxcfs.service /etc/systemd/system/incus-lxcfs
.service
#) systemctl restart incus

I hope it’ll help someone.

best regards

oh yes additionally I have tok, after a reboot:

) ls -l /lib/systemd/system/incus.service

lrwxrwxrwx 1 root root 43 fev 28 15:48 /lib/systemd/system/incus.service → /opt/incus/lib/systemd/system/incus.service
#) rm /lib/systemd/system/incus.service
#) cp /opt/incus/lib/systemd/system/incus.service /lib/systemd/system/incus.service

Thanks for this.

How do you think this issue happened?
Did you start off with a pristine Incus 0.6 installation and then got the problem?

Just because I had a similar issue before, what are your mount points?

I have install incus 0.6 from GitHub - zabbly/incus: Incus package repository. start off with a pristine Incus 0.6 installation and everything goes ok.

After one restart problems arise…

First one appers as incus-lxcfs.service not found.
to solve that I:
#) rm /etc/systemd/system/incus-lxcfs.service
#) cp /opt/incus/lib/systemd/system/incus-lxcfs.service /etc/systemd/system/incus-lxcfs
.service
#) systemctl restart incus

Everyting goes ok again.

Next reboot… Problem appears, but differrent:
#) systemctl restart incus
incus not found…

To solve that I:
#) rm /lib/systemd/system/incus.service
#) cp /opt/incus/lib/systemd/system/incus.service /lib/systemd/system/incus.service

#) systemctl restart incus.
incus is working again… 80)))

ubuntu-22.04

Let me know if I can help with more data 80)

regards

installing incus with ubuntu22.04

It install at /opt
root@pauloric:~# ls -l /opt/
total 36
drwxr-xr-x 4 root root 4096 mar 18 11:41 brother
drwxr-xr-x 3 root root 4096 mar 18 10:29 google
drwxr-xr-x 9 root root 4096 mar 18 14:24 incus
drwx------ 2 root root 16384 mar 18 10:31 lost+found
drwxr-xr-x 8 root root 4096 jan 20 1970 pycharm-community-2023.2.1
drwxr-xr-x 12 root root 4096 mar 18 10:29 zoom

root@pauloric:~# ls -l /opt/incus/
total 28
drwxr-xr-x 2 root root 4096 mar 18 17:27 agent
drwxr-xr-x 2 root root 4096 mar 18 17:27 bin
drwxr-xr-x 58 root root 4096 mar 18 14:24 doc
drwxr-xr-x 6 root root 4096 mar 18 14:24 lib
drwxr-xr-x 2 root root 4096 mar 18 14:24 locale
drwxr-xr-x 6 root root 4096 mar 18 14:24 share
drwxr-xr-x 3 root root 4096 mar 18 14:24 ui

moving systemd from /opt to /etc/system solve my problems. For now…80)