461
521
configured before on the system by the administrator). The
462
522
virtual network device visible in the container is renamed to
468
<term>lxc.utsname = myhostname</term>
469
<listitem><para></para></listitem>
473
<term>lxc.network.type = veth</term>
474
<listitem><para></para></listitem>
478
<term>lxc.network.flags = up</term>
479
<listitem><para></para></listitem>
483
<term>lxc.network.link = br0</term>
484
<listitem><para></para></listitem>
488
<term>lxc.network.name = eth0</term>
489
<listitem><para></para></listitem>
493
<term>lxc.network.hwaddr = 4a:49:43:49:79:bf</term>
494
<listitem><para></para></listitem>
498
<term>lxc.network.ipv4 = 1.2.3.5/24</term>
499
<listitem><para></para></listitem>
503
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597</term>
504
<listitem><para></para></listitem>
525
lxc.utsname = myhostname
526
lxc.network.type = veth
527
lxc.network.flags = up
528
lxc.network.link = br0
529
lxc.network.name = eth0
530
lxc.network.hwaddr = 4a:49:43:49:79:bf
531
lxc.network.ipv4 = 1.2.3.5/24
532
lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
514
539
the application, cpuset.cpus restricts usage of the defined cpu,
515
540
cpus.share prioritize the control group, devices.allow makes
516
541
usable the specified devices.</para>
520
<term>lxc.cgroup.cpuset.cpus = 0,1</term>
521
<listitem><para></para></listitem>
525
<term>lxc.cgroup.cpu.shares = 1234</term>
526
<listitem><para></para></listitem>
530
<term>lxc.cgroup.devices.deny = a</term>
531
<listitem><para></para></listitem>
535
<term>lxc.cgroup.devices.allow = c 1:3 rw</term>
536
<listitem><para></para></listitem>
540
<term>lxc.cgroup.devices.allow = b 8:0 rw</term>
541
<listitem><para></para></listitem>
543
lxc.cgroup.cpuset.cpus = 0,1
544
lxc.cgroup.cpu.shares = 1234
545
lxc.cgroup.devices.deny = a
546
lxc.cgroup.devices.allow = c 1:3 rw
547
lxc.cgroup.devices.allow = b 8:0 rw
548
552
<title>Complex configuration</title>
549
553
<para>This example show a complex configuration making a complex
550
554
network stack, using the control groups, setting a new hostname,
551
mounting some locations and a changing the root file
556
<term>lxc.utsname = complex</term>
557
<listitem><para></para></listitem>
560
<term>lxc.network.type = veth</term>
561
<listitem><para></para></listitem>
564
<term>lxc.network.flags = up</term>
565
<listitem><para></para></listitem>
568
<term>lxc.network.link = br0</term>
569
<listitem><para></para></listitem>
572
<term>lxc.network.hwaddr = 4a:49:43:49:79:bf</term>
573
<listitem><para></para></listitem>
576
<term>lxc.network.ipv4 = 1.2.3.5/24</term>
577
<listitem><para></para></listitem>
580
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597</term>
581
<listitem><para></para></listitem>
584
<term>lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588</term>
585
<listitem><para></para></listitem>
588
<term>lxc.network.type = macvlan</term>
589
<listitem><para></para></listitem>
592
<term>lxc.network.flags = up</term>
593
<listitem><para></para></listitem>
596
<term>lxc.network.link = eth0</term>
597
<listitem><para></para></listitem>
600
<term>lxc.network.hwaddr = 4a:49:43:49:79:bd</term>
601
<listitem><para></para></listitem>
604
<term>lxc.network.ipv4 = 1.2.3.4/24</term>
605
<listitem><para></para></listitem>
608
<term>lxc.network.ipv4 = 192.168.10.125/24</term>
609
<listitem><para></para></listitem>
612
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596</term>
613
<listitem><para></para></listitem>
616
<term>lxc.network.type = phys</term>
617
<listitem><para></para></listitem>
620
<term>lxc.network.flags = up</term>
621
<listitem><para></para></listitem>
624
<term>lxc.network.link = dummy0</term>
625
<listitem><para></para></listitem>
628
<term>lxc.network.hwaddr = 4a:49:43:49:79:ff</term>
629
<listitem><para></para></listitem>
632
<term>lxc.network.ipv4 = 1.2.3.6/24</term>
633
<listitem><para></para></listitem>
636
<term>lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297</term>
637
<listitem><para></para></listitem>
640
<term>lxc.cgroup.cpuset.cpus = 0,1</term>
641
<listitem><para></para></listitem>
644
<term>lxc.cgroup.cpu.shares = 1234</term>
645
<listitem><para></para></listitem>
648
<term>lxc.cgroup.devices.deny = a</term>
649
<listitem><para></para></listitem>
652
<term>lxc.cgroup.devices.allow = c 1:3 rw</term>
653
<listitem><para></para></listitem>
656
<term>lxc.cgroup.devices.allow = b 8:0 rw</term>
657
<listitem><para></para></listitem>
660
<term>lxc.mount = /etc/fstab.complex</term>
661
<listitem><para></para></listitem>
664
<term>lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0</term>
665
<listitem><para></para></listitem>
668
<term>lxc.rootfs = /mnt/rootfs.complex</term>
669
<listitem><para></para></listitem>
672
<term>lxc.cap.drop = sys_module mknod setuid net_raw</term>
673
<listitem><para></para></listitem>
676
<term>lxc.cap.drop = mac_override</term>
677
<listitem><para></para></listitem>
555
mounting some locations and a changing root file system.</para>
557
lxc.utsname = complex
558
lxc.network.type = veth
559
lxc.network.flags = up
560
lxc.network.link = br0
561
lxc.network.hwaddr = 4a:49:43:49:79:bf
562
lxc.network.ipv4 = 1.2.3.5/24
563
lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
564
lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588
565
lxc.network.type = macvlan
566
lxc.network.flags = up
567
lxc.network.link = eth0
568
lxc.network.hwaddr = 4a:49:43:49:79:bd
569
lxc.network.ipv4 = 1.2.3.4/24
570
lxc.network.ipv4 = 192.168.10.125/24
571
lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
572
lxc.network.type = phys
573
lxc.network.flags = up
574
lxc.network.link = dummy0
575
lxc.network.hwaddr = 4a:49:43:49:79:ff
576
lxc.network.ipv4 = 1.2.3.6/24
577
lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
578
lxc.cgroup.cpuset.cpus = 0,1
579
lxc.cgroup.cpu.shares = 1234
580
lxc.cgroup.devices.deny = a
581
lxc.cgroup.devices.allow = c 1:3 rw
582
lxc.cgroup.devices.allow = b 8:0 rw
583
lxc.mount = /etc/fstab.complex
584
lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
585
lxc.rootfs = /mnt/rootfs.complex
586
lxc.cap.drop = sys_module mknod setuid net_raw
587
lxc.cap.drop = mac_override