Late to the migration party

Since lxd-to-incus doesn’t work anymore, duffus me missed the Boat back then.

Install incus and go through init like it was a new install, both lxd and incus will be running, i changed my CIDR for incus 10.22.0.1/24 to not be the same as my lxd’s 10.0.0.1/24.

mkdir -p /root/migration/ct/work && cd /root/migration/ct

lxc export c1 --export-version=1 --compression=none

tar -xf c1.tar -C work/
# grep -R “lxdbr0” -n work/

sed -i ‘s/network: lxdbr0/network: incusbr0/g’ work/backup/.yaml work/backup/container/.yaml 2>/dev/null || true && sed -i ‘s/“lxdbr0”/“incusbr0”/g’ work/backup/.yaml work/backup/container/.yaml 2>/dev/null || true

tar -cf c1-incus.tar -C work backup
incus import c1-incus.tar c1

optional, for pre defined container IP’s and Error if import fails:

Failed importing backup: Failed creating instance record: Failed initializing instance: Invalid devices: Device validation failed for “eth0”: Device IP address “10.0.0.253” not within network “incusbr0” subnet

replace IP’s accordingly

sed -i ‘s/ipv4.address: 10.0.0.253/ipv4.address: 10.22.0.253/g’ work/backup/index.yaml work/backup/container/backup.yam

rm c1-incus.tar
tar -cf c1-incus.tar -C work backup
incus import c1-incus.tar c1

cleanup

rm *.tar && rm -fr work/backup/

Now some one tell me i missed an already existing incus tool for this (;

1 Like

So did the migration work? Are you running into any new issues?

As far as i can tell everything works, i see no errors in journactl and had no problems so far. Host is a 22.04 thinking to upgrade to 24.04.

Migration of a routed profile container was even easier, create (copy/pasta) the profile to incus and just export / import.

If unsure, create a test container imitating the setup of the one you want to migrate and play with that.

How come it does not work?

The pedantic wording is that you need to be on the appropriate version so that lxd-to-incus can pick it up and migrate for you. Therefore, what was your channel for the snap package? Did you accidentally upgrade to 6/stable?

What? Which snap package?

The current snap lxd LTS is of course > 6 and no accident involved with upgrading, (i don’t understand this part either), i just postponed migration not knowing there was a cut off date.

Perhaps I am wrong but let’s figure it out.

You are migrating from the snap package of LXD towards Incus.

Here are the available channels for the snap package. The lxd-to-incus utility is able to migrate from specific channels, and as far as I know, from the 5.x channels. If you are running a version from the 6.x channel, then the database schema has likely changed among other things, making it difficult to perform the migration. You could try anyway with lxd-to-incus --ignore-version-check and hope for the best.

$ snap info lxd
...
channels:
  5.21/stable:      5.21.4-9eb1368 2025-12-06 (36971) 124MB -
  5.21/candidate:   5.21.4-6acc8e6 2025-12-17 (37155) 124MB -
  5.21/beta:        ↑                                       
  5.21/edge:        git-177d4e0    2026-01-14 (37340) 124MB -
  latest/stable:    6.6-2dcd56e    2026-01-07 (37188) 119MB -
  latest/candidate: 6.6-2dcd56e    2025-12-18 (37188) 119MB -
  latest/beta:      ↑                                       
  latest/edge:      git-66f71af    2026-01-17 (37381) 119MB -
  6/stable:         6.6-2dcd56e    2026-01-05 (37188) 119MB -
  6/candidate:      6.6-2dcd56e    2025-12-18 (37188) 119MB -
  6/beta:           ↑                                       
  6/edge:           git-66f71af    2026-01-17 (37381) 119MB -
  5.0/stable:       5.0.5-68251b5  2025-12-05 (36918)  95MB -
  5.0/candidate:    5.0.5-68251b5  2025-12-01 (36918)  95MB -
  5.0/beta:         ↑                                       
  5.0/edge:         git-c911e7a    2026-01-05 (37220) 118MB -
...
$

Yeah, i read about that one but i didn’t feel like doing it. It might have worked, it might have not, wasn’t sure i get enough info output and omitted testing it, don’t ask me why, it just happened.

Yeah, --ignore-version-check was meant for variations on 5.21 or any subsequent release which has an identical DB schema to 5.21.

Newer LXD releases are known to have updated their database schema so using --ignore-version-check will result in a broken database.

1 Like