[lxc-users] LXC containers recovery from pool

Fajar A. Nugraha list at fajar.net
Thu Apr 20 10:19:49 UTC 2017


On Thu, Apr 20, 2017 at 5:11 PM, Andriy Tovstik <syswiper at gmail.com> wrote:

> Hi, all!
>
> Due to hardware failure i loose my system HDD with ubuntu installation.
> I'm going to reinstall system. Also i have two HDD with ZFS filesystem -
> lxc pool from this system.
> Could anyone explain me, is it possible to import my containers from this
> pool to new system after installation?
>
>
import? kind of.

If you have BOTH /var/lib/lxd (plus /etc/default/lxd-bridge, if you use lxd
2.0.x) AND the container rootfs storage (lxc pool in your case), it should
simply be a case of placing those files/dirs in the new system and starting
lxd.

If you ONLY have lxd pool (without /var/lib/lxd), then you should be able
to create a new container, and replace the rootfs with your old one. But
that means container-specific settings (e.g. cpu/memory limits, mac
address, etc) is reset to the defaults (or in the case of mac, random
value). The exception is if you also store the output 'lxc config show
container_name' for each container; this can then be used to overwrite the
default/random values.

-- 
Fajar
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20170420/0306098b/attachment.html>


More information about the lxc-users mailing list