Migrating to Incus from LXD

In this post I talk about migrating to Incus from LXD. It’s a single-flow post (starts with intro on Incus, some use-cases, preparation of system and running lxd-to-incus). The purpose is to show in a different writing the migration to Incus. As this is an important step, I think it’s good if more such posts appear.

I am doing a couple of small things differently from the official documentation. Trying to see whether they help and if they gain traction.


Thanks! Maybe a corner case, but I was running the Snap of AdGuard Home in a couple of LXCs. Migrating from LXD to Incus seems to have made them unable to talk to the network interface, so I had to (re)install Adguard Home from packages (and temporarily use a different DNS).

Not a bad thing, but in case someone else has the same problem - voila.

1 Like

Yeah, snaps are a bit broken due to a couple of bad logic in AppArmor and snapd.

You can fix it manually by doing:

sed -i "s/lxd/incus/g" /lib/apparmor/rc.apparmor.functions

And then running systemctl edit snapd.apparmor and entering:

ExecStartPre=/usr/bin/mkdir -p /run/WSL

Then reboot your container and snaps should behave.

I’ve sent a fix for the Apparmor issue which has been merged, but it may take a while to hit all distros… For the snapd side of this issue, I don’t know if anyone is working on a fix. snapd requires contributors sign the Canonical CLA which I’m not going to do so can’t fix this one myself.

1 Like

Thanks. Actually it was a good excuse to get rid of the Snaps and run AdGuard natively. I only installed AdGuard by Snap in the first place because LXD had forced me to install it.