Lxd migration failure

I just updated my system to ubuntu 24.04 and attempted to move away from lxd to incus. On one system the install had no problem on another system that was running lxd from a snap install starting incus fails.

I’ve tried turning on debug and verbose, but it’s always very basic error message,

Nov 18 12:39:21 t5820 systemd[1]: Starting incus.service - Incus - Daemon...
Nov 18 12:39:22 t5820 incusd[16248]: time="2024-11-18T12:39:22Z" level=error msg="Failed to start the daemon" err="operation not permitted"
Nov 18 12:39:22 t5820 incusd[16248]: Error: operation not permitted

I went into /opt/incus/lib/systemd/incus-startup and added -v -d to the startup command

nothing new comes out, also nothing of any interest in dmesg…

Any suggestions? It only happens ( i think) because it’s a system that has had snap lxd installed on it. I would like to transition all these containers so i don’t want to lose them.

thanks,
M

Welcome!

I am not exactly sure what could be happening.

Having said that, the vast majority of migrations are from the snap package. In addition, the message says that the Incus service is not able to start in order to continue with the migration process. It’s an early error message, hence not enough information.

msg="Failed to start the daemon" err="operation not permitted"

Could you look into the systemd logs?

Are you using the Incus package from the Universe repository or the one from Zabbly? Are you using the incus-migrate from the same set of packages as the incus package?

I’ve never seen that one before so that’s a bit of an odd one.

Assuming this is the Zabbly repository, I’d recommend editing /etc/default/incus to add “–debug” to the startup options there.

The “operation not permitted” makes me think of a nodev or similar flag on the storage, could you show “cat /proc/self/mountinfo”?

Yes i put debug and verbose in on the systemd command and it didn’t give me anything additional… So then i disabled ( might have uninstalled but will have to check ) the snap of lxd and then as root i manually sourced the exports in the systemd file and manually ran incusd…

It started then. But it looks like i lost everything i had before.

root@t5820:~# export INCUS_DOCUMENTATION=/opt/incus/doc/
export INCUS_LXC_HOOK=/opt/incus/share/lxc/hooks/
export INCUS_LXC_TEMPLATE_CONFIG=/opt/incus/share/lxc/config/
export INCUS_AGENT_PATH=/opt/incus/agent/
export INCUS_EDK2_PATH=/opt/incus/share/qemu/
export INCUS_UI=/opt/incus/ui/
export LD_LIBRARY_PATH=/opt/incus/lib/
export PATH=/opt/incus/bin/:${PATH}


root@t5820:~# incusd -v -d
DEBUG  [2024-11-18T13:37:49Z] Connecting to a local Incus over a Unix socket
DEBUG  [2024-11-18T13:37:49Z] Sending request to Incus                      etag= method=GET url="http://unix.socket/1.0"
INFO   [2024-11-18T14:37:49Z] Starting up                                   mode=normal path=/var/lib/incus version=6.7
INFO   [2024-11-18T14:37:49Z] Current process idmap:
INFO   [2024-11-18T14:37:49Z]  - u 0 0 4294967295
INFO   [2024-11-18T14:37:49Z]  - g 0 0 4294967295
INFO   [2024-11-18T14:37:49Z] Selected idmap:
INFO   [2024-11-18T14:37:49Z]  - u 0 1000000 1000000000
INFO   [2024-11-18T14:37:49Z]  - g 0 1000000 1000000000
INFO   [2024-11-18T14:37:49Z] Kernel features:
INFO   [2024-11-18T14:37:49Z]  - closing multiple file descriptors efficiently: yes
INFO   [2024-11-18T14:37:49Z]  - netnsid-based network retrieval: yes
INFO   [2024-11-18T14:37:49Z]  - pidfds: yes
INFO   [2024-11-18T14:37:49Z]  - pidfds for threads: no
INFO   [2024-11-18T14:37:49Z]  - core scheduling: yes
INFO   [2024-11-18T14:37:49Z]  - uevent injection: yes
INFO   [2024-11-18T14:37:49Z]  - seccomp listener: yes
INFO   [2024-11-18T14:37:49Z]  - seccomp listener continue syscalls: yes
INFO   [2024-11-18T14:37:49Z]  - seccomp listener add file descriptors: yes
INFO   [2024-11-18T14:37:49Z]  - attach to namespaces via pidfds: yes
INFO   [2024-11-18T14:37:49Z]  - safe native terminal allocation: yes
INFO   [2024-11-18T14:37:49Z]  - unprivileged binfmt_misc: yes
INFO   [2024-11-18T14:37:49Z]  - unprivileged file capabilities: yes
INFO   [2024-11-18T14:37:49Z]  - cgroup layout: cgroup2
INFO   [2024-11-18T14:37:49Z]  - idmapped mounts kernel support: yes
INFO   [2024-11-18T14:37:49Z] Instance type operational                     driver=lxc type=container