3 lxc: linux Container library
5 (C) Copyright IBM Corp. 2007, 2008
8 Daniel Lezcano <daniel.lezcano at free.fr>
10 This library is free software; you can redistribute it and/or
11 modify it under the terms of the GNU Lesser General Public
12 License as published by the Free Software Foundation; either
13 version 2.1 of the License, or (at your option) any later version.
15 This library is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 Lesser General Public License for more details.
20 You should have received a copy of the GNU Lesser General Public
21 License along with this library; if not, write to the Free Software
22 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
24 Translated into Japanese
25 by KATOH Yasufumi <karma at jazz.email.ne.jp>
29 <!DOCTYPE refentry PUBLIC @docdtd@ [
31 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
36 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
39 <refentrytitle>lxc.container.conf</refentrytitle>
40 <manvolnum>5</manvolnum>
44 <refname>lxc.container.conf</refname>
48 LXC container configuration file
55 <title><!-- Description -->説明</title>
59 The linux containers (<command>lxc</command>) are always created
60 before being used. This creation defines a set of system
61 resources to be virtualized / isolated when a process is using
62 the container. By default, the pids, sysv ipc and mount points
63 are virtualized and isolated. The other system resources are
64 shared across containers, until they are explicitly defined in
65 the configuration file. For example, if there is no network
66 configuration, the network will be shared between the creator of
67 the container and the container itself, but if the network is
68 specified, a new network stack is created for the container and
69 the container can no longer use the network of its ancestor.
71 linux コンテナ (<command>lxc</command>) は、常に使用する前に作成されます。
72 コンテナは、プロセスがコンテナを使う時に仮想化/隔離するシステムリソースのセットを定義することによって作成します。
73 デフォルトでは、pid, sysv ipc, マウントポイントが仮想化され、隔離されます。
74 他のシステムリソースは、設定ファイルで明確に定義されない限りは、コンテナをまたいで共有されます。
75 例えば、もしネットワークが設定されていなければ、コンテナを作成する側とコンテナでネットワークを共有します。
76 しかし、ネットワークが指定されれば、新しいネットワークスタックがコンテナ用に作成され、コンテナは作成元の環境のネットワークを使いません。
81 The configuration file defines the different system resources to
82 be assigned for the container. At present, the utsname, the
83 network, the mount points, the root file system, the user namespace,
84 and the control groups are supported.
86 設定ファイルは、コンテナに割り当てられる様々なシステムリソースを定義します。
87 現時点では、utsname、ネットワーク、マウントポイント、root ファイルシステム、ユーザ名前空間、control groups がサポートされます。
92 Each option in the configuration file has the form <command>key
93 = value</command> fitting in one line. The '#' character means
94 the line is a comment. List options, like capabilities and cgroups
95 options, can be used with no value to clear any previously
96 defined values of that option.
98 設定ファイルのオプション一つを、<command>key = value</command> の形で一行で表します。
99 '#' は、その行はコメントであることを示します。
100 ケーパビリティや cgroup のオプションのような、リスト形式で指定するオプションでは、value がない形式で指定できます。このように使うと、それ以前に定義した値をすべてクリアします。
104 <title><!-- Configuration -->設定</title>
107 In order to ease administration of multiple related containers, it
108 is possible to have a container configuration file cause another
109 file to be loaded. For instance, network configuration
110 can be defined in one common file which is included by multiple
111 containers. Then, if the containers are moved to another host,
112 only one file may need to be updated.
114 複数の関係するコンテナの管理を容易にするために、コンテナの設定ファイルに別のファイルをロードすることが可能です。
115 例えば、ネットワークの設定を、複数のコンテナから include させるように 1 つのファイルに定義することが可能です。
116 その場合、コンテナが他のホストに移動すると、そのファイルだけを更新する必要があるかもしれません。
122 <option>lxc.include</option>
127 Specify the file to be included. The included file must be
128 in the same valid lxc configuration file format.
130 include させたいファイルを指定します。
131 include するファイルは、lxc 設定ファイルのフォーマットとして有効でなければいけません。
139 <title><!-- Architecture -->アーキテクチャ</title>
142 Allows one to set the architecture for the container. For example,
143 set a 32bits architecture for a container running 32bits
144 binaries on a 64bits host. That fixes the container scripts
145 which rely on the architecture to do some work like
146 downloading the packages.
148 コンテナに対してアーキテクチャを設定することが可能です。
149 例えば、64 ビットのホスト上で 32 ビットのバイナリを動かすために 32 ビットアーキテクチャを設定することが可能です。
150 この設定を行うことにより、パッケージのダウンロードを行うなどの作業のうち、アーキテクチャ名に依存するような作業を行うコンテナスクリプトの修正を行います。
156 <option>lxc.arch</option>
161 Specify the architecture for the container.
163 コンテナに設定するアーキテクチャを指定します。
168 <option>x86</option>,
169 <option>i686</option>,
170 <option>x86_64</option>,
171 <option>amd64</option>
174 <option>x86</option>,
175 <option>i686</option>,
176 <option>x86_64</option>,
177 <option>amd64</option>
186 <title><!-- Hostname -->ホスト名</title>
189 The utsname section defines the hostname to be set for the
190 container. That means the container can set its own hostname
191 without changing the one from the system. That makes the
192 hostname private for the container.
194 utsname セクションは、コンテナに設定されるホスト名を定義します。
195 コンテナは、システムのホスト名を変えることなく、自身のホスト名を持つ事が可能です。
196 このことにより、ホスト名はコンテナ専用となります。
201 <option>lxc.utsname</option>
206 specify the hostname for the container
216 <title><!-- Halt signal -->クリーンなシャットダウン時のシグナル</title>
219 Allows one to specify signal name or number, sent by lxc-stop to the
220 container's init process to cleanly shutdown the container. Different
221 init systems could use different signals to perform clean shutdown
222 sequence. This option allows the signal to be specified in kill(1)
223 fashion, e.g. SIGPWR, SIGRTMIN+14, SIGRTMAX-10 or plain number. The
224 default signal is SIGPWR.
226 lxc-stop がコンテナをクリーンにシャットダウンするためにコンテナの init プロセスに送るシグナル名か番号を指定できます。
227 init システムによって、クリーンなシャットダウンを行うために使うシグナルは異なります。
228 このオプションではシグナルとして kill(1) で使う形式を指定することができます。
229 例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGPWR です。
234 <option>lxc.haltsignal</option>
239 specify the signal used to halt the container
241 コンテナをシャットダウンするために使うシグナルを指定します。
249 <title>リブート時のシグナル <!-- Reboot signal --></title>
252 Allows one to specify signal name or number, sent by lxc-stop to
253 reboot the container. This option allows signal to be specified in
254 kill(1) fashion, e.g. SIGTERM, SIGRTMIN+14, SIGRTMAX-10 or plain number.
255 The default signal is SIGINT.
257 lxc-stop がコンテナをリブートするために送るシグナル名か番号を指定できます。
258 このオプションではシグナルとして kill(1) で使う形式を指定することができます。
259 例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGINT です。
264 <option>lxc.rebootsignal</option>
269 specify the signal used to reboot the container
271 コンテナをリブートするために使うシグナルを指定します。
279 <title><!-- Stop signal -->強制停止時のシグナル</title>
282 Allows one to specify signal name or number, sent by lxc-stop to forcibly
283 shutdown the container. This option allows signal to be specified in
284 kill(1) fashion, e.g. SIGKILL, SIGRTMIN+14, SIGRTMAX-10 or plain number.
285 The default signal is SIGKILL.
287 lxc-stop がコンテナを強制的にシャットダウンするために送るシグナル名か番号を指定することができます。
288 このオプションではシグナルとして kill(1) で使う形式を指定することができます。
289 例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGKILL です。
294 <option>lxc.stopsignal</option>
299 specify the signal used to stop the container
301 コンテナを停止するのに使用するシグナルを指定します。
309 <title><!-- Init command -->Init コマンド</title>
312 Sets the command to use as the init system for the containers.
314 This option is ignored when using lxc-execute.
316 Defaults to: /sbin/init
318 コンテナの init として使うコマンドを設定します。
319 このオプションは lxc-execute では無視されます。
320 デフォルトは /sbin/init です。
325 <option>lxc.init_cmd</option>
330 Absolute path from container rootfs to the binary to use as init.
332 init として使うバイナリの、コンテナの rootfs からの絶対パスを指定します。
340 <title><!-- Init ID -->Init が使う ID</title>
343 Sets the UID/GID to use for the init system, and subsequent command, executed by lxc-execute.
345 lxc-execute が実行するコンテナの init と、その後に起動するコマンドが使用する UID/GID を設定します。
348 These options are only used when lxc-execute is started in a private user namespace.
350 このオプションは lxc-execute がユーザ名前空間内で起動するときのみ使われます。
353 Defaults to: UID(0), GID(0)
355 デフォルト値は UID(0), GID(0) です。
360 <option>lxc.init_uid</option>
365 UID to use within a private user namesapce for init.
367 ユーザ名前空間内で init が使う UID です。
373 <option>lxc.init_gid</option>
378 GID to use within a private user namesapce for init.
380 ユーザ名前空間内で init が使う GID です。
388 <title><!-- Ephemeral -->一時的なコンテナ</title>
391 Allows one to specify whether a container will be destroyed on shutdown.
393 シャットダウン後にコンテナを削除するかどうかを指定できます。
398 <option>lxc.ephemeral</option>
403 The only allowed values are 0 and 1. Set this to 1 to destroy a
404 container on shutdown.
406 指定できる値は 0 または 1 のみです。この値を 1 に設定すると、シャットダウン後にコンテナを削除します。
414 <title><!-- Network -->ネットワーク</title>
417 The network section defines how the network is virtualized in
418 the container. The network virtualization acts at layer
419 two. In order to use the network virtualization, parameters
420 must be specified to define the network interfaces of the
421 container. Several virtual interfaces can be assigned and used
422 in a container even if the system has only one physical
425 ネットワークセクションは、コンテナ内でどのようにネットワークを仮想化するかを定義します。
426 ネットワークの仮想化はレイヤー 2 で作動します。
427 ネットワークの仮想化を使用するためには、コンテナのネットワークインターフェースを定義しなければなりません。
428 いくつかの仮想インターフェースをアサインすることができます。
429 そして、仮に物理ネットワークインターフェースが一つしかなくても、コンテナ内でいくつもの仮想インターフェースを使うことができます。
434 <option>lxc.network</option>
439 may be used without a value to clear all previous network options.
441 値を指定せずに使い、それ以前に定義されたすべてのネットワークオプションをクリアできます。
447 <option>lxc.network.type</option>
452 specify what kind of network virtualization to be used
453 for the container. Each time
454 a <option>lxc.network.type</option> field is found a new
455 round of network configuration begins. In this way,
456 several network virtualization types can be specified
457 for the same container, as well as assigning several
458 network interfaces for one container. The different
459 virtualization types can sbe:
461 コンテナがどの種類のネットワーク仮想化を使うかを指定します。
462 一つのネットワークの設定ごとに <option>lxc.network.type</option> フィールドを指定します。
463 このように、一つのコンテナに複数のネットワークインターフェースを割り当てることができるだけでなく、同じコンテナに対して複数のネットワーク仮想化の種類を指定することが出来ます。
464 仮想化の種類は以下の値を取る事が出来ます:
469 <option>none:</option> will cause the container to share
470 the host's network namespace. This means the host
471 network devices are usable in the container. It also
472 means that if both the container and host have upstart as
473 init, 'halt' in a container (for instance) will shut down the
476 <option>none:</option> ホストのネットワーク名前空間を共有します。
477 これにより、ホストのネットワークデバイスをコンテナ内で使うことが可能になります。
478 もしコンテナもホストも init として upstart を使っている場合、(例えば) コンテナ内で 'halt' を実行すると、ホストがシャットダウンしてしまうことにもなります。
483 <option>empty:</option> will create only the loopback
486 <option>empty:</option> ループバックインターフェースだけを作成します。
491 <option>veth:</option> a virtual ethernet pair
492 device is created with one side assigned to the container
493 and the other side attached to a bridge specified by
494 the <option>lxc.network.link</option> option.
495 If the bridge is not specified, then the veth pair device
496 will be created but not attached to any bridge.
497 Otherwise, the bridge has to be created on the system
498 before starting the container.
499 <command>lxc</command> won't handle any
500 configuration outside of the container.
501 By default, <command>lxc</command> chooses a name for the
502 network device belonging to the outside of the
503 container, but if you wish to handle
504 this name yourselves, you can tell <command>lxc</command>
505 to set a specific name with
506 the <option>lxc.network.veth.pair</option> option (except for
507 unprivileged containers where this option is ignored for security
510 <option>veth:</option > 一方がコンテナに、もう一方が <option>lxc.network.link</option> オプションで指定されたブリッジに接続されるペアの仮想イーサネットデバイスを作成します。
511 もし、ブリッジが指定されていない場合、veth ペアデバイスは作成されますが、ブリッジには接続されません。
512 ブリッジはコンテナが開始する前にシステムで事前に設定しておく必要があります。
513 <command>lxc</command> はコンテナ外の設定を扱うことはありません。
514 デフォルトでは、<command>lxc</command> がコンテナの外部に属するネットワークデバイスに対する名前を決定します。
515 しかし、もしこの名前を自分で指定したい場合、<option>lxc.network.veth.pair</option> オプションを使って名前を設定し、lxc に対して指定をすることができます (非特権コンテナの場合をのぞきます。セキュリティ上の理由からこのオプションは無視されます)。
520 <option>vlan:</option> a vlan interface is linked with
521 the interface specified by
522 the <option>lxc.network.link</option> and assigned to
523 the container. The vlan identifier is specified with the
524 option <option>lxc.network.vlan.id</option>.
526 <option>vlan:</option> vlan インターフェースは <option>lxc.network.link</option> で指定されたインターフェースとリンクし、コンテナに割り当てられます。
527 vlan の指定は <option>lxc.network.vlan.id</option> オプションで指定します。
532 <option>macvlan:</option> a macvlan interface is linked
533 with the interface specified by
534 the <option>lxc.network.link</option> and assigned to
536 <option>lxc.network.macvlan.mode</option> specifies the
537 mode the macvlan will use to communicate between
538 different macvlan on the same upper device. The accepted
539 modes are <option>private</option>, <option>vepa</option>,
540 <option>bridge</option> and <option>passthru</option>.
541 In <option>private</option> mode, the device never
542 communicates with any other device on the same upper_dev (default).
543 In <option>vepa</option> mode, the new Virtual Ethernet Port
544 Aggregator (VEPA) mode, it assumes that the adjacent
545 bridge returns all frames where both source and
546 destination are local to the macvlan port, i.e. the
547 bridge is set up as a reflective relay. Broadcast
548 frames coming in from the upper_dev get flooded to all
549 macvlan interfaces in VEPA mode, local frames are not
550 delivered locally. In <option>bridge</option> mode, it
551 provides the behavior of a simple bridge between
552 different macvlan interfaces on the same port. Frames
553 from one interface to another one get delivered directly
554 and are not sent out externally. Broadcast frames get
555 flooded to all other bridge ports and to the external
556 interface, but when they come back from a reflective
557 relay, we don't deliver them again. Since we know all
558 the MAC addresses, the macvlan bridge mode does not
559 require learning or STP like the bridge module does. In
560 <option>passthru</option> mode, all frames received by
561 the physical interface are forwarded to the macvlan
562 interface. Only one macvlan interface in <option>passthru</option>
563 mode is possible for one physical interface.
565 <option>macvlan:</option> macvlan インターフェースは <option>lxc.network.link</option> により指定されるインターフェースとリンクし、コンテナに割り当てられます。
566 <option>lxc.network.macvlan.mode</option> でモードを指定すると、その macvlan の指定を、同じ上位デバイスで異なる macvlan の間の通信をする時に使います。
567 指定できるモードは <option>private</option>、<option>vepa</option>、<option>bridge</option>、<option>passthru</option> のいずれかです。
568 <option>private</option> モードの場合、デバイスは同じ上位デバイスの他のデバイスとの通信を行いません (デフォルト)。
569 新しい仮想イーサネットポート集約モード (Virtual Ethernet Port Aggregator (VEPA)) である <option>vepa</option> モードの場合、隣接したポートが、ソースとデスティネーションの両方が macvlan ポートに対してローカルであるフレームを全て返すと仮定します。
570 すなわち、ブリッジが reflective relay として設定されているということです。
571 上位デバイスから入ってくるブロードキャストフレームは、VEPA モードである全ての macvlan インターフェースに送りつけられます。
572 ローカルのフレームはローカルには配送されません。
573 <option>bridge</option> モードの場合、同じポートの異なる macvlan インターフェースの間のシンプルなブリッジとして動作します。
574 あるインターフェースから他のインターフェースへのフレームは、直接配送され、外部には送出されません。
575 ブロードキャストフレームは、全ての他のブリッジと外部のインターフェースに対して送られます。
576 しかし、reflective relay からフレームが返ってきたときは、再度それを配送することはしません。
577 全ての MAC アドレスを知っているので、ブリッジモジュールのように、macvlan ブリッジモードは学習や STP の必要はありません。
578 <option>passthru</option> モードの場合、物理インターフェースで受け取った全てのフレームは macvlan インターフェースに転送されます。<option>passthru</option> モードの場合、ひとつの macvlan インターフェースだけが、ひとつの物理インターフェースに対して設定できます。
583 <option>phys:</option> an already existing interface
584 specified by the <option>lxc.network.link</option> is
585 assigned to the container.
587 <option>phys:</option> <option>lxc.network.link</option> で指定された、すでに存在しているインターフェースがコンテナに割り当てられます。
594 <option>lxc.network.flags</option>
599 specify an action to do for the
602 ネットワークに対して行うアクションを指定します。
607 <option>up:</option> activates the interface.
609 <option>up:</option> インターフェースを起動させます。
616 <option>lxc.network.link</option>
621 specify the interface to be used for real network
624 実際のネットワークトラフィックに使うインターフェースを指定します。
631 <option>lxc.network.mtu</option>
636 specify the maximum transfer unit for this interface.
638 インターフェースに対する MTU を指定します。
645 <option>lxc.network.name</option>
650 the interface name is dynamically allocated, but if
651 another name is needed because the configuration files
652 being used by the container use a generic name,
653 eg. eth0, this option will rename the interface in the
656 インターフェース名は動的に割り当てられます。
657 しかし、もしコンテナが使用する設定ファイルが一般的な名前を使用するために、他の特定の名前が必要であれば (例えば eth0 など)、コンテナ内のインターフェースは、このオプションで指定した名前にリネームされます。
664 <option>lxc.network.hwaddr</option>
669 the interface mac address is dynamically allocated by
670 default to the virtual interface, but in some cases,
671 this is needed to resolve a mac address conflict or to
672 always have the same link-local ipv6 address.
673 Any "x" in address will be replaced by random value,
674 this allows setting hwaddr templates.
676 仮想インターフェースの MAC アドレスは、デフォルトでは動的に割り当てられます。
677 しかし、MAC アドレスの衝突や、リンクローカルIPv6 アドレスを常に同じにした場合などは、このオプションが必要です。
678 アドレス中の "x" という文字は、ランダムな値に置き換えられます。
679 これによりテンプレートに hwaddr を設定することが可能になります。
686 <option>lxc.network.ipv4</option>
691 specify the ipv4 address to assign to the virtualized
692 interface. Several lines specify several ipv4 addresses.
693 The address is in format x.y.z.t/m,
694 eg. 192.168.1.123/24.The broadcast address should be
695 specified on the same line, right after the ipv4
698 仮想インターフェースに割り当てる ipv4 アドレスを指定します。
699 複数行により複数の ipv4 アドレスを指定します。
700 このアドレスは x.y.z.t/m というフォーマットで指定します。
701 例えば、192.168.1.123/24。ブロードキャストアドレスも同じ行の ipv4 アドレスのすぐ後で指定しなくてはなりません。
708 <option>lxc.network.ipv4.gateway</option>
713 specify the ipv4 address to use as the gateway inside the
714 container. The address is in format x.y.z.t, eg.
717 Can also have the special value <option>auto</option>,
718 which means to take the primary address from the bridge
719 interface (as specified by the
720 <option>lxc.network.link</option> option) and use that as
721 the gateway. <option>auto</option> is only available when
722 using the <option>veth</option> and
723 <option>macvlan</option> network types.
725 コンテナでゲートウェイとして使う IPv4 アドレスを指定します。
726 アドレスは x.y.z.t というフォーマットです。
729 <option>auto</option> という特別な値を記述する事も可能です。
730 これは (<option>lxc.network.link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し、それをゲートウェイに使うという意味になります。
731 <option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります。
739 <option>lxc.network.ipv6</option>
744 specify the ipv6 address to assign to the virtualized
745 interface. Several lines specify several ipv6 addresses.
746 The address is in format x::y/m,
747 eg. 2003:db8:1:0:214:1234:fe0b:3596/64
749 仮想インターフェースに割り当てる ipv6 アドレスを指定します。
750 複数行により複数の ipv6 アドレスを指定します。
751 このアドレスは x::y/m というフォーマットで指定します。
752 例えば、2003:db8:1:0:214:1234:fe0b:3596/64。
759 <option>lxc.network.ipv6.gateway</option>
764 specify the ipv6 address to use as the gateway inside the
765 container. The address is in format x::y,
768 Can also have the special value <option>auto</option>,
769 which means to take the primary address from the bridge
770 interface (as specified by the
771 <option>lxc.network.link</option> option) and use that as
772 the gateway. <option>auto</option> is only available when
773 using the <option>veth</option> and
774 <option>macvlan</option> network types.
776 コンテナでゲートウェイとして使う IPv6 アドレスを指定します。
777 アドレスは x::y というフォーマットです。例えば、2003:db8:1:0::1。
779 <option>auto</option> という特別な値を記述する事も可能です。
780 これは (<option>lxc.network.link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し、それをゲートウェイに使うという意味になります。
781 <option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります。
788 <option>lxc.network.script.up</option>
793 add a configuration option to specify a script to be
794 executed after creating and configuring the network used
795 from the host side. The following arguments are passed
796 to the script: container name and config section name
797 (net) Additional arguments depend on the config section
798 employing a script hook; the following are used by the
799 network system: execution context (up), network type
800 (empty/veth/macvlan/phys), Depending on the network
801 type, other arguments may be passed:
802 veth/macvlan/phys. And finally (host-sided) device name.
804 ホスト側から使われる、ネットワークの作成と設定が済んだ後に実行するスクリプトを指定します。
805 以下の引数がスクリプトに渡されます: コンテナ名、設定セクション名(net)。
806 その後の引数はスクリプトのフックで使われる設定セクションに依存します。
807 以下がネットワークシステムによって使われます: 実行コンテキスト (up)、ネットワークのタイプ (empty/veth/macvlan/phys)
808 ネットワークのタイプによっては、更に別の引数が渡されるかもしれません: veth/macvlan/phys の場合 (ホスト側の) デバイス名
812 Standard output from the script is logged at debug level.
813 Standard error is not logged, but can be captured by the
814 hook redirecting its standard error to standard output.
816 スクリプトからの標準出力は debug レベルでロギングされます。
818 しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
825 <option>lxc.network.script.down</option>
830 add a configuration option to specify a script to be
831 executed before destroying the network used from the
832 host side. The following arguments are passed to the
833 script: container name and config section name (net)
834 Additional arguments depend on the config section
835 employing a script hook; the following are used by the
836 network system: execution context (down), network type
837 (empty/veth/macvlan/phys), Depending on the network
838 type, other arguments may be passed:
839 veth/macvlan/phys. And finally (host-sided) device name.
841 ホスト側から使われる、ネットワークを破壊する前に実行するスクリプトを指定します。
842 以下の引数がスクリプトに渡されます: コンテナ名、設定セクション名(net)。
843 その後の引数はスクリプトのフックで使われる設定セクションに依存します。
844 以下がネットワークシステムによって使われます: 実行コンテキスト (up)、ネットワークのタイプ (empty/veth/macvlan/phys)。
845 ネットワークのタイプによっては、更に別の引数が渡されるかもしれません: veth/macvlan/phys。そして最後に (ホスト側の) デバイス名が渡されます。
849 Standard output from the script is logged at debug level.
850 Standard error is not logged, but can be captured by the
851 hook redirecting its standard error to standard output.
853 スクリプトからの標準出力は debug レベルでロギングされます。
855 しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
864 <title><!-- New pseudo tty instance (devpts) -->新しい擬似端末のインスタンス (devpts)</title>
867 For stricter isolation the container can have its own private
868 instance of the pseudo tty.
870 さらに厳しい隔離のために、コンテナは自身のプライベートな pseudo tty (擬似端末) を持つことが可能です。
875 <option>lxc.pts</option>
880 If set, the container will have a new pseudo tty
881 instance, making this private to it. The value specifies
882 the maximum number of pseudo ttys allowed for a pts
883 instance (this limitation is not implemented yet).
885 もし設定された場合、コンテナは新しい pseudo tty インスタンスを持ち、それを自身のプライベートとします。
886 この値は pts インスタンスに許可される pseudo tty の最大数を指定します (この制限はまだ実装されていません)。
894 <title><!-- Container system console -->コンテナのシステムコンソール</title>
897 If the container is configured with a root filesystem and the
898 inittab file is setup to use the console, you may want to specify
899 where the output of this console goes.
901 コンテナでルートファイルシステムを持つように設定されており、inittab ファイルでコンソールの使用が設定されている場合、このコンソールの出力がどこになされるのかを指定したいと思うでしょう。
906 <option>lxc.console.logfile</option>
911 Specify a path to a file where the console output will
914 コンソール出力を書き込むファイルのパスを指定します。
920 <option>lxc.console</option>
925 Specify a path to a device to which the console will be
926 attached. The keyword 'none' will simply disable the
927 console. Note, when specifying 'none' and creating a device node
928 for the console in the container at /dev/console or bind-mounting
929 the hosts's /dev/console into the container at /dev/console the
930 container will have direct access to the hosts's /dev/console.
931 This is dangerous when the container has write access to the
932 device and should thus be used with caution.
934 コンソールを割り当てるデバイスのパスを指定します。'none' というキーワードは、単純にコンソールを無効にします。
935 'none' を指定し、コンテナ内のコンソールに対するデバイスノードを /dev/console に作成するか、もしくはホストの /dev/console をコンテナ内の /dev/console に bind mount する場合、そのコンテナはホストの /dev/console へ直接アクセスを行うことに注意が必要です。
936 そのコンテナがデバイスへの書き込み権を持っている場合は危険ですので、注意してこの指定を使用する必要があります。
944 <title><!-- Console through the ttys -->tty を通したコンソール</title>
947 This option is useful if the container is configured with a root
948 filesystem and the inittab file is setup to launch a getty on the
949 ttys. The option specifies the number of ttys to be available for
950 the container. The number of gettys in the inittab file of the
951 container should not be greater than the number of ttys specified
952 in this option, otherwise the excess getty sessions will die and
953 respawn indefinitely giving annoying messages on the console or in
954 <filename>/var/log/messages</filename>.
956 このオプションはコンテナが root ファイルシステムを持つように設定されており、inittab ファイルで tty 上に getty の起動が設定されている場合に役に立ちます。
957 このオプションはコンテナで利用できる tty の数を指定します。
958 inittab ファイルに設定する getty の数は、このオプションの指定する tty の数より大きくしてはいけません。
959 さもなければ、超過した分の getty セッションはコンソールか /var/log/messages にうっとうしいメッセージを生死を表示しながら、永久に生死を繰り返すでしょう。
964 <option>lxc.tty</option>
969 Specify the number of tty to make available to the
972 コンテナに作成出来る tty の数を指定します。
980 <title><!-- Console devices location -->コンソールデバイスの位置</title>
983 LXC consoles are provided through Unix98 PTYs created on the
984 host and bind-mounted over the expected devices in the container.
985 By default, they are bind-mounted over <filename>/dev/console</filename>
986 and <filename>/dev/ttyN</filename>. This can prevent package upgrades
987 in the guest. Therefore you can specify a directory location (under
988 <filename>/dev</filename> under which LXC will create the files and
989 bind-mount over them. These will then be symbolically linked to
990 <filename>/dev/console</filename> and <filename>/dev/ttyN</filename>.
991 A package upgrade can then succeed as it is able to remove and replace
994 LXC のコンソールはホストによって作られ、コンテナ内で要求されたデバイスに bind マウントされた Unix98 PTY 経由で提供されます。
995 デフォルトでは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> に bind マウントされます。
996 これはゲスト内でのパッケージのアップグレードを妨げる可能性があります。
997 なので <filename>/dev</filename> 以下のディレクトリを指定することができます。
998 LXC はこのディレクトリ以下にファイルを作成し、これらのファイルを bind マウントします。
999 そして、これらの (作成された) ファイルは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> にシンボリックリンクされます。
1000 シンボリックリンクを消去したり置き換えたりすることは可能ですから、パッケージのアップグレードは成功します。
1005 <option>lxc.devttydir</option>
1010 Specify a directory under <filename>/dev</filename>
1011 under which to create the container console devices. Note that LXC
1012 will move any bind-mounts or device nodes for /dev/console into
1015 コンテナのコンソールデバイスを作成するための <filename>/dev</filename> 以下のディレクトリを指定します。
1016 LXC は /dev/console に対する bind mount や /dev/console デバイスノードをこのディレクトリ以下に移動することに注意が必要です。
1024 <title><!-- /dev directory -->/dev ディレクトリ</title>
1027 By default, lxc creates a few symbolic links (fd,stdin,stdout,stderr)
1028 in the container's <filename>/dev</filename> directory but does not
1029 automatically create device node entries. This allows the container's
1030 <filename>/dev</filename> to be set up as needed in the container
1031 rootfs. If lxc.autodev is set to 1, then after mounting the container's
1032 rootfs LXC will mount a fresh tmpfs under <filename>/dev</filename>
1033 (limited to 500k) and fill in a minimal set of initial devices.
1034 This is generally required when starting a container containing
1035 a "systemd" based "init" but may be optional at other times. Additional
1036 devices in the containers /dev directory may be created through the
1037 use of the <option>lxc.hook.autodev</option> hook.
1039 デフォルトでは、lxc はコンテナの <filename>/dev</filename> 以下に fd, stdin, stdout, stderr のシンボリックリンクを作成しますが、自動的にはデバイスノードのエントリは作成しません。
1040 これは、コンテナの rootfs で必要な設定を行えるようにするものです。
1041 lxc.autodev が 1 に設定されている場合、コンテナの rootfs をマウントした後、LXC は新しい tmpfs を <filename>/dev</filename> 以下にマウントします (500k 制限の)。
1042 そして初期デバイスの最小限のセットを作成します。
1043 これは、"systemd" ベースの "init" 環境のコンテナを起動する時に通常必要ですが、他の環境の場合はオプショナルなものです。
1044 コンテナの /dev ディレクトリ内の追加デバイスは <option>lxc.hook.autodev</option> フックを使用して作成されます。
1049 <option>lxc.autodev</option>
1054 Set this to 0 to stop LXC from mounting and populating a minimal
1055 <filename>/dev</filename> when starting the container.
1057 コンテナの起動時に LXC が /dev をマウントして最小限の /dev を作成するのを止めるには、この値を 0 に設定してください。
1065 <title><!-- Enable kmsg symlink -->kmsg のシンボリックリンクの有効化</title>
1068 Enable creating /dev/kmsg as symlink to /dev/console. This defaults to 0.
1070 /dev/console へのシンボリックリンクとして /dev/kmsg を作成することを有効にします。デフォルトは 0 です。
1075 <option>lxc.kmsg</option>
1080 Set this to 1 to enable /dev/kmsg symlinking.
1082 /dev/kmsg へのシンボリックリンクを有効にするには 1 を設定してください。
1090 <title><!-- Mount points -->マウントポイント</title>
1093 The mount points section specifies the different places to be
1094 mounted. These mount points will be private to the container
1095 and won't be visible by the processes running outside of the
1096 container. This is useful to mount /etc, /var or /home for
1099 マウントポイントセクションは、マウントするための区別された場所を指定します。
1100 これらのマウントポイントは、コンテナだけに見え、コンテナ外で実行されるプロセスから見えることはありません。
1101 例えば、/etc や /var や /home をマウントするときに役に立つでしょう。
1105 NOTE - LXC will generally ensure that mount targets and relative
1106 bind-mount sources are properly confined under the container
1107 root, to avoid attacks involving over-mounting host directories
1108 and files. (Symbolic links in absolute mount sources are ignored)
1109 However, if the container configuration first mounts a directory which
1110 is under the control of the container user, such as /home/joe, into
1111 the container at some <filename>path</filename>, and then mounts
1112 under <filename>path</filename>, then a TOCTTOU attack would be
1113 possible where the container user modifies a symbolic link under
1114 his home directory at just the right time.
1116 注意: 通常 LXC は、マウント対象と相対パス指定のバインドマウントを、適切にコンテナルート以下に閉じ込めます。
1117 これは、ホストのディレクトリやファイルに対して重ね合わせを行うようなマウントによる攻撃を防ぎます。(絶対パス指定のマウントソース中の各パスがシンボリックリンクである場合は無視されます。)
1118 しかし、もしコンテナの設定が最初に、/home/joe のようなコンテナユーザのコントロール配下にあるディレクトリを、コンテナ中のある <filename>path</filename> にマウントし、その後 <filename>path</filename> 以下でマウントが行われるような場合、コンテナユーザがタイミングを見計らって自身のホームディレクトリ以下でシンボリックリンクを操作するような TOCTTOU 攻撃が成立する可能性があります。
1123 <option>lxc.mount</option>
1128 specify a file location in
1129 the <filename>fstab</filename> format, containing the
1130 mount information. The mount target location can and in
1131 most cases should be a relative path, which will become
1132 relative to the mounted container root. For instance,
1134 マウント情報の書かれた <filename>fstab</filename> フォーマットで書かれたファイルの場所を指定します。
1135 マウントする場所は相対バスで書くことができます。そして、ほとんどの場合にコンテナの root からの相対パスとなるはずです。例えば、以下のように書きます。
1138 proc proc proc nodev,noexec,nosuid 0 0
1142 Will mount a proc filesystem under the container's /proc,
1143 regardless of where the root filesystem comes from. This
1144 is resilient to block device backed filesystems as well as
1147 この例は、root ファイルシステムがどこにあっても、コンテナの /proc 以下に proc ファイルシステムをマウントします。
1148 これは、ブロックデバイスがバックエンドのファイルシステムだけでなく、コンテナのクローンにも柔軟に対応できます。
1152 Note that when mounting a filesystem from an
1153 image file or block device the third field (fs_vfstype)
1154 cannot be auto as with
1156 <refentrytitle>mount</refentrytitle>
1157 <manvolnum>8</manvolnum>
1159 but must be explicitly specified.
1161 ファイルシステムがイメージファイルやブロックデバイスからマウントされている場合、3 つ目のフィールド (fs_vfstype) は
1163 <refentrytitle>mount</refentrytitle>
1164 <manvolnum>8</manvolnum>
1166 のように auto を指定することはできず、明確に指定しなければいけません。
1173 <option>lxc.mount.entry</option>
1178 specify a mount point corresponding to a line in the
1181 fstab フォーマットの一行と同じフォーマットのマウントポイントの指定をします。
1184 Moreover lxc add two options to mount.
1185 <option>optional</option> don't fail if mount does not work.
1186 <option>create=dir</option> or <option>create=file</option>
1187 to create dir (or file) when the point will be mounted.
1189 fstab フォーマットに加えて、LXC ではマウントに対して独自の 2 つのオプションが使えます。
1190 <option>optional</option> は、マウントが失敗しても失敗を返さずに無視します。
1191 <option>create=dir</option> と <option>create=file</option> は、マウントポイントをマウントする際にディレクトリもしくはファイルを作成します。
1198 <option>lxc.mount.auto</option>
1203 specify which standard kernel file systems should be
1204 automatically mounted. This may dramatically simplify
1205 the configuration. The file systems are:
1207 標準のカーネルファイルシステムで自動的にマウントするものを指定します。
1208 これは劇的に設定を容易にする可能性があります。
1214 <option>proc:mixed</option> (or <option>proc</option>):
1215 mount <filename>/proc</filename> as read-write, but
1216 remount <filename>/proc/sys</filename> and
1217 <filename>/proc/sysrq-trigger</filename> read-only
1218 for security / container isolation purposes.
1222 <option>proc:mixed</option> (or <option>proc</option>):
1223 <filename>/proc</filename> を読み書き可能でマウントします。
1224 ただし、<filename>/proc/sys</filename> と <filename>/proc/sysrq-trigger</filename> は、セキュリティとコンテナの隔離の目的でリードオンリーで再マウントされます。
1230 <option>proc:rw</option>: mount
1231 <filename>/proc</filename> as read-write
1235 <option>proc:rw</option>:
1236 <filename>/proc</filename> を読み書き可能でマウントします。
1242 <option>sys:mixed</option> (or <option>sys</option>):
1243 mount <filename>/sys</filename> as read-only but with
1244 /sys/devices/virtual/net writable.
1248 <option>sys:mixed</option> (or <option>sys</option>):
1249 /sys/devices/virtual/net のみ書き込み可能で、その他の <filename>/sys</filename> はリードオンリーでマウントします。
1255 <option>sys:ro</option>
1256 mount <filename>/sys</filename> as read-only
1257 for security / container isolation purposes.
1261 <option>sys:ro</option>:
1262 <filename>/sys</filename> を、セキュリティとコンテナの隔離の目的でリードオンリーでマウントします。
1268 <option>sys:rw</option>: mount
1269 <filename>/sys</filename> as read-write
1273 <option>sys:rw</option>:
1274 <filename>/sys</filename> を読み書き可能でマウントします。
1280 <option>cgroup:mixed</option>:
1281 mount a tmpfs to <filename>/sys/fs/cgroup</filename>,
1282 create directories for all hierarchies to which
1283 the container is added, create subdirectories
1284 there with the name of the cgroup, and bind-mount
1285 the container's own cgroup into that directory.
1286 The container will be able to write to its own
1287 cgroup directory, but not the parents, since they
1288 will be remounted read-only
1292 <option>cgroup:mixed</option>:
1293 <filename>/sys/fs/cgroup</filename> を tmpfs でマウントし、そのコンテナの追加が行われた全ての階層構造に対するディレクトリを作製し、その cgroup の名前でその中にサブディレクトリを作製し、そのコンテナ自身の cgroup をそのディレクトリにバインドマウントします。
1294 コンテナは自身の cgroup ディレクトリに書き込みが可能ですが、親ディレクトリはリードオンリーで再マウントされているため書き込めません。
1300 <option>cgroup:ro</option>: similar to
1301 <option>cgroup:mixed</option>, but everything will
1302 be mounted read-only.
1306 <option>cgroup:ro</option>:
1307 <option>cgroup:mixed</option> と同様にマウントされますが、全てリードオンリーでマウントされます。
1313 <option>cgroup:rw</option>: similar to
1314 <option>cgroup:mixed</option>, but everything will
1315 be mounted read-write. Note that the paths leading
1316 up to the container's own cgroup will be writable,
1317 but will not be a cgroup filesystem but just part
1318 of the tmpfs of <filename>/sys/fs/cgroup</filename>
1322 <option>cgroup:rw</option>:
1323 <option>cgroup:mixed</option> と同様にマウントされますが、全て読み書き可能でマウントされます。
1324 コンテナ自身の cgroup に至るまでのパスも書き込み可能になることに注意が必要ですが、cgroup ファイルシステムにはならず、
1325 <filename>/sys/fs/cgroup</filename> の tmpfs の一部分になるでしょう。
1331 <option>cgroup</option> (without specifier):
1332 defaults to <option>cgroup:rw</option> if the
1333 container retains the CAP_SYS_ADMIN capability,
1334 <option>cgroup:mixed</option> otherwise.
1336 <option>cgroup</option> (マウントオプションなしの場合):
1337 コンテナが CAP_SYS_ADMIN ケーパビリティを保持している場合、<option>cgroup:rw</option> となります。保持していない場合、<option>cgroup:mixed</option> となります。
1343 <option>cgroup-full:mixed</option>:
1344 mount a tmpfs to <filename>/sys/fs/cgroup</filename>,
1345 create directories for all hierarchies to which
1346 the container is added, bind-mount the hierarchies
1347 from the host to the container and make everything
1348 read-only except the container's own cgroup. Note
1349 that compared to <option>cgroup</option>, where
1350 all paths leading up to the container's own cgroup
1351 are just simple directories in the underlying
1353 <filename>/sys/fs/cgroup/$hierarchy</filename>
1354 will contain the host's full cgroup hierarchy,
1355 albeit read-only outside the container's own cgroup.
1356 This may leak quite a bit of information into the
1361 <option>cgroup-full:mixed</option>:
1362 <filename>/sys/fs/cgroup</filename> を tmpfs でマウントし、そのコンテナの追加が行われた全ての階層構造に対するディレクトリを作製し、ホストからコンテナまでの階層構造を全てバインドマウントし、コンテナ自身の cgroup を除いてリードオンリーにします。
1363 <option>cgroup</option> と比べると、コンテナ自身の cgroup に至るまでの全てのパスが tmpfs の下層のシンプルなディレクトリとなり、コンテナ自身の cgroup の外ではリードオンリーになりますが、<filename>/sys/fs/cgroup/$hierarchy</filename> はホストの全ての cgroup 階層構造を含みます。
1364 これにより、コンテナにはかなりの情報が漏洩します。
1370 <option>cgroup-full:ro</option>: similar to
1371 <option>cgroup-full:mixed</option>, but everything
1372 will be mounted read-only.
1376 <option>cgroup-full:ro</option>:
1377 <option>cgroup-full:mixed</option> と同様にマウントされますが、全てリードオンリーでマウントされます。
1383 <option>cgroup-full:rw</option>: similar to
1384 <option>cgroup-full:mixed</option>, but everything
1385 will be mounted read-write. Note that in this case,
1386 the container may escape its own cgroup. (Note also
1387 that if the container has CAP_SYS_ADMIN support
1388 and can mount the cgroup filesystem itself, it may
1393 <option>cgroup-full:rw</option>:
1394 <option>cgroup-full:mixed</option>と同様にマウントされますが、全て読み書き可能でマウントされます。
1395 この場合、コンテナは自身の cgroup から脱出する可能性があることに注意してください (コンテナが CAP_SYS_ADMIN を持ち、自身で cgroup ファイルシステムをマウント可能なら、いずれにせよそのようにするかもしれないことにも注意してください)。
1401 <option>cgroup-full</option> (without specifier):
1402 defaults to <option>cgroup-full:rw</option> if the
1403 container retains the CAP_SYS_ADMIN capability,
1404 <option>cgroup-full:mixed</option> otherwise.
1406 <option>cgroup-full</option> (マウントオプションなしの場合):
1407 コンテナが CAP_SYS_ADMIN ケーパビリティを保持している場合、<option>cgroup-full:rw</option> となります。保持していない場合、<option>cgroup-full:mixed</option> となります。
1413 If cgroup namespaces are enabled, then any <option>cgroup</option>
1414 auto-mounting request will be ignored, since the container can
1415 mount the filesystems itself, and automounting can confuse the
1418 cgroup 名前空間が有効の場合、<option>cgroup</option> の自動マウントの指定はどれも無視されます。これは、コンテナが自身でファイルシステムをマウントするため、自動マウントがコンテナの init を混乱させる可能性があるためです。
1422 Note that if automatic mounting of the cgroup filesystem
1423 is enabled, the tmpfs under
1424 <filename>/sys/fs/cgroup</filename> will always be
1425 mounted read-write (but for the <option>:mixed</option>
1426 and <option>:ro</option> cases, the individual
1428 <filename>/sys/fs/cgroup/$hierarchy</filename>, will be
1429 read-only). This is in order to work around a quirk in
1432 <refentrytitle>mountall</refentrytitle>
1433 <manvolnum>8</manvolnum>
1435 command that will cause containers to wait for user
1437 <filename>/sys/fs/cgroup</filename> is mounted read-only
1438 and the container can't remount it read-write due to a
1439 lack of CAP_SYS_ADMIN.
1441 cgroup ファイルシステムの自動マウントが有効の場合、<filename>/sys/fs/cgroup</filename> 以下の tmpfs は常に読み書き可能でマウントされることに注意が必要です (しかし <option>:mixed</option> と <option>:ro</option> の場合は、個々の階層の <filename>/sys/fs/cgroup/$hierarchy</filename> は読み込み専用となるでしょう)。これは Ubuntu の
1443 <refentrytitle>mountall</refentrytitle>
1444 <manvolnum>8</manvolnum>
1446 コマンドの特異な動きに対処するためのものです。特異な動きとは、<filename>/sys/fs/cgroup</filename> が読み込み専用でマウントされた状態で、コンテナが CAP_SYS_ADMIN を持たない場合、/sys/fs/cgroup を読み書き可能で再マウントしようとしてできないため、コンテナのブート時にユーザからの入力を待ってしまうというものです。
1455 lxc.mount.auto = proc sys cgroup
1456 lxc.mount.auto = proc:rw sys:rw cgroup-full:rw
1465 <title><!-- Root file system -->ルートファイルシステム</title>
1468 The root file system of the container can be different than that
1471 コンテナのルートファイルシステムは、ホストのルートファイルシステムと異なるようにすることも可能です。
1476 <option>lxc.rootfs</option>
1481 specify the root file system for the container. It can
1482 be an image file, a directory or a block device. If not
1483 specified, the container shares its root file system
1486 コンテナのルートファイルシステムを指定します。
1487 この値はイメージファイル、ディレクトリ、ブロックデバイスのどれかを取ることができます。
1488 もし指定されない場合、コンテナはホストとルートファイルシステムを共有します。
1492 For directory or simple block-device backed containers,
1493 a pathname can be used. If the rootfs is backed by a nbd
1494 device, then <filename>nbd:file:1</filename> specifies that
1495 <filename>file</filename> should be attached to a nbd device,
1496 and partition 1 should be mounted as the rootfs.
1497 <filename>nbd:file</filename> specifies that the nbd device
1498 itself should be mounted. <filename>overlayfs:/lower:/upper</filename>
1499 specifies that the rootfs should be an overlay with <filename>/upper</filename>
1500 being mounted read-write over a read-only mount of <filename>/lower</filename>.
1501 <filename>aufs:/lower:/upper</filename> does the same using aufs in place
1502 of overlayfs. For both <filename>overlayfs</filename> and
1503 <filename>aufs</filename> multiple <filename>/lower</filename>
1504 directories can be specified. <filename>loop:/file</filename> tells lxc to attach
1505 <filename>/file</filename> to a loop device and mount the loop device.
1507 ディレクトリ、単純なブロックデバイスのバックエンドを持つコンテナの場合、パス名を使うことができます。
1508 もし rootfs が nbd デバイスの場合、<filename>nbd:file:1</filename> という指定は <filename>file</filename> を nbd デバイスとして使用し、その 1 番目のパーティションが rootfs としてマウントされます。
1509 <filename>nbd:file</filename> という指定は、nbd デバイス自身をマウントします。
1510 <filename>overlayfs:/lower:/upper</filename> という指定は、rootfs は <filename>/lower</filename> という読み込み専用でマウントされるディレクトリの上に、<filename>/upper</filename> というディレクトリを読み書き可能で重ね合わせてマウントします。
1511 <filename>aufs:/lower:/upper</filename> は overlayfs で指定している部分を aufs と指定すれば同じことになります。<filename>overlayfs</filename> と <filename>aufs</filename> は両方とも、複数の <filename>/lower</filename> ディレクトリを指定できます。
1512 <filename>loop:/file</filename> は <filename>/file</filename> を loop デバイスとして使用し、loop デバイスをマウントします。
1519 <option>lxc.rootfs.mount</option>
1524 where to recursively bind <option>lxc.rootfs</option>
1525 before pivoting. This is to ensure success of the
1527 <refentrytitle><command>pivot_root</command></refentrytitle>
1528 <manvolnum>8</manvolnum>
1530 syscall. Any directory suffices, the default should
1533 root ファイルシステムの変更の前に、<option>lxc.rootfs</option> を再帰的にどこにバインドするのかを指定します。これは
1535 <refentrytitle><command>pivot_root</command></refentrytitle>
1536 <manvolnum>8</manvolnum>
1538 システムコールが確実に成功する事を保証します。
1539 どんなディレクトリでも良く、デフォルトでも通常は動くはずです。
1546 <option>lxc.rootfs.options</option>
1551 extra mount options to use when mounting the rootfs.
1553 rootfs をマウントするときに追加したいマウントオプション。
1560 <option>lxc.rootfs.backend</option>
1565 specify the rootfs backend type to use, for instance 'dir' or
1566 'zfs'. While this can be guessed by lxc at container startup,
1567 doing so takes time. Specifying it here avoids extra
1570 使用するバックエンドのタイプを、例えば 'dir' や 'zfs' のように指定します。
1571 コンテナ起動時に LXC が推測できますが、時間がかかります。これを指定すると、余分な処理を避けられます。
1580 <title>Control group</title>
1583 The control group section contains the configuration for the
1584 different subsystem. <command>lxc</command> does not check the
1585 correctness of the subsystem name. This has the disadvantage
1586 of not detecting configuration errors until the container is
1587 started, but has the advantage of permitting any future
1590 CONTROL GROUP セクションは、(lxc とは) 別のサブシステムの設定を含みます。
1591 <command>lxc</command> は、このサブシステム名の正しさはチェックしません。
1592 実行時のエラーを検出するのに不便ですが、別の将来のサブシステムをサポート出来るという有利な点もあります。
1597 <option>lxc.cgroup.[subsystem name]</option>
1602 specify the control group value to be set. The
1603 subsystem name is the literal name of the control group
1604 subsystem. The permitted names and the syntax of their
1605 values is not dictated by LXC, instead it depends on the
1606 features of the Linux kernel running at the time the
1607 container is started,
1608 eg. <option>lxc.cgroup.cpuset.cpus</option>
1610 設定する control group の値を指定します。
1611 サブシステム名は、control group のそのままの名前です。
1612 許される名前や値の書式は LXC が指示することはなく、コンテナが実行された時に実行されている Linux カーネルの機能に依存します。
1613 例えば <option>lxc.cgroup.cpuset.cpus</option>
1621 <title><!-- Capabilities -->ケーパビリティ</title>
1624 The capabilities can be dropped in the container if this one
1627 コンテナが root 権限で実行されていても、コンテナ内ではケーパビリティ (capabilities) を削除する事は可能です。
1632 <option>lxc.cap.drop</option>
1637 Specify the capability to be dropped in the container. A
1638 single line defining several capabilities with a space
1639 separation is allowed. The format is the lower case of
1640 the capability definition without the "CAP_" prefix,
1641 eg. CAP_SYS_MODULE should be specified as
1644 <refentrytitle><command>capabilities</command></refentrytitle>
1645 <manvolnum>7</manvolnum>
1647 If used with no value, lxc will clear any drop capabilities
1648 specified up to this point.
1650 コンテナ内で削除するケーパビリティ (capability) を指定します。
1651 一行でスペース区切りで複数のケーパビリティを指定することも可能です。
1652 指定は、"CAP_" というプレフィックスなしで、小文字でケーパビリティを指定します。
1653 例えば、CAP_SYS_MODULE というケーパビリティは sys_module と指定する必要があります。
1656 <refentrytitle><command>capabilities</command></refentrytitle>
1657 <manvolnum>7</manvolnum>
1659 この設定を、値を指定しない状態で使った場合、それ以前に指定された削除対象のケーパビリティの指定をすべてクリアします (lxc.cap.drop に何も指定しない状態になります)。
1665 <option>lxc.cap.keep</option>
1670 Specify the capability to be kept in the container. All other
1671 capabilities will be dropped. When a special value of "none" is
1672 encountered, lxc will clear any keep capabilities specified up
1673 to this point. A value of "none" alone can be used to drop all
1676 コンテナ内で維持するケーパビリティを指定します。指定した以外の全てのケーパビリティはドロップされます。
1677 特別な値 "none" が指定されている時点で、lxc はこの時点で保持することになっている全てのケーパビリティをクリアします。"none" を単独で使用するとすべてのケーパビリティを削除できます。
1685 <title>リソース制限 <!-- Resource limits --></title>
1688 The soft and hard resource limits for the container can be changed.
1689 Unprivileged containers can only lower them. Resources which are not
1690 explicitly specified will be inherited.
1692 コンテナに対するソフトもしくはハードリミットを変更できます。非特権コンテナでは、制限を下げることしかできません。明示的に指定されていないリソースは継承されます。
1697 <option>lxc.limit.[limit name]</option>
1702 Specify the resource limit to be set. A limit is specified as two
1703 colon separated values which are either numeric or the word
1704 'unlimited'. A single value can be used as a shortcut to set both
1705 soft and hard limit to the same value. The permitted names the
1706 "RLIMIT_" resource names in lowercase without the "RLIMIT_"
1707 prefix, eg. RLIMIT_NOFILE should be specified as "nofile". See
1709 <refentrytitle><command>setrlimit</command></refentrytitle>
1710 <manvolnum>2</manvolnum>
1712 If used with no value, lxc will clear the resource limit
1713 specified up to this point. A resource with no explicitly
1714 configured limitation will be inherited from the process starting
1717 設定したいリソースと制限値を指定します。制限値はコロンで区切られた 2 つの値で指定します。値は数値もしくは 'unlimited' で指定します。ソフトもハードも同じ値を指定する場合は単一の値を指定できます。指定できる名前は、"RLIMIT_" 接頭辞がなく小文字で書かれた、"RLIMIT_" リソース名です。例えば、RLIMIT_NOFILE は "nofile" と指定します。詳しくは
1719 <refentrytitle><command>setrlimit</command></refentrytitle>
1720 <manvolnum>2</manvolnum>
1721 </citerefentry> を参照してください。
1722 値を指定せずに使用した場合、lxc はこの指定以前に設定されたリソース制限をクリアします。明示的に制限が設定されていないリソースについては、コンテナを起動したプロセスから継承します。
1730 <title><!-- Apparmor profile -->Apparmor プロファイル</title>
1733 If lxc was compiled and installed with apparmor support, and the host
1734 system has apparmor enabled, then the apparmor profile under which the
1735 container should be run can be specified in the container
1736 configuration. The default is <command>lxc-container-default-cgns</command>
1737 if the host kernel is cgroup namespace aware, or
1738 <command>lxc-container-default</command> othewise.
1740 lxc が apparmor サポートでコンパイルされ、インストールされている場合で、ホストで apparmor が有効な場合、コンテナが従って動くべき apparmor プロファイルは、コンテナの設定で指定することが可能です。
1741 デフォルトは、ホストのカーネルで cgroup 名前空間が使える場合は <command>lxc-container-default-cgns</command>です。使えない場合は <command>lxc-container-default</command> です。
1746 <option>lxc.aa_profile</option>
1751 Specify the apparmor profile under which the container should
1752 be run. To specify that the container should be unconfined,
1755 コンテナが従うべき apparmor プロファイルを指定します。
1756 コンテナが apparmor による制限を受けないように設定するには、以下のように設定します。
1758 <programlisting>lxc.aa_profile = unconfined</programlisting>
1761 If the apparmor profile should remain unchanged (i.e. if you
1762 are nesting containers and are already confined), then use
1764 もし apparmor プロファイルが変更されないままでなくてはならない場合 (ネストしたコンテナである場合や、すでに confined されている場合) は以下のように設定します。
1766 <programlisting>lxc.aa_profile = unchanged</programlisting>
1771 <option>lxc.aa_allow_incomplete</option>
1776 Apparmor profiles are pathname based. Therefore many file
1777 restrictions require mount restrictions to be effective against
1778 a determined attacker. However, these mount restrictions are not
1779 yet implemented in the upstream kernel. Without the mount
1780 restrictions, the apparmor profiles still protect against accidental
1783 apparmor プロファイルはパス名ベースですので、多数のファイルの制限を行う際、執念深い攻撃者に対して効果的であるためにはマウントの制限が必要です。
1784 しかし、これらのマウントの制限は upstream のカーネルではまだ実装されていません。マウントの制限なしでも、apparmor プロファイルによって予想外のダメージに対する保護が可能です。
1788 If this flag is 0 (default), then the container will not be
1789 started if the kernel lacks the apparmor mount features, so that a
1790 regression after a kernel upgrade will be detected. To start the
1791 container under partial apparmor protection, set this flag to 1.
1793 このフラグが 0 の場合 (デフォルト)、カーネルが apparmor のマウント機能をサポートしていない場合にコンテナが起動しません。これはカーネルを更新した後に機能が退行したことが検出できるようにするためです。
1794 不完全な apparmor の保護の下でコンテナを起動するためには、このフラグを 1 に設定してください。
1802 <title><!-- SELinux context -->SELinux コンテキスト</title>
1805 If lxc was compiled and installed with SELinux support, and the host
1806 system has SELinux enabled, then the SELinux context under which the
1807 container should be run can be specified in the container
1808 configuration. The default is <command>unconfined_t</command>,
1809 which means that lxc will not attempt to change contexts.
1810 See @DATADIR@/lxc/selinux/lxc.te for an example policy and more
1813 lxc が SELinux サポートでコンパイルされ、インストールされている場合で、ホストで SELinux が有効な場合、コンテナが従って動くべき SELinux コンテキストは、コンテナの設定で指定することが可能です。
1814 デフォルトは <command>unconfined_t</command> であり、これは lxc がコンテキストを変えないという意味になります。
1815 ポリシーの例と追加の情報は @DATADIR@/lxc/selinux/lxc.te ファイルを参照してください。
1820 <option>lxc.se_context</option>
1825 Specify the SELinux context under which the container should
1826 be run or <command>unconfined_t</command>. For example
1828 コンテナが従うべき SELinux コンテキストを指定するか、<command>unconfined_t</command> を指定します。例えば以下のように設定します。
1830 <programlisting>lxc.se_context = system_u:system_r:lxc_t:s0:c22</programlisting>
1837 <title><!-- Seccomp configuration -->Seccomp の設定</title>
1840 A container can be started with a reduced set of available
1841 system calls by loading a seccomp profile at startup. The
1842 seccomp configuration file must begin with a version number
1843 on the first line, a policy type on the second line, followed
1844 by the configuration.
1846 コンテナは、起動時に seccomp プロファイルをロードすることで、利用可能なシステムコールを減らして起動することが可能です。
1847 seccomp の設定ファイルは、1 行目がバージョン番号、2 行目がポリシーのタイプで始まる必要があり、その後に設定を書きます。
1851 Versions 1 and 2 are currently supported. In version 1, the
1852 policy is a simple whitelist. The second line therefore must
1853 read "whitelist", with the rest of the file containing one (numeric)
1854 sycall number per line. Each syscall number is whitelisted,
1855 while every unlisted number is blacklisted for use in the container
1857 現時点では、バージョン番号は 1 と 2 をサポートしています。バージョン 1 では、ポリシーはシンプルなホワイトリストですので、2 行目は "whitelist" でなければなりません。
1858 そして残りの行には 1 行に 1 つずつ、システムコール番号を書きます。各行のシステムコール番号がホワイトリスト化され、リストにない番号は、そのコンテナではブラックリストに入ります。
1863 In version 2, the policy may be blacklist or whitelist,
1864 supports per-rule and per-policy default actions, and supports
1865 per-architecture system call resolution from textual names.
1867 バージョン 2 では、ポリシーはブラックリストもしくはホワイトリストで表され、ルールごとのアクションと、ポリシーごとのデフォルトのアクションを設定できます。そして、アーキテクチャごとの設定と、テキストで書かれたシステムコール名での設定が可能です。
1871 An example blacklist policy, in which all system calls are
1872 allowed except for mknod, which will simply do nothing and
1873 return 0 (success), looks like:
1875 以下にブラックリストのポリシーの例を示します。これは mknod 以外の全てのシステムコールが許可され、mknod が呼ばれると、何もせずに単に 0(成功) を返します。
1885 <option>lxc.seccomp</option>
1890 Specify a file containing the seccomp configuration to
1891 load before the container starts.
1893 コンテナがスタートする前にロードする seccomp の設定を含むファイルを指定します。
1901 <title>PR_SET_NO_NEW_PRIVS</title>
1904 With PR_SET_NO_NEW_PRIVS active execve() promises not to grant
1905 privileges to do anything that could not have been done without
1906 the execve() call (for example, rendering the set-user-ID and
1907 set-group-ID mode bits, and file capabilities non-functional).
1908 Once set, this bit cannot be unset. The setting of this bit is
1909 inherited by children created by fork() and clone(), and preserved
1911 Note that PR_SET_NO_NEW_PRIVS is applied after the container has
1912 changed into its intended AppArmor profile or SElinux context.
1914 PR_SET_NO_NEW_PRIVS を付与すると、対象の execve() は、execve() の呼び出しなしでは実行できなかったことに対する特権を許可しなくなります (例えば、set-user-ID、set-group-ID 許可ビットや、ファイルケーパビリティが動作しなくなります)。
1915 一度設定されると、このビットは解除できません。このビットの設定は fork() や clone() で生成される子プロセスにも継承され、execve() の前後で保持されます。
1916 PR_SET_NO_NEW_PRIVS は、コンテナに適用しようとする AppArmor プロファイルもしくは SELinux コンテキストへの変更がなされたあとに適用されます。
1921 <option>lxc.no_new_privs</option>
1926 Specify whether the PR_SET_NO_NEW_PRIVS flag should be set for the
1927 container. Set to 1 to activate.
1929 コンテナに対して PR_SET_NO_NEW_PRIVS ビットを設定するかどうかを指定します。1 に設定すると有効になります。
1937 <title><!-- UID mappings -->UID のマッピング</title>
1940 A container can be started in a private user namespace with
1941 user and group id mappings. For instance, you can map userid
1942 0 in the container to userid 200000 on the host. The root
1943 user in the container will be privileged in the container,
1944 but unprivileged on the host. Normally a system container
1945 will want a range of ids, so you would map, for instance,
1946 user and group ids 0 through 20,000 in the container to the
1947 ids 200,000 through 220,000.
1949 コンテナは、ユーザとグループの id のマッピングを持った専用のユーザ名前空間で起動することが可能です。
1950 たとえば、コンテナ内のユーザ id 0 を、ホストのユーザ id 200000 にマッピングすることが可能です。
1951 コンテナの root ユーザはコンテナ内では特権を持ちますが、ホストでは特権を持ちません。
1952 通常は、システムコンテナは id の範囲を要求し、それをマッピングします。
1953 例えば、コンテナ内のユーザとグループの id 0 から 20,000 を 200,000 から 220,000 にマッピングします。
1958 <option>lxc.id_map</option>
1963 Four values must be provided. First a character, either
1964 'u', or 'g', to specify whether user or group ids are
1965 being mapped. Next is the first userid as seen in the
1966 user namespace of the container. Next is the userid as
1967 seen on the host. Finally, a range indicating the number
1968 of consecutive ids to map.
1971 最初の文字は 'u' か 'g' のどちらかで、ユーザかグループの ID のどちらをマッピングするかを指定します。
1972 次はコンテナのユーザ名前空間内に現れる最初のユーザ ID です。
1973 その次は、そのユーザ ID のホスト上での値です。
1974 最後は、ID のマッピングをいくつ連続して行うかの数を指定します。
1982 <title><!-- Container hooks -->コンテナのフック</title>
1985 Container hooks are programs or scripts which can be executed
1986 at various times in a container's lifetime.
1988 コンテナのフックは、コンテナの存続期間の色々な場面で実行することのできるプログラムやスクリプトです。
1992 When a container hook is executed, information is passed both
1993 as command line arguments and through environment variables.
1996 <listitem><para> Container name. </para></listitem>
1997 <listitem><para> Section (always 'lxc'). </para></listitem>
1998 <listitem><para> The hook type (i.e. 'clone' or 'pre-mount'). </para></listitem>
1999 <listitem><para> Additional arguments. In the
2000 case of the clone hook, any extra arguments passed to
2001 lxc-clone will appear as further arguments to the hook.
2002 In the case of the stop hook, paths to filedescriptors
2003 for each of the container's namespaces along with their types
2004 are passed. </para></listitem>
2006 The following environment variables are set:
2008 <listitem><para> LXC_NAME: is the container's name. </para></listitem>
2009 <listitem><para> LXC_ROOTFS_MOUNT: the path to the mounted root filesystem. </para></listitem>
2010 <listitem><para> LXC_CONFIG_FILE: the path to the container configuration file. </para></listitem>
2011 <listitem><para> LXC_SRC_NAME: in the case of the clone hook, this is the original container's name. </para></listitem>
2012 <listitem><para> LXC_ROOTFS_PATH: this is the lxc.rootfs entry for the container. Note this is likely not where the mounted rootfs is to be found, use LXC_ROOTFS_MOUNT for that. </para></listitem>
2015 コンテナのフックが実行されるとき、情報がコマンドライン引数と環境変数の両方を通して渡されます。引数は:
2017 <listitem><para>コンテナ名</para></listitem>
2018 <listitem><para>セクション (常に 'lxc')</para></listitem>
2019 <listitem><para>フックのタイプ ('clone' や 'pre-mount' など)</para></listitem>
2020 <listitem><para>追加の引数。clone フックの場合、lxc-clone に渡される追加の引数は、フックへの引数として追加されます。stop フックの場合は、コンテナの名前空間のそれぞれに対するファイルディスクリプタへのパスが、名前空間名とともに渡されます。</para></listitem>
2024 <listitem><para> LXC_NAME: コンテナ名</para></listitem>
2025 <listitem><para> LXC_ROOTFS_MOUNT: マウントされた root ファイルシステムへのパス</para></listitem>
2026 <listitem><para> LXC_CONFIG_FILE: コンテナの設定ファイルのパス </para></listitem>
2027 <listitem><para> LXC_SRC_NAME: clone フックの場合、元のコンテナの名前</para></listitem>
2028 <listitem><para> LXC_ROOTFS_PATH: コンテナの lxc.rootfs エントリ。これはマウントされた rootfs が存在する場所にはならないでしょう。それには LXC_ROOTFS_MOUNT を使用してください。</para></listitem>
2033 Standard output from the hooks is logged at debug level.
2034 Standard error is not logged, but can be captured by the
2035 hook redirecting its standard error to standard output.
2037 スクリプトからの標準出力は debug レベルでロギングされます。
2039 しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
2044 <option>lxc.hook.pre-start</option>
2049 A hook to be run in the host's namespace before the
2050 container ttys, consoles, or mounts are up.
2052 コンテナの tty、コンソールの作成、マウントが実行される前に、ホストの名前空間内で実行するフック。
2060 <option>lxc.hook.pre-mount</option>
2065 A hook to be run in the container's fs namespace but before
2066 the rootfs has been set up. This allows for manipulation
2067 of the rootfs, i.e. to mount an encrypted filesystem. Mounts
2068 done in this hook will not be reflected on the host (apart from
2069 mounts propagation), so they will be automatically cleaned up
2070 when the container shuts down.
2072 コンテナのファイルシステムの名前空間で実行されますが、rootfs が設定される前に実行するフック。
2073 これにより rootfs の操作が可能になります。
2074 例えば、暗号化されたファイルシステムのマウントなどです。
2075 このフック内でなされるマウントはホストには影響しません (mounts propagation を除いて)。
2076 なので、それらはコンテナがシャットダウンする時に自動的にクリーンアップされます。
2084 <option>lxc.hook.mount</option>
2089 A hook to be run in the container's namespace after
2090 mounting has been done, but before the pivot_root.
2092 マウントが完了した後ですが、pivot_root の前にコンテナの名前空間で実行されるフック。
2100 <option>lxc.hook.autodev</option>
2105 A hook to be run in the container's namespace after
2106 mounting has been done and after any mount hooks have
2107 run, but before the pivot_root, if
2108 <option>lxc.autodev</option> == 1.
2109 The purpose of this hook is to assist in populating the
2110 /dev directory of the container when using the autodev
2111 option for systemd based containers. The container's /dev
2112 directory is relative to the
2113 ${<option>LXC_ROOTFS_MOUNT</option>} environment
2114 variable available when the hook is run.
2116 <option>lxc.autodev</option> == 1 が設定されている場合で、マウントが完了し、マウント時のフックも実行された後ですが、pivot_root の前にコンテナの名前空間で実行するフック。
2117 このフックの目的は、systemd ベースのコンテナ向けの autodev オプションが設定されている時に、コンテナの /dev ディレクトリを設定するのを支援することです。コンテナの /dev ディレクトリは、このフックが実行される時有効な ${<option>LXC_ROOTFS_MOUNT</option>} 環境変数からの相対パスとなります。
2125 <option>lxc.hook.start</option>
2130 A hook to be run in the container's namespace immediately
2131 before executing the container's init. This requires the
2132 program to be available in the container.
2134 コンテナの init が実行される直前にコンテナの名前空間で実行されるフック。
2135 コンテナ内で利用可能なプログラムである必要があります。
2143 <option>lxc.hook.stop</option>
2148 A hook to be run in the host's namespace with references
2149 to the container's namespaces after the container has been shut
2150 down. For each namespace an extra argument is passed to the hook
2151 containing the namespace's type and a filename that can be used to
2152 obtain a file descriptor to the corresponding namespace, separated
2153 by a colon. The type is the name as it would appear in the
2154 <filename>/proc/PID/ns</filename> directory.
2155 For instance for the mount namespace the argument usually looks
2156 like <filename>mnt:/proc/PID/fd/12</filename>.
2158 コンテナのシャットダウン後、コンテナの名前空間への参照とともに、ホストの名前空間で実行されるフックです。
2159 それぞれの名前空間に対応する追加の引数がフックに渡されます。その引数にはコロンで区切られた名前空間のタイプ名とファイル名が含まれており、ファイル名は名前空間に対するファイルディスクリプタを取得するのに使えます。
2160 タイプ名は <filename>/proc/PID/ns</filename> ディレクトリ内のファイル名です。
2161 例えば、マウント名前空間に対応する引数は通常は <filename>mnt:/proc/PID/fd/12</filename> のようになります。
2169 <option>lxc.hook.post-stop</option>
2174 A hook to be run in the host's namespace after the
2175 container has been shut down.
2177 コンテナがシャットダウンされた後にホストの名前空間で実行するフック。
2185 <option>lxc.hook.clone</option>
2190 A hook to be run when the container is cloned to a new one.
2191 See <citerefentry><refentrytitle><command>lxc-clone</command></refentrytitle>
2192 <manvolnum>1</manvolnum></citerefentry> for more information.
2194 コンテナが新しいコンテナにクローンされる際に実行されるフック。詳しくは
2195 <citerefentry><refentrytitle><command>lxc-clone</command></refentrytitle>
2196 <manvolnum>1</manvolnum></citerefentry>
2205 <option>lxc.hook.destroy</option>
2210 A hook to be run when the container is destroyed.
2212 コンテナを破壊する際に実行されるフックです。
2220 <title><!-- Container hooks Environment Variables -->コンテナのフックで使える環境変数</title>
2223 A number of environment variables are made available to the startup
2224 hooks to provide configuration information and assist in the
2225 functioning of the hooks. Not all variables are valid in all
2226 contexts. In particular, all paths are relative to the host system
2227 and, as such, not valid during the <option>lxc.hook.start</option> hook.
2229 起動時のフックに設定情報を提供し、フックの機能を助けるための環境変数がいくつか利用可能です。
2230 全ての変数が全てのコンテキストで利用可能なわけではありません。
2231 具体的には、全てのパスはホストシステム上のパスであり、そのため、<option>lxc.hook.start</option> フックの時点では使用できません。
2236 <option>LXC_NAME</option>
2241 The LXC name of the container. Useful for logging messages
2242 in common log environments. [<option>-n</option>]
2244 LXC コンテナの名前。共通のログ環境内でのログメッセージに使うときに便利です。[<option>-n</option>]
2252 <option>LXC_CONFIG_FILE</option>
2257 Host relative path to the container configuration file. This
2258 gives the container to reference the original, top level,
2259 configuration file for the container in order to locate any
2260 additional configuration information not otherwise made
2261 available. [<option>-f</option>]
2263 コンテナの設定ファイルのホスト上でのパス。
2264 これは、他の方法では得られない追加の設定情報を見つけるために、コンテナに、元の、トップレベルの設定ファイルの位置を与えるものです。 [<option>-f</option>]
2272 <option>LXC_CONSOLE</option>
2277 The path to the console output of the container if not NULL.
2278 [<option>-c</option>] [<option>lxc.console</option>]
2280 設定されている場合のコンテナのコンソール出力のパス。
2281 [<option>-c</option>] [<option>lxc.console</option>]
2289 <option>LXC_CONSOLE_LOGPATH</option>
2294 The path to the console log output of the container if not NULL.
2295 [<option>-L</option>]
2297 設定されている場合のコンテナのコンソールログ出力のパス。
2298 [<option>-L</option>]
2306 <option>LXC_ROOTFS_MOUNT</option>
2311 The mount location to which the container is initially bound.
2312 This will be the host relative path to the container rootfs
2313 for the container instance being started and is where changes
2314 should be made for that instance.
2315 [<option>lxc.rootfs.mount</option>]
2318 これは、コンテナインスタンスが起動するためのコンテナの rootfs へのホスト上のパスであり、インスタンスのための移行が行われる場所です。
2319 [<option>lxc.rootfs.mount</option>]
2327 <option>LXC_ROOTFS_PATH</option>
2332 The host relative path to the container root which has been
2333 mounted to the rootfs.mount location.
2334 [<option>lxc.rootfs</option>]
2336 rootfs.mount へマウントされるコンテナのルートへのホスト上のパスです。
2337 [<option>lxc.rootfs</option>]
2345 <option>LXC_SRC_NAME</option>
2350 Only for the clone hook. Is set to the original container name.
2352 clone フックの場合のみ使われます。クローン元のコンテナ名が設定されます。
2360 <option>LXC_TARGET</option>
2365 Only for the stop hook. Is set to "stop" for a container
2366 shutdown or "reboot" for a container reboot.
2368 stop フックの場合のみ使われます。コンテナのシャットダウンの場合は "stop"、リブートの場合は "reboot" が設定されます。
2376 <option>LXC_CGNS_AWARE</option>
2381 If unset, then this version of lxc is not aware of cgroup
2382 namespaces. If set, it will be set to 1, and lxc is aware
2383 of cgroup namespaces. Note this does not guarantee that
2384 cgroup namespaces are enabled in the kernel. This is used
2385 by the lxcfs mount hook.
2387 この変数が設定されていない場合、お使いのバージョンの LXC は cgroup 名前空間を扱えません。設定されている場合、この値は 1 に設定されています。そして、cgroup 名前空間を扱えます。
2388 この変数はカーネルで cgroup 名前空間が有効であることは保証しません。この変数は lxcfs のマウントフックが使います。
2396 <title><!-- Logging -->ロギング</title>
2399 Logging can be configured on a per-container basis. By default,
2400 depending upon how the lxc package was compiled, container startup
2401 is logged only at the ERROR level, and logged to a file named after
2402 the container (with '.log' appended) either under the container path,
2405 ロギングはコンテナごとに設定することが可能です。
2406 デフォルトでは、lxc パッケージのコンパイル条件に依存し、コンテナのスタートアップは ERROR レベルでのみロギングされ、コンテナのパス以下か、@LOGPATH@ 以下のどちらかにコンテナ名 (の後に '.log' が付与される) をもとにした名前でロギングされます。
2410 Both the default log level and the log file can be specified in the
2411 container configuration file, overriding the default behavior. Note
2412 that the configuration file entries can in turn be overridden by the
2413 command line options to <command>lxc-start</command>.
2415 デフォルトのログレベルとログファイルは両方とも、コンテナの設定ファイル内で指定され、デフォルトの値を上書きします。
2416 同様に、設定ファイルのエントリは <command>lxc-start</command> のコマンドラインオプションで上書きすることも可能です。
2421 <option>lxc.loglevel</option>
2426 The level at which to log. The log level is an integer in
2427 the range of 0..8 inclusive, where a lower number means more
2428 verbose debugging. In particular 0 = trace, 1 = debug, 2 =
2429 info, 3 = notice, 4 = warn, 5 = error, 6 = critical, 7 =
2430 alert, and 8 = fatal. If unspecified, the level defaults
2431 to 5 (error), so that only errors and above are logged.
2434 ログレベルは 0..8 の範囲の整数です。
2435 数字が小さいほど冗長なデバッグを意味します。
2436 具体的には、0 = trace, 1 = debug, 2 = info, 3 = notice, 4 = warn, 5 = error, 6 = critical, 7 = alert, and 8 = fatal です。
2437 指定されない場合、レベルのデフォルトは 5 (error) で、それ以上のエラーがロギングされます。
2441 Note that when a script (such as either a hook script or a
2442 network interface up or down script) is called, the script's
2443 standard output is logged at level 1, debug.
2445 (フックスクリプトやネットワークインターフェースの起動、停止時のスクリプトのような) スクリプトが呼ばれた時、スクリプトの標準出力は level 1 の debug でロギングされます。
2451 <option>lxc.logfile</option>
2456 The file to which logging info should be written.
2464 <option>lxc.syslog</option>
2469 Send logging info to syslog. It respects the log level defined in
2470 <command>lxc.loglevel</command>. The argument should be the syslog
2471 facility to use, valid ones are: daemon, local0, local1, local2,
2472 local3, local4, local5, local5, local7.
2474 ログ情報を syslog に送ります。ログレベルとして <command>lxc.loglevel</command> の値を使用します。指定する値は使用する syslog の facility です。有効な値は daemon, local0, local1, local2, local3, local4, local5, local5, local6, local7 のいずれかです。
2482 <title><!-- Autostart -->自動起動</title>
2485 The autostart options support marking which containers should be
2486 auto-started and in what order. These options may be used by LXC tools
2487 directly or by external tooling provided by the distributions.
2489 自動起動オプションでは、自動起動させるコンテナと順番の設定が可能です。
2490 このオプションは LXC ツールが直接使用するか、ディストリビューションが提供する外部ツールが使用するかもしれません。
2496 <option>lxc.start.auto</option>
2501 Whether the container should be auto-started.
2502 Valid values are 0 (off) and 1 (on).
2504 コンテナを自動起動させるかどうかを設定します。
2505 有効な値は 0(オフ) か 1(オン) です。
2511 <option>lxc.start.delay</option>
2516 How long to wait (in seconds) after the container is
2517 started before starting the next one.
2519 コンテナを起動させた後、次のコンテナを起動させるまでにどれくらい (秒) 待つかを設定します。
2525 <option>lxc.start.order</option>
2530 An integer used to sort the containers when auto-starting
2531 a series of containers at once.
2533 多数の自動起動させるコンテナがある場合のコンテナの起動順を決めるのに使う整数を指定します。
2539 <option>lxc.monitor.unshare</option>
2544 If not zero the mount namespace will be unshared from the host
2545 before initializing the container (before running any pre-start
2546 hooks). This requires the CAP_SYS_ADMIN capability at startup.
2549 この値が 0 でない場合、コンテナが初期化される前 (pre-start フックが実行される前) にマウント名前空間がホストから unshare されます。この機能を使う場合、スタート時に CAP_SYS_ADMIN ケーパビリティが必要です。デフォルト値は 0 です。
2555 <option>lxc.group</option>
2560 A multi-value key (can be used multiple times) to put the
2561 container in a container group. Those groups can then be
2562 used (amongst other things) to start a series of related
2565 コンテナを追加したいコンテナグループ名を指定します。
2566 複数の値を設定でき、複数回指定することもできます。
2567 設定されたグループは、関連する一連のコンテナを起動させるために使われます。
2575 <title><!-- Autostart and System Boot -->自動起動とシステムブート</title>
2578 Each container can be part of any number of groups or no group at all.
2579 Two groups are special. One is the NULL group, i.e. the container does
2580 not belong to any group. The other group is the "onboot" group.
2582 コンテナはいくつでもグループに属することができ、全く属さないことも可能です。特別なグループが 2 つ存在します。1 つは NULL グループです。これはどのグループにも属さないコンテナです。もう 1 つは "onboot" グループです。
2587 When the system boots with the LXC service enabled, it will first
2588 attempt to boot any containers with lxc.start.auto == 1 that is a member
2589 of the "onboot" group. The startup will be in order of lxc.start.order.
2590 If an lxc.start.delay has been specified, that delay will be honored
2591 before attempting to start the next container to give the current
2592 container time to begin initialization and reduce overloading the host
2593 system. After starting the members of the "onboot" group, the LXC system
2594 will proceed to boot containers with lxc.start.auto == 1 which are not
2595 members of any group (the NULL group) and proceed as with the onboot
2598 LXC サービスが有効になった状態でシステムがブートすると、最初に "onboot" グループのメンバーである lxc.start.auto == 1 が設定されたコンテナを起動しようとします。起動は lxc.start.order の順に起動します。
2599 lxc.start.delay が指定されている場合、現在対象となっているコンテナに初期化の時間を与え、ホストシステムの負荷を低減するために、次のコンテナを開始させるまでに遅延時間を与えます。
2600 "onboot" グループのメンバーが開始した後、LXC システムは lxc.start.auto == 1 が設定された、どのグループのメンバーでもない (NULL グループの) コンテナのブートを onboot グループのコンテナと同様に開始します。
2606 <title><!-- Container Environment -->コンテナの環境変数</title>
2609 If you want to pass environment variables into the container (that
2610 is, environment variables which will be available to init and all of
2611 its descendents), you can use <command>lxc.environment</command>
2612 parameters to do so. Be careful that you do not pass in anything
2613 sensitive; any process in the container which doesn't have its
2614 environment scrubbed will have these variables available to it, and
2615 environment variables are always available via
2616 <command>/proc/PID/environ</command>.
2618 コンテナに環境変数を渡したい場合 (環境変数はコンテナの init とその子孫全てで利用可能です)、<command>lxc.environment</command> パラメータがその用途に使えます。
2619 機微 (センシティブ) な情報を渡さないように注意が必要です。そのような情報を持たないコンテナ内のプロセスでこれらの環境変数が利用可能になってしまいます。環境変数は常に <command>/proc/PID/environ</command> 経由で利用可能になります。
2624 This configuration parameter can be specified multiple times; once
2625 for each environment variable you wish to configure.
2627 この設定項目は、設定したい環境変数ごとに 1 度ずつ、何度でも指定できます。
2633 <option>lxc.environment</option>
2638 Specify an environment variable to pass into the container.
2641 コンテナに渡したい環境変数を指定します。
2645 lxc.environment = APP_ENV=production
2646 lxc.environment = SYSLOG_SERVER=192.0.2.42
2656 <title><!-- Examples -->例</title>
2659 In addition to the few examples given below, you will find
2660 some other examples of configuration file in @DOCDIR@/examples
2662 以下に紹介するいくつかの例に加えて、他の設定例が @DOCDIR@/examples にあります。
2665 <title><!-- Network -->ネットワーク</title>
2668 This configuration sets up a container to use a veth pair
2669 device with one side plugged to a bridge br0 (which has been
2670 configured before on the system by the administrator). The
2671 virtual network device visible in the container is renamed to
2674 この設定は、片方をブリッジである br0 と接続される veth ペアデバイスを使うコンテナを設定します (ブリッジは管理者によりあらかじめシステム上に設定済みである必要があります)。
2675 仮想ネットワークデバイスは、コンテナ内では eth0 とリネームされます。
2678 lxc.utsname = myhostname
2679 lxc.network.type = veth
2680 lxc.network.flags = up
2681 lxc.network.link = br0
2682 lxc.network.name = eth0
2683 lxc.network.hwaddr = 4a:49:43:49:79:bf
2684 lxc.network.ipv4 = 1.2.3.5/24 1.2.3.255
2685 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
2690 <title><!-- UID/GID mapping -->UID/GID のマッピング</title>
2691 <para><!-- This configuration will map both user and group ids in the
2692 range 0-9999 in the container to the ids 100000-109999 on the host. -->
2693 この設定は、コンテナ内のユーザとグループ両方の id 0-9999 の範囲を、ホスト上の 100000-109999 へマッピングします。
2696 lxc.id_map = u 0 100000 10000
2697 lxc.id_map = g 0 100000 10000
2702 <title>Control group</title>
2704 <!-- This configuration will setup several control groups for
2705 the application, cpuset.cpus restricts usage of the defined cpu,
2706 cpus.share prioritize the control group, devices.allow makes
2707 usable the specified devices.-->
2708 この設定は、アプリケーションのための control group をいくつか設定します。
2709 cpuset.cpus は定義された cpu のみ使用できるように制限します。
2710 cpus.share は、control group の (cpu) 優先度を指定します。
2711 devices.allow は、特定のデバイスを使用可能にします。
2714 lxc.cgroup.cpuset.cpus = 0,1
2715 lxc.cgroup.cpu.shares = 1234
2716 lxc.cgroup.devices.deny = a
2717 lxc.cgroup.devices.allow = c 1:3 rw
2718 lxc.cgroup.devices.allow = b 8:0 rw
2723 <title><!-- Complex configuration -->複雑な設定</title>
2725 <!-- This example show a complex configuration making a complex
2726 network stack, using the control groups, setting a new hostname,
2727 mounting some locations and a changing root file system. -->
2728 この例は、control group を使って、複雑なネットワークスタックを作成し、新しいホスト名を指定し、いくつかの場所をマウントし、ルートファイルシステムを変更するような複雑な設定を示します。
2731 lxc.utsname = complex
2732 lxc.network.type = veth
2733 lxc.network.flags = up
2734 lxc.network.link = br0
2735 lxc.network.hwaddr = 4a:49:43:49:79:bf
2736 lxc.network.ipv4 = 10.2.3.5/24 10.2.3.255
2737 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
2738 lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588
2739 lxc.network.type = macvlan
2740 lxc.network.flags = up
2741 lxc.network.link = eth0
2742 lxc.network.hwaddr = 4a:49:43:49:79:bd
2743 lxc.network.ipv4 = 10.2.3.4/24
2744 lxc.network.ipv4 = 192.168.10.125/24
2745 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
2746 lxc.network.type = phys
2747 lxc.network.flags = up
2748 lxc.network.link = dummy0
2749 lxc.network.hwaddr = 4a:49:43:49:79:ff
2750 lxc.network.ipv4 = 10.2.3.6/24
2751 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
2752 lxc.cgroup.cpuset.cpus = 0,1
2753 lxc.cgroup.cpu.shares = 1234
2754 lxc.cgroup.devices.deny = a
2755 lxc.cgroup.devices.allow = c 1:3 rw
2756 lxc.cgroup.devices.allow = b 8:0 rw
2757 lxc.mount = /etc/fstab.complex
2758 lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
2759 lxc.rootfs = /mnt/rootfs.complex
2760 lxc.cap.drop = sys_module mknod setuid net_raw
2761 lxc.cap.drop = mac_override
2768 <title>See Also</title>
2771 <refentrytitle><command>chroot</command></refentrytitle>
2772 <manvolnum>1</manvolnum>
2776 <refentrytitle><command>pivot_root</command></refentrytitle>
2777 <manvolnum>8</manvolnum>
2781 <refentrytitle><filename>fstab</filename></refentrytitle>
2782 <manvolnum>5</manvolnum>
2786 <refentrytitle><filename>capabilities</filename></refentrytitle>
2787 <manvolnum>7</manvolnum>
2796 <title><!-- Author -->作者</title>
2797 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
2802 <!-- Keep this comment at the end of the file
2807 sgml-minimize-attributes:nil
2808 sgml-always-quote-attributes:t
2811 sgml-parent-document:nil
2812 sgml-default-dtd-file:nil
2813 sgml-exposed-tags:nil
2814 sgml-local-catalogs:nil
2815 sgml-local-ecat-files:nil