lxd-p2c is developed by LXD team to migrate physical servers into LXD containers.
Static binary files are available in Github. To Download, go to
Click on any of the actions with a green tick mark. Under Artifacts, you will see the download link for various operating systems.
Download the Linux.zip file, extract, copy the “lxd-p2c” file to the physical server that you need to convert to LXD container.
You need to stop all services like web server, MySQL server, etc before you run lxd-p2c migration.
Before you can run the migration, you need to create an LXD container with the same OS as the physical server.
Then run the following command on the physical server to migrate files to the LXD container you created.
./lxd-p2c https://lxdserver:8443 NEW_CONTAINTER_NAME /
It is will ask for LXD password, if you don’t have it, use the following command to reset the password on the LXD server.
lxc config set core.trust_password PASSOWORD_HERE