LXD provides tools and functionality to migrate instances in different contexts.

Migrate physical or virtual machines to LXD instances

If you have an existing machine, either physical or virtual (VM or container), you can use the lxd-migrate tool to create a LXD instance based on your existing machine. The tool copies the provided partition, disk or image to the LXD storage pool of the provided LXD server, sets up an instance using that storage and allows you to configure additional settings for the new instance.

See How to import physical or virtual machines to LXD instances for more information.

Migrate instances from LXC to LXD

If you are using LXC and want to migrate all or some of your LXC containers to a LXD installation on the same machine, you can use the lxc-to-lxd tool. The tool analyzes the LXC configuration and copies the data and configuration of your existing LXC containers into new LXD containers.

See How to migrate containers from LXC to LXD for more information.

Migrate existing LXD instances between servers

The most basic kind of migration is if you have a LXD instance on one server and want to move it to a different LXD server. For virtual machines, you can do that as a live migration, which means that you can migrate your VM while it is running and there will be no downtime.

See How to move existing LXD instances between servers for more information.

The following how-to guides cover common operations related to migration: