Commit b78b2125 by Michel Normand Committed by Daniel Lezcano

man update lxc.conf

reformating given examples and add reference to examples directory. Signed-off-by: 's avatarMichel Normand <normand@fr.ibm.com> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent becc0400
...@@ -454,6 +454,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -454,6 +454,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
<refsect1> <refsect1>
<title>Examples</title> <title>Examples</title>
<para>
In addition to the few examples given below, you will find
some other examples of configuration file in @DOCDIR@/examples
</para>
<refsect2> <refsect2>
<title>Network</title> <title>Network</title>
<para>This configuration sets up a container to use a veth pair <para>This configuration sets up a container to use a veth pair
...@@ -461,51 +465,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -461,51 +465,16 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
configured before on the system by the administrator). The configured before on the system by the administrator). The
virtual network device visible in the container is renamed to virtual network device visible in the container is renamed to
eth0.</para> eth0.</para>
<programlisting>
<variablelist> lxc.utsname = myhostname
lxc.network.type = veth
<varlistentry> lxc.network.flags = up
<term>lxc.utsname = myhostname</term> lxc.network.link = br0
<listitem><para></para></listitem> lxc.network.name = eth0
</varlistentry> lxc.network.hwaddr = 4a:49:43:49:79:bf
lxc.network.ipv4 = 1.2.3.5/24
<varlistentry> lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
<term>lxc.network.type = veth</term> </programlisting>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.flags = up</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.link = br0</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.name = eth0</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.hwaddr = 4a:49:43:49:79:bf</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv4 = 1.2.3.5/24</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597</term>
<listitem><para></para></listitem>
</varlistentry>
</variablelist>
</refsect2> </refsect2>
<refsect2> <refsect2>
...@@ -514,169 +483,53 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ...@@ -514,169 +483,53 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
the application, cpuset.cpus restricts usage of the defined cpu, the application, cpuset.cpus restricts usage of the defined cpu,
cpus.share prioritize the control group, devices.allow makes cpus.share prioritize the control group, devices.allow makes
usable the specified devices.</para> usable the specified devices.</para>
<programlisting>
<variablelist> lxc.cgroup.cpuset.cpus = 0,1
<varlistentry> lxc.cgroup.cpu.shares = 1234
<term>lxc.cgroup.cpuset.cpus = 0,1</term> lxc.cgroup.devices.deny = a
<listitem><para></para></listitem> lxc.cgroup.devices.allow = c 1:3 rw
</varlistentry> lxc.cgroup.devices.allow = b 8:0 rw
</programlisting>
<varlistentry>
<term>lxc.cgroup.cpu.shares = 1234</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.devices.deny = a</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.devices.allow = c 1:3 rw</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.devices.allow = b 8:0 rw</term>
<listitem><para></para></listitem>
</varlistentry>
</variablelist>
</refsect2> </refsect2>
<refsect2> <refsect2>
<title>Complex configuration</title> <title>Complex configuration</title>
<para>This example show a complex configuration making a complex <para>This example show a complex configuration making a complex
network stack, using the control groups, setting a new hostname, network stack, using the control groups, setting a new hostname,
mounting some locations and a changing the root file mounting some locations and a changing root file system.</para>
system.</para> <programlisting>
lxc.utsname = complex
<variablelist> lxc.network.type = veth
<varlistentry> lxc.network.flags = up
<term>lxc.utsname = complex</term> lxc.network.link = br0
<listitem><para></para></listitem> lxc.network.hwaddr = 4a:49:43:49:79:bf
</varlistentry> lxc.network.ipv4 = 1.2.3.5/24
<varlistentry> lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
<term>lxc.network.type = veth</term> lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588
<listitem><para></para></listitem> lxc.network.type = macvlan
</varlistentry> lxc.network.flags = up
<varlistentry> lxc.network.link = eth0
<term>lxc.network.flags = up</term> lxc.network.hwaddr = 4a:49:43:49:79:bd
<listitem><para></para></listitem> lxc.network.ipv4 = 1.2.3.4/24
</varlistentry> lxc.network.ipv4 = 192.168.10.125/24
<varlistentry> lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
<term>lxc.network.link = br0</term> lxc.network.type = phys
<listitem><para></para></listitem> lxc.network.flags = up
</varlistentry> lxc.network.link = dummy0
<varlistentry> lxc.network.hwaddr = 4a:49:43:49:79:ff
<term>lxc.network.hwaddr = 4a:49:43:49:79:bf</term> lxc.network.ipv4 = 1.2.3.6/24
<listitem><para></para></listitem> lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
</varlistentry> lxc.cgroup.cpuset.cpus = 0,1
<varlistentry> lxc.cgroup.cpu.shares = 1234
<term>lxc.network.ipv4 = 1.2.3.5/24</term> lxc.cgroup.devices.deny = a
<listitem><para></para></listitem> lxc.cgroup.devices.allow = c 1:3 rw
</varlistentry> lxc.cgroup.devices.allow = b 8:0 rw
<varlistentry> lxc.mount = /etc/fstab.complex
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597</term> lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
<listitem><para></para></listitem> lxc.rootfs = /mnt/rootfs.complex
</varlistentry> lxc.cap.drop = sys_module mknod setuid net_raw
<varlistentry> lxc.cap.drop = mac_override
<term>lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588</term> </programlisting>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.type = macvlan</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.flags = up</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.link = eth0</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.hwaddr = 4a:49:43:49:79:bd</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv4 = 1.2.3.4/24</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv4 = 192.168.10.125/24</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.type = phys</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.flags = up</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.link = dummy0</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.hwaddr = 4a:49:43:49:79:ff</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv4 = 1.2.3.6/24</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.cpuset.cpus = 0,1</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.cpu.shares = 1234</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.devices.deny = a</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.devices.allow = c 1:3 rw</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cgroup.devices.allow = b 8:0 rw</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.mount = /etc/fstab.complex</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.rootfs = /mnt/rootfs.complex</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cap.drop = sys_module mknod setuid net_raw</term>
<listitem><para></para></listitem>
</varlistentry>
<varlistentry>
<term>lxc.cap.drop = mac_override</term>
<listitem><para></para></listitem>
</varlistentry>
</variablelist>
</refsect2> </refsect2>
</refsect1> </refsect1>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment