We are migrating a server to new hardware. In this process we would like to switch from LXD (on old server/hardware) to Incus (on new server/hardware). We manage this by copy/pasting the “rootfs” folder from LXD into a new container on Incus.
How bad an idea is this method? Seemingly everything works for us? Are we just lucky?
Method:
- create a new instance in Incus on new machine:
incus init images:DISTRO/version NEW-INCUS-INSTANCE - copy
rootfsfolder from LXD-backup torootfsin new instance on new machine:
cp -r OLD-LXD-INSTANCE/rootfs new-server/some/incus/storage/location/NEW-INCUS-INSTANCE/
This seems to work flawless on the instances we are testing.
Our only concern is whether or not we will run into problems with config-files inside the containers pointing to LXD instead of incus? As far as we can see, things like /dev/.lxd-mounts and /dev/lxd gets automatically renamed to /dev/.incus-mounts and /dev/incus when starting the instance.