LXD: Migrate / copy / move container to remote host
Configure LXD
# new server (lxd2.example.com, 10.0.0.22)
lxc config set core.https_address 10.0.0.22:8443
lxc config set core.trust_password pass1234
# old server (lxd1.example.com, 10.0.0.11)
lxc config set core.https_address 10.0.0.11:8443
lxc remote add lxd2.example.com 10.0.0.22
Migrate container
# old server
CONTAINER=www
#lxc config show ${CONTAINER}
lxc stop ${CONTAINER}
lxc config set ${CONTAINER} boot.autostart false
lxc snapshot ${CONTAINER}
# move whole container
# lxc move ${CONTAINER} lxd2.example.com:${CONTAINER} --verbose