Best route to upgrade from lxc 5.0.7 to incus and Ubuntu 22.04 to 26.04

As per the title, can anyone recommend the best route to upgrade from lxc 5.0.7 to the latest incus and Ubuntu 22.04 to 26.04

Is it best to move to incus first and the upgrade the OS, or do the OS first, or is there a specific combination?

Ubuntu is pretty vanilla and I’m assuming lxc will have been installed from snap

Are you talking LXC or LXD as the source?
LXC was never distributed as a snap, it’s a Debian package with commands named lxc-XYZ.

LXD is distributed as a snap with its client command confusingly named lxc (no dashes).

If this is LXD, then my recommendation would be to:

  1. Update the system to the HWE kernel (effectively 24.04 kernel for 22.04), this should get you a kernel that’s compatible with Incus 7.0.x
  2. Install Incus 7.0 LTS from the Zabbly package repository (it has packages for 22.04, 24.04 and 26.04)
  3. Go through lxd-to-incus to convert the system from LXD to Incus
  4. Check that everything is working as expected on Incus
  5. Start the OS upgrades from 22.04 to 24.04 and then 26.04. Note that the Zabbly package repository will get disabled as a part of those, so you’ll need to update its configuration (change the Ubuntu release name) and re-enable it both times to get the correct version of the Incus packages for your system

In theory you could upgrade all the way to 26.04 and then switch to Incus, but I’m worried that Ubuntu would also update your LXD to a version that’s not compatible with the Incus migration process (we support up to LXD 5.21).

Anyway, that all assumes you’re in fact on LXD rather than pure LXC. If using regular LXC, then there’s no problem with upgrading to Ubuntu 26.04 and then using lxc-to-incus to move things over.

1 Like