docs:lxc
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| docs:lxc [2014-02-22 01:25] – update lxc homepage url glen | docs:lxc [2016-08-21 00:36] (current) – [LXC - Linux Container Tools] glen | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== LXC - Linux Container Tools ====== | ====== LXC - Linux Container Tools ====== | ||
| - | LXC is a tool to create and manage containers. It contains a full featured container with the isolation / virtualization of the pids, the ipc, the utsname, the mount points, /proc, /sys, the network and it takes into account the control groups. It is very light, flexible, and provides a set of tools around the container like the monitoring with asynchronous events notification, | + | [[https:// |
| + | |||
| + | LXC is pretty low level, very flexible and covers just about every containment feature supported by the upstream kernel. For a completely fresh and intuitive user experience with a single command line tool to manage your containers see [[LXD]]. | ||
| **Resources** | **Resources** | ||
| - | * [[http:// | ||
| * [[https:// | * [[https:// | ||
| * [[http:// | * [[http:// | ||
| Line 20: | Line 21: | ||
| * 3.8+ kernel [[http:// | * 3.8+ kernel [[http:// | ||
| * [[package> | * [[package> | ||
| - | * cgroups mounted, use [[package> | + | * cgroups mounted, use [[package> |
| + | |||
| + | <note warning> | ||
| + | |||
| + | * [[http:// | ||
| + | * http:// | ||
| + | </ | ||
| ===== Guest creation ===== | ===== Guest creation ===== | ||
| Line 33: | Line 40: | ||
| ' | ' | ||
| - | # lxc-ls --fancy | + | # lxc-ls --fancy |
| NAME | NAME | ||
| ----------------------------------- | ----------------------------------- | ||
| Line 53: | Line 60: | ||
| There are two versions of PLD available for guest systems: | There are two versions of PLD available for guest systems: | ||
| - | * ac - [[:AcInfo|PLD 2.0 (Ac)]] | + | * ac - [[:ac|PLD 2.0 (Ac)]] |
| - | * th - [[:ThInfo|PLD 3.0 (Th)]] | + | * th - [[:th|PLD 3.0 (Th)]] |
| You may choose one using '' | You may choose one using '' | ||
| Line 65: | Line 72: | ||
| ===== Common problems / Useful tricks ===== | ===== Common problems / Useful tricks ===== | ||
| + | |||
| + | ==== lxc-start has no output ==== | ||
| + | |||
| + | In case '' | ||
| ==== lxc-stop is not graceful ==== | ==== lxc-stop is not graceful ==== | ||
| Line 121: | Line 132: | ||
| | vserver test stop | lxc-stop -n test | | | vserver test stop | lxc-stop -n test | | ||
| | vserver-stat | %%lxc-ls --fancy --running%% | you need '' | | vserver-stat | %%lxc-ls --fancy --running%% | you need '' | ||
| - | ===== Sample configs ===== | ||
| - | ==== config for network ==== | ||
| - | static networking, set '' | + | ===== Network configs ===== |
| + | ==== general ==== | ||
| - | - uses '' | + | static networking, set '' |
| - | - that interface is NOT visible on host | + | |
| - | - you can't filter it from host's firewall | + | |
| - | - you HAVE to set mac. If not - on every container start you'll have different one (your router will not pass the traffic). | + | |
| - | - iptables is initialized from lxc.hook.pre-mount hook (ran in the container' | + | |
| + | ==== network using macvlan in bridge mode ==== | ||
| + | - traffic from host to guest (and vice-versa) is NOT passed. external trafic works | ||
| + | - guest interface is NOT visible on host | ||
| + | - you can't filter guest straffic | ||
| + | - host can use seme default interface with and without guests running. | ||
| + | - one have better to set static MAC address. If not - on every container start you'll have different MAC generated and your router may have problems with passing | ||
| + | - iptables is initialized from lxc.hook.pre-mount hook (ran in the container' | ||
| first boot with '' | first boot with '' | ||
| Line 157: | Line 170: | ||
| + | ==== network using bridged veth interfaces | ||
| + | |||
| + | ==== More raeding about network ==== | ||
| + | |||
| + | [[http:// | ||
| + | ===== Sample configs ===== | ||
| ==== full config ==== | ==== full config ==== | ||
docs/lxc.1393028731.txt.gz · Last modified: 2014-02-22 01:25 by glen