[lxc-users] How to create lxc container from installed system
Bostjan Skufca
bostjan at a2o.si
Wed Aug 12 15:32:57 UTC 2015
I did not do what you describe exactly, but went through adaptation of
regular linux to support container-based version.
I short, what you need to take care of, is:
- /dev - copy from one of existing containers, replace. You need very few
devices in container.
- filesystems /proc, dev and sys
- udev must not be started
- lvm must not run it's autoscan features
- hwclock and ntp should be disabled
- fsck of filesystems - depends whether you have explicit filesystems for
containers or not
- /etc/mtab - symlink to /proc/mounts
- mounting filesystems: done by lxc if unprivileged containers
- no swap activation
- console setterm is pointless and does not work
These are basically the points you need to take care of, or at least I did.
Now, I would recommend converting your OS into unprivileged container in
the first place, as it gives you the following advantage:
- if you fail to fix something properly, the worst thing is that container
will not start properly
(doing this on unprivileged container might crash your host)
Hope this helps,
b.
I went through the
On 12 August 2015 at 16:53, Syraxes <syraxes at gmail.com> wrote:
> Hello all,
>
> I am wondering whether it is possible to copy the whole root directory of
> an existing system into the rootfs of a container : can I hope that this
> would work ?
> Did anyone try this instead of lxc-create?
>
>
> The reason for trying this is that I have a customized install dvd image
> (it is oracle linux with some additional proprietary packages) and I need
> to use it as container instead of virtual machine.
>
>
> Thanks for any information,
> Adrian
> _______________________________________________
> lxc-users mailing list
> lxc-users at lists.linuxcontainers.org
> http://lists.linuxcontainers.org/listinfo/lxc-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20150812/44420725/attachment.html>
More information about the lxc-users
mailing list