[lxc-users] Physical to LXD container

Fajar A. Nugraha list at fajar.net
Fri Aug 26 09:50:52 UTC 2016


On Fri, Aug 26, 2016 at 4:16 PM, Rémy Dernat <remy.d1 at gmail.com> wrote:
> I should specify that I am talking about basic linux machine and, of course,
> I do not need to virtualize the hardware; I just need a container of my
> linux OS.
>
> I thought making a dd/ISO or creating an empty container and scp/rsync the
> content of my host, but I then I think some people here already did it.

What distro are you using for the container-to-be?

If ubuntu trusty/xenial, plain rsync should work for privileged
container. And if using lxd, converting it to unpriv can be as simple
as "lxc stop", "lxc config edit", "lxc start".

If using other distro, I'd start by looking at lxc templates, and
perform the configuration part (e.g.
https://github.com/lxc/lxc/blob/master/templates/lxc-centos.in#L161)
manually after rsync.

-- 
Fajar


More information about the lxc-users mailing list