Skip to main content

Primary links

  • Home
  • AI
  • Kubernetes
  • Incus
  • Ansible
  • Terraform
  • OpenStack
  • Virtualization
  • Linux
  • SmartHome
  • HowTo

Misc

  • Linux
  • Hardware
  • Programming
  • Databases
  • Multimedia
  • Windows

Cloud

  • OpenStack
  • cloud-config
  • nextcloud

Virtualization

  • Virtualization
  • Incus
  • Docker
  • KVM
  • Kubernetes
  • LXC
  • LXD
  • QEMU
  • VMware
  • VirtualBox
  • multipass
  • podman
  • vagrant
  • XEN

Network

  • DNS
  • Firewall
  • Linux
  • OpenvSwitch
  • SSL
  • VLAN
  • VPN
  • iPXE
  • namespaces
  • nmcli
  • tcpdump

Storage

  • CEPH
  • DRBD
  • LVM
  • S3
  • ZFS
  • btrfs

Automation / CI/CD

  • Install
  • Ansible
  • GitLab
  • LLM
  • Preseed
  • Puppet
  • Terraform
  • Ubuntu autoinstall

Monitoring / Visualisation

  • Grafana
  • Icinga
  • Prometheus
  • Monitoring
  • ELK
  • mermaid

LXD: Migrate / copy / move container to remote host

Configure LXD

# old server (lxd-old.example.com, 10.0.0.11)
lxc config set core.https_address 10.0.0.11:8443
lxc config set core.trust_password ${MY_PASS}

# new server (lxd-new.example.com, 10.0.0.22)
lxc remote add lxd-old.example.com 10.0.0.11:8443
#lxc config set core.https_address 10.0.0.22:8443
#lxc config set core.trust_password pass1234

Migrate profile

PROFILE=nic-dev-mgmt
lxc profile copy ${REMODE_LXD_NODE}:${PROFILE} ${PROFILE}

Migrate container

# @ new LXD node
REMODE_LXD_NODE=lxd-old.example.com
CONTAINER=container1

# list container on remote host
lxc ls ${REMODE_LXD_NODE}:

lxc stop ${REMODE_LXD_NODE}:${CONTAINER}
lxc copy ${REMODE_LXD_NODE}:${CONTAINER}
#lxc start ${REMODE_LXD_NODE}:${CONTAINER}
lxc start ${CONTAINER}

# start new container
lxc start ${CONTAINER}
lxc shell ${CONTAINER}

# OPTIONAL: disable autostart on old container
lxc config set ${OLD_LXD_NODE}:${CONTAINER} boot.autostart false

# @ old LXD node
CONTAINER=www
#lxc config show ${CONTAINER}

lxc config set ${CONTAINER} boot.autostart false
lxc stop ${CONTAINER}

# copy whole container
lxc copy lxd-old.example.com:${CONTAINER} ${CONTAINER} --verbose

# move only snapshot (copy container)
# lxc snapshot ${CONTAINER}
# lxc move ${CONTAINER}/snap0 lxd2.example.com:${CONTAINER} --verbose

# @ new server
CONTAINER=www
#lxc config set ${CONTAINER} volatile.eth0.hwaddr 00:11:22:33:44:70
lxc start ${CONTAINER}

Debug

Migrate / copy / move container to remote host
Profiles GitHub StackOverflow LinkedIn Xing
Contact Imprint
© panticz 2026

Cookie-Einstellungen

Diese Website nutzt eingebettete Inhalte von Drittanbietern (z.B. YouTube, SoundCloud). Beim Laden dieser Inhalte werden Daten an die jeweiligen Anbieter übermittelt. Datenverarbeitungserklärung