1   LXC

Appunti

Author:Andrea Manni
Copyright:GFDL
Version:0.1

Questi appunti sono ad uso privato.

Generato il 2017-01-03 con: http://docutils.sourceforge.net/rst.html

1.2   Usage

lxc-create -t download -n stretch
        // Creare un LXC

lxc-start -n stable -d
lxc-attach -n stretch
lxc-stop -n stable -d

lxc-destroy -n stable

1.3   Networking

Fin tanto che e’ disponibile lxc-net e’ tutto abbastanza automatico, l’host gestisce un bridge e il client parte con un dhcp-client.

/etc/default/lxc-net

USE_LXC_BRIDGE="true"

/etc/lxc/default.conf

lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx

service lxc-net restart

Path dei containers:
/var/lib/lxc/stretch/rootfs

1.4   OverlayFS

Main guide: https://www.kernel.org/doc/Documentation/filesystems/overlayfs.txt

Esempio con un chroot:

ls
  merged    stretch  upper  work
mount -t overlay -o lowerdir=stretch/,upperdir=upper,workdir=work none merged

Note

workdir has to exist and be empty, colud be a hidden file

::
mount -t overlay -o lowerdir=stretch/,upperdir=nrupper,workdir=.work none newroot

Table Of Contents

Previous topic

1   Ruby

Next topic

Arduino

This Page