LXD migration with OS change

Hey there,

I am planning to switch both the OS and the container solution, ideally the same time.
At the moment I am using Ubuntu Jammy with LXD from snapstore and I plan to switch to Debian Bookworm and Incus.

What would be the best way to proceed? Can I use LXC to export my containers and simply import them later to Incus after installing Debian? Or do I have to use the lxd-to-incus migration script while still on Jammy and export them?

Cheers

I’d probably do it in two steps:

  • Move from LXD to Incus on Ubuntu 22.04
  • Save /var/lib/incus and any storage that you’re using
  • Reinstall
  • Restore /var/lib/incus and your storage

You could also go with the export route but in that case, make sure to also note down things like networks, profiles, projects, … as export only gets you the container or volume you’re exporting.

1 Like

Just quick follow-up.

After installing Incus 6.0-lts from zabbly repo I stopped all its services, wiped /var/lib/incus and replaced with the backup. Started the services again. And everything just worked. Awesome.

Once thing I noticed, after switching from Jammy to Bookworm as host OS, is that I have to apply setcap cap_net_raw+p to binaries like /bin/ping in order to work as regular user inside containers. I assume this is some restriction applying to Debian?

Cheers

Does that only affect existing containers or new containers too?

fscaps in namespaces are a bit weird, so if only existing containers, a remapping operation probably somehow missed or miscalculated the new attribute. If on new containers, then we may have some weird issue with VFS idmap and the namespace-aware fscaps format.

1 Like

Thank you for your reply!

Seems like only existing containers are affected.
In a freshly generated one I could ping a random address as regular user.

Cheers