Does LXD/LXC support post-copy (lazy migration)?

Hey again,

I searched in lxd/lxc repo for some hints, but couldn’t find any info.

This post from 2017 click says, that the next step is to implement lazy migration support.

Lxd does not support lazy migration, right?

The live migration code path today effectively does:

  • First filesystem sync
  • State dump
  • Second filesystem sync including state
  • Restart

There is also support for incremental migration of memory pages if the environment supports it.

But that’s all for live migration (CRIU) and so not applicable to cases where you are going to stop the container first (which given the limited number of cases where CRIU works, is the majority of cases).

For those, you can use lxc copy src:name dst: followed by lxc stop and lxc copy src:name dst --refresh and a final lxc start.

--refresh is primarily meant for incremental backups of containers to another system, but that can be used for migration just fine as described above.