Migrate LXC container to LXD (with ZFS storage)
CONTAINER_NAME=www
lxc-stop -n ${CONTAINER_NAME}
lxc init ubuntu:18.04 ${CONTAINER_NAME} -c security.privileged=true -c boot.autostart=true
#lxc stop ${CONTAINER_NAME}
#lxc config set ${CONTAINER_NAME} boot.autostart true
zfs mount tank/lxd/containers/${CONTAINER_NAME}
mv /var/lib/lxd/containers/${CONTAINER_NAME}/rootfs{,.org}
rsync -av --numeric-ids /var/lib/lxc/${CONTAINER_NAME}/rootfs /var/lib/lxd/containers/${CONTAINER_NAME}/
mv /var/lib/lxd/containers/${CONTAINER_NAME}/rootfs/dev{,.org}