Migrate a server to a LXD container : call for ideas


I have a task of migrating an ubuntu server to a LXD container…

I was assuming I would : Build new server (LXD container), Install required software, Clone data…

Then I wondered, if instead, I could somehow create an “image” of the existing server and use that to start a new LXD container?

UPDATE: Just discovered this tool: lxd-p2c

Will test it out now :slight_smile:

lxd-p2c require some space on disk to create full archive of all disk. In case you do not have enough free space you can also use rsync like in my example - Fuidshift: migration from OpenVZ and some files owners (corrected) - it should work for migrationg from bare metal servers too.

1 Like

That’s not true, lxd-p2c doesn’t do any data copying on the source, it just sets up a mount namespace and then rsync everything across to the LXD server using the migration API.

1 Like