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 (;
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?
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.
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 databaseschema 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.
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.