Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: how to migrate lxc containers to lxd #2660

huegelc opened this issue Nov 28, 2016 · 2 comments


2 participants
Copy link

commented Nov 28, 2016


right now I´m using about 20 containers on Ubuntu 14.04 with just lxc
I do want to upgrade my host to xenial and lxd but I dont know how to migrate the containers to lxd?
Sorry if this question was asked before.
Thank you


This comment has been minimized.

Copy link

commented Nov 28, 2016

Hi, we have a script in this repository that will help you with that. It's called lxc-to-lxd and is located under the scripts folder in this repository. It needs to run as root and you can just pass it the names of the LXC containers which you'd like to convert to LXD managed containers. It also provides the option of converting all your LXC container to LXD managed containers. Moving an existing LXC container to a LXD managed container should be as simple as:

chb@conventiont|~/source/go/src/|master $=
> sudo ./lxc-to-lxd yak3
==> Processing container: yak3
Parsing LXC configuration
Checking for existing containers
Validating container name
Validating container mode
Validating container rootfs
Processing network configuration
Processing environment configuration
Processing container boot configuration
Processing container apparmor configuration
Processing container seccomp configuration
Processing container SELinux configuration
Processing container capabilities configuration
Processing container architecture configuration
Creating the container
Container is ready to use

==> Migration summary

Note though that your container must be stopped to move them from LXC to LXD managed containers.

@brauner brauner closed this Nov 28, 2016


This comment has been minimized.

Copy link

commented Nov 28, 2016

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.