Dino Geek, try to help you

How to migrate an LXC container to another host?


Migration of an LXC (Linux Containers) from one host to another can be performed manually using these steps:

1. Stop the container on the source host:
```
sudo lxc-stop -n mycontainer
```
1. Copy the container’s configuration file and root file system to the new host. Using rsync can make this process easier and handle large amounts of data:
```
sudo rsync -a /var/lib/lxc/mycontainer root@destination:/var/lib/lxc/
```
This will copy both the configuration file and the root filesystem exactly as it is, to the new host, preserving permissions, links, etc.

1. If your container has a static IP address, you might need to update the configuration file (/var/lib/lxc/mycontainer/config) on the destination host. Replace the old IP with a new one to avoid any conflicts in the network.

1. Start the container on the destination host:
```
sudo lxc-start -n mycontainer
```
Note: This process assumes that you have set up LXC on the destination host already. If not you need to do that before you can start migrated container.

Please Note: Your destination and source LXC versions should be same. If not, you might face some incompatibility issues. Always backup the data before performing such operations.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use