]> git.proxmox.com Git - mirror_lxc.git/blob - doc/ja/lxc.container.conf.sgml.in
doc: Add lxc.console.buffer.* and lxc.console.rotate to Japanese lxc.container.conf(5)
[mirror_lxc.git] / doc / ja / lxc.container.conf.sgml.in
1 <!--
2
3 lxc: linux Container library
4
5 (C) Copyright IBM Corp. 2007, 2008
6
7 Authors:
8 Daniel Lezcano <daniel.lezcano at free.fr>
9
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.
14
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.
19
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
23
24 Translated into Japanese
25 by KATOH Yasufumi <karma at jazz.email.ne.jp>
26
27 -->
28
29 <!DOCTYPE refentry PUBLIC @docdtd@ [
30
31 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
32 ]>
33
34 <refentry>
35
36 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
37
38 <refmeta>
39 <refentrytitle>lxc.container.conf</refentrytitle>
40 <manvolnum>5</manvolnum>
41 </refmeta>
42
43 <refnamediv>
44 <refname>lxc.container.conf</refname>
45
46 <refpurpose>
47 <!--
48 LXC container configuration file
49 -->
50 LXC コンテナ設定ファイル
51 </refpurpose>
52 </refnamediv>
53
54 <refsect1>
55 <title><!-- Description -->説明</title>
56
57 <para>
58 <!--
59 LXC is the well-known and heavily tested low-level Linux container
60 runtime. It is in active development since 2008 and has proven itself in
61 critical production environments world-wide. Some of its core contributors
62 are the same people that helped to implement various well-known
63 containerization features inside the Linux kernel.
64 -->
65 LXC は良く知られた、多くのテストが行われた Linux コンテナのランタイムです。LXC は、2008 年以来アクティブに開発されており、世界中の重要な本番環境で実証されています。開発への貢献者の中には、Linux カーネル内の良く知られた様々なコンテナ機能の実装に貢献した人と同じ人もいます。
66 </para>
67
68 <para>
69 <!--
70 LXC's main focus is system containers. That is, containers which offer an
71 environment as close as possible as the one you'd get from a VM but
72 without the overhead that comes with running a separate kernel and
73 simulating all the hardware.
74 -->
75 LXC は主にシステムコンテナにフォーカスを当てています。つまり、VM で得られる環境と可能な限り近い環境を提供を提供するにも関わらず、別々のカーネルを実行したり、ハードウェアをすべてシミュレートしたりすることによるオーバーヘッドがないコンテナのことです。
76 </para>
77
78 <para>
79 <!--
80 This is achieved through a combination of kernel security features such as
81 namespaces, mandatory access control and control groups.
82 -->
83 このような環境は、名前空間 (namespace)、強制アクセスコントロール、cgroup といったカーネルのセキュリティ機能の組み合わせで実現しています。
84 </para>
85
86 <para>
87 <!--
88 LXC has supports unprivileged containers. Unprivileged containers are
89 containers that are run without any privilege. This requires support for
90 user namespaces in the kernel that the container is run on. LXC was the
91 first runtime to support unprivileged containers after user namespaces
92 were merged into the mainline kernel.
93 -->
94 LXC は非特権コンテナをサポートしています。非特権コンテナは、いかなる特権も持たずに実行するコンテナです。非特権コンテナの実行には、コンテナを実行しているカーネルにユーザ名前空間 (user namespace) のサポートが必要です。LXC は、ユーザ名前空間がメインラインカーネルにマージされてから、初めて非特権コンテナをサポートしたランタイムです。
95 </para>
96
97 <para>
98 <!--
99 In essence, user namespaces isolate given sets of UIDs and GIDs. This is
100 achieved by establishing a mapping between a range of UIDs and GIDs on the
101 host to a different (unprivileged) range of UIDs and GIDs in the
102 container. The kernel will translate this mapping in such a way that
103 inside the container all UIDs and GIDs appear as you would expect from the
104 host whereas on the host these UIDs and GIDs are in fact unprivileged. For
105 example, a process running as UID and GID 0 inside the container might
106 appear as UID and GID 100000 on the host. The implementation and working
107 details can be gathered from the corresponding user namespace man page.
108 UID and GID mappings can be defined with the <option>lxc.idmap</option>
109 key.
110 -->
111 本質的には、ユーザ名前空間は与えられた UID、GID の組を隔離します。ユーザ名前空間は、ホスト上の UID、GID のある範囲を、それとは異なるコンテナ上の UID、GID の範囲へマッピングすることで実現します。カーネルは、ホスト上では実際には UID、GID は特権を持たないにも関わらず、コンテナ内ではすべての UID、GID が期待されるように見えるように変換を行います。
112 例えば、コンテナ内では UID、GID が 0 として実行中のプロセスは、ホスト上では UID、GID が 100000 として見えるでしょう。実装と動作の詳細は、ユーザ名前空間の man ページから得られます。UID と GID のマッピングは <option>lxc.idmap</option> を使って定義できます。
113 </para>
114
115 <para>
116 <!--
117 Linux containers are defined with a simple configuration file. Each
118 option in the configuration file has the form <command>key =
119 value</command> fitting in one line. The "#" character means the line is a
120 comment. List options, like capabilities and cgroups options, can be used
121 with no value to clear any previously defined values of that option.
122 -->
123 Linux コンテナは、簡単な設定ファイルで定義します。設定ファイル中のオプションは <command>key = value</command> の形で一行で表します。'#' は、その行はコメントであることを示します。ケーパビリティや cgroup のオプションのような、リスト形式で指定するオプションでは、value がない形式で指定でき、そのように使うと、それ以前に定義した値をすべてクリアします。
124 </para>
125
126 <para>
127 <!--
128 LXC namespaces configuration keys by using single dots. This means complex
129 configuration keys such as <option>lxc.net.0</option> expose various
130 subkeys such as <option>lxc.net.0.type</option>,
131 <option>lxc.net.0.link</option>, <option>lxc.net.0.ipv6.address</option>, and
132 others for even more fine-grained configuration.
133 -->
134 LXC は、シングルドットを使って設定キーの名前空間を表します。<option>lxc.net.0</option> のような複雑な設定キーは、<option>lxc.net.0.type</option>、<option>lxc.net.0.link</option>、<option>lxc.net.0.ipv6.address</option> や、さらに細分化された設定向けの色々なサブキーを持つことを意味します。
135 </para>
136
137 <refsect2>
138 <title><!-- Configuration -->設定</title>
139 <para>
140 <!--
141 In order to ease administration of multiple related containers, it is
142 possible to have a container configuration file cause another file to be
143 loaded. For instance, network configuration can be defined in one common
144 file which is included by multiple containers. Then, if the containers
145 are moved to another host, only one file may need to be updated.
146 -->
147 複数の関係するコンテナの管理を容易にするために、コンテナの設定ファイルに別のファイルをロードすることが可能です。
148 例えば、ネットワークの設定を、複数のコンテナから include させるように 1 つのファイルに定義することが可能です。
149 その場合、コンテナが他のホストに移動すると、そのファイルだけを更新する必要があるかもしれません。
150 </para>
151
152 <variablelist>
153 <varlistentry>
154 <term>
155 <option>lxc.include</option>
156 </term>
157 <listitem>
158 <para>
159 <!--
160 Specify the file to be included. The included file must be
161 in the same valid lxc configuration file format.
162 -->
163 include させたいファイルを指定します。
164 include するファイルは、lxc 設定ファイルのフォーマットとして有効でなければいけません。
165 </para>
166 </listitem>
167 </varlistentry>
168 </variablelist>
169 </refsect2>
170
171 <refsect2>
172 <title><!-- Architecture -->アーキテクチャ</title>
173 <para>
174 <!--
175 Allows one to set the architecture for the container. For example, set a
176 32bits architecture for a container running 32bits binaries on a 64bits
177 host. This fixes the container scripts which rely on the architecture to
178 do some work like downloading the packages.
179 -->
180 コンテナに対してアーキテクチャを設定することが可能です。
181 例えば、64 ビットのホスト上で 32 ビットのバイナリを動かすために 32 ビットアーキテクチャを設定することが可能です。
182 この設定を行うことにより、パッケージのダウンロードを行うなどの作業のうち、アーキテクチャ名に依存するような作業を行うコンテナスクリプトの修正を行います。
183 </para>
184
185 <variablelist>
186 <varlistentry>
187 <term>
188 <option>lxc.arch</option>
189 </term>
190 <listitem>
191 <para>
192 <!--
193 Specify the architecture for the container.
194 -->
195 コンテナに設定するアーキテクチャを指定します。
196 </para>
197 <para>
198 <!--
199 Some valid options are
200 <option>x86</option>,
201 <option>i686</option>,
202 <option>x86_64</option>,
203 <option>amd64</option>
204 -->
205 有効なオプションには以下のようなものがあります。
206 <option>x86</option>,
207 <option>i686</option>,
208 <option>x86_64</option>,
209 <option>amd64</option>
210 </para>
211 </listitem>
212 </varlistentry>
213 </variablelist>
214
215 </refsect2>
216
217 <refsect2>
218 <title><!-- Hostname -->ホスト名</title>
219 <para>
220 <!--
221 The utsname section defines the hostname to be set for the container.
222 That means the container can set its own hostname without changing the
223 one from the system. That makes the hostname private for the container.
224 -->
225 utsname セクションは、コンテナに設定されるホスト名を定義します。
226 コンテナは、システムのホスト名を変えることなく、自身のホスト名を持つ事が可能です。
227 このことにより、ホスト名はコンテナ専用となります。
228 </para>
229 <variablelist>
230 <varlistentry>
231 <term>
232 <option>lxc.uts.name</option>
233 </term>
234 <listitem>
235 <para>
236 <!--
237 specify the hostname for the container
238 -->
239 コンテナのホスト名を指定します。
240 </para>
241 </listitem>
242 </varlistentry>
243 </variablelist>
244 </refsect2>
245
246 <refsect2>
247 <title><!-- Halt signal -->クリーンなシャットダウン時のシグナル</title>
248 <para>
249 <!--
250 Allows one to specify signal name or number sent to the container's
251 init process to cleanly shutdown the container. Different init systems
252 could use different signals to perform clean shutdown sequence. This
253 option allows the signal to be specified in kill(1) fashion, e.g.
254 SIGPWR, SIGRTMIN+14, SIGRTMAX-10 or plain number. The default signal is
255 SIGPWR.
256 -->
257 コンテナをクリーンにシャットダウンするためにコンテナの init プロセスに送るシグナル名か番号を指定できます。init システムによって、クリーンなシャットダウンを行うために使うシグナルは異なります。このオプションではシグナルとして kill(1) で使う形式を指定できます。
258 例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGPWR です。
259 </para>
260 <variablelist>
261 <varlistentry>
262 <term>
263 <option>lxc.signal.halt</option>
264 </term>
265 <listitem>
266 <para>
267 <!--
268 specify the signal used to halt the container
269 -->
270 コンテナをシャットダウンするために使うシグナルを指定します。
271 </para>
272 </listitem>
273 </varlistentry>
274 </variablelist>
275 </refsect2>
276
277 <refsect2>
278 <title>リブート時のシグナル <!-- Reboot signal --></title>
279 <para>
280 <!--
281 Allows one to specify signal name or number to reboot the container.
282 This option allows signal to be specified in kill(1) fashion, e.g.
283 SIGTERM, SIGRTMIN+14, SIGRTMAX-10 or plain number. The default signal
284 is SIGINT.
285 -->
286 コンテナをリブートするために送るシグナル名か番号を指定できます。このオプションではシグナルとして kill(1) で使う形式を指定できます。
287 例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGINT です。
288 </para>
289 <variablelist>
290 <varlistentry>
291 <term>
292 <option>lxc.signal.reboot</option>
293 </term>
294 <listitem>
295 <para>
296 <!--
297 specify the signal used to reboot the container
298 -->
299 コンテナをリブートするために使うシグナルを指定します。
300 </para>
301 </listitem>
302 </varlistentry>
303 </variablelist>
304 </refsect2>
305
306 <refsect2>
307 <title><!-- Stop signal -->強制停止時のシグナル</title>
308 <para>
309 <!--
310 Allows one to specify signal name or number to forcibly shutdown the
311 container. This option allows signal to be specified in kill(1) fashion,
312 e.g. SIGKILL, SIGRTMIN+14, SIGRTMAX-10 or plain number. The default
313 signal is SIGKILL.
314 -->
315 コンテナを強制的にシャットダウンするために送るシグナル名か番号を指定できます。このオプションではシグナルとして kill(1) で使う形式を指定できます。
316 例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGKILL です。
317 </para>
318 <variablelist>
319 <varlistentry>
320 <term>
321 <option>lxc.signal.stop</option>
322 </term>
323 <listitem>
324 <para>
325 <!--
326 specify the signal used to stop the container
327 -->
328 コンテナを停止するのに使用するシグナルを指定します。
329 </para>
330 </listitem>
331 </varlistentry>
332 </variablelist>
333 </refsect2>
334
335 <refsect2>
336 <title><!-- Init command -->Init コマンド</title>
337 <para>
338 <!--
339 Sets the command to use as the init system for the containers.
340 -->
341 コンテナの init として使うコマンドを設定します。
342 </para>
343 <variablelist>
344 <varlistentry>
345 <term>
346 <option>lxc.execute.cmd</option>
347 </term>
348 <listitem>
349 <para>
350 <!--
351 Absolute path from container rootfs to the binary to run by default. This
352 mostly makes sense for lxc-execute.
353 -->
354 デフォルトで実行するバイナリのコンテナの root からの絶対パスを指定します。これは <command>lxc-execute</command> のための設定です。
355 </para>
356 </listitem>
357 </varlistentry>
358 </variablelist>
359 <variablelist>
360 <varlistentry>
361 <term>
362 <option>lxc.init.cmd</option>
363 </term>
364 <listitem>
365 <para>
366 <!--
367 Absolute path from container rootfs to the binary to use as init. This
368 mostly makes sense for lxc-start. Default is /sbin/init.
369 -->
370 init として使うバイナリの、コンテナの root からの絶対パスを指定します。これは <command>lxc-start</command> のための設定です。デフォルトは <command>/sbin/init</command> です。
371 </para>
372 </listitem>
373 </varlistentry>
374 </variablelist>
375 </refsect2>
376
377 <refsect2>
378 <title><!-- Init ID -->Init が使う ID</title>
379 <para>
380 <!--
381 Sets the UID/GID to use for the init system, and subsequent commands.
382 Note that using a non-root uid when booting a system container will
383 likely not work due to missing privileges. Setting the UID/GID is mostly
384 useful when running application container.
385
386 Defaults to: UID(0), GID(0)
387 -->
388 init と後続のコマンドが使う UID/GID を設定します。システムコンテナを起動するのに非 root な UID を使うと、特権がないために動作しないでしょう。UID/GID の指定は、通常はアプリケーションコンテナの動作の際に役に立ちます。
389
390 デフォルト値: UID(0)、GID(0)
391 </para>
392 <variablelist>
393 <varlistentry>
394 <term>
395 <option>lxc.init.uid</option>
396 </term>
397 <listitem>
398 <para>
399 <!--
400 UID to use for init.
401 -->
402 init が使う UID です。
403 </para>
404 </listitem>
405 </varlistentry>
406 <varlistentry>
407 <term>
408 <option>lxc.init.gid</option>
409 </term>
410 <listitem>
411 <para>
412 <!--
413 GID to use for init.
414 -->
415 init が使う GID です。
416 </para>
417 </listitem>
418 </varlistentry>
419 </variablelist>
420 </refsect2>
421
422 <refsect2>
423 <title><!-- Ephemeral -->一時的なコンテナ</title>
424 <para>
425 <!--
426 Allows one to specify whether a container will be destroyed on shutdown.
427 -->
428 シャットダウン後にコンテナを削除するかどうかを指定できます。
429 </para>
430 <variablelist>
431 <varlistentry>
432 <term>
433 <option>lxc.ephemeral</option>
434 </term>
435 <listitem>
436 <para>
437 <!--
438 The only allowed values are 0 and 1. Set this to 1 to destroy a
439 container on shutdown.
440 -->
441 指定できる値は 0 または 1 のみです。この値を 1 に設定すると、シャットダウン後にコンテナを削除します。
442 </para>
443 </listitem>
444 </varlistentry>
445 </variablelist>
446 </refsect2>
447
448 <refsect2>
449 <title><!-- Network -->ネットワーク</title>
450 <para>
451 <!--
452 The network section defines how the network is virtualized in
453 the container. The network virtualization acts at layer
454 two. In order to use the network virtualization, parameters
455 must be specified to define the network interfaces of the
456 container. Several virtual interfaces can be assigned and used
457 in a container even if the system has only one physical
458 network interface.
459 -->
460 ネットワークセクションは、コンテナ内でどのようにネットワークを仮想化するかを定義します。
461 ネットワークの仮想化はレイヤー 2 で作動します。
462 ネットワークの仮想化を使用するためには、コンテナのネットワークインターフェースを定義しなければなりません。
463 いくつかの仮想インターフェースをアサインすることができます。
464 そして、仮に物理ネットワークインターフェースが一つしかなくても、コンテナ内でいくつもの仮想インターフェースを使うことができます。
465 </para>
466 <variablelist>
467 <varlistentry>
468 <term>
469 <option>lxc.net</option>
470 </term>
471 <listitem>
472 <para>
473 <!--
474 may be used without a value to clear all previous network options.
475 -->
476 値を指定せずに使い、それ以前に定義されたすべてのネットワークオプションをクリアできます。
477 </para>
478 </listitem>
479 </varlistentry>
480 <varlistentry>
481 <term>
482 <option>lxc.net.[i].type</option>
483 </term>
484 <listitem>
485 <para>
486 <!--
487 specify what kind of network virtualization to be used
488 for the container.
489 Multiple networks can be specified by using an additional index
490 <option>i</option>
491 after all <option>lxc.net.*</option> keys. For example,
492 <option>lxc.net.0.type = veth</option> and
493 <option>lxc.net.1.type = veth</option> specify two different
494 networks of the same type. All keys sharing the same index
495 <option>i</option> will be treated as belonging to the same
496 network. For example, <option>lxc.net.0.link = br0</option>
497 will belong to <option>lxc.net.0.type</option>.
498 Currently, the different virtualization types can be:
499 -->
500 コンテナがどの種類のネットワーク仮想化を使うかを指定します。すべての <option>lxc.net.*</option> キーに、追加のインデックス <option>i</option> を使うと、複数のネットワークを指定できます。例えば、<option>lxc.net.0.type = veth</option> と <option>lxc.net.1.type = veth</option> は、同じタイプの異なるネットワークを 2 つ指定します。
501 同じインデックスを指定したキーはすべて同じネットワークの指定になります。例えば、<option>lxc.net.0.link = br0</option> は <option>lxc.net.0.type</option> と同じネットワークの設定になります。
502 現時点では、以下のネットワーク仮想化のタイプが使えます:
503 </para>
504
505 <para>
506 <!--
507 <option>none:</option> will cause the container to share
508 the host's network namespace. This means the host
509 network devices are usable in the container. It also
510 means that if both the container and host have upstart as
511 init, 'halt' in a container (for instance) will shut down the
512 host.
513 -->
514 <option>none:</option> ホストのネットワーク名前空間を共有します。
515 これにより、ホストのネットワークデバイスをコンテナ内で使うことが可能になります。
516 もしコンテナもホストも init として upstart を使っている場合、(例えば) コンテナ内で 'halt' を実行すると、ホストがシャットダウンしてしまうことにもなります。
517 </para>
518
519 <para>
520 <!--
521 <option>empty:</option> will create only the loopback
522 interface.
523 -->
524 <option>empty:</option> ループバックインターフェースだけを作成します。
525 </para>
526
527 <para>
528 <!--
529 <option>veth:</option> a virtual ethernet pair
530 device is created with one side assigned to the container
531 and the other side attached to a bridge specified by
532 the <option>lxc.net.[i].link</option> option.
533 If the bridge is not specified, then the veth pair device
534 will be created but not attached to any bridge.
535 Otherwise, the bridge has to be created on the system
536 before starting the container.
537 <command>lxc</command> won't handle any
538 configuration outside of the container.
539 By default, <command>lxc</command> chooses a name for the
540 network device belonging to the outside of the
541 container, but if you wish to handle
542 this name yourselves, you can tell <command>lxc</command>
543 to set a specific name with
544 the <option>lxc.net.[i].veth.pair</option> option (except for
545 unprivileged containers where this option is ignored for security
546 reasons).
547 -->
548 <option>veth:</option > 一方がコンテナに、もう一方が <option>lxc.net.[i].link</option> オプションで指定されたブリッジに接続されるペアの仮想イーサネットデバイスを作成します。
549 もし、ブリッジが指定されていない場合、veth ペアデバイスは作成されますが、ブリッジには接続されません。
550 ブリッジはコンテナが開始する前にシステムで事前に設定しておく必要があります。
551 <command>lxc</command> はコンテナ外の設定を扱うことはありません。
552 デフォルトでは、<command>lxc</command> がコンテナの外部に属するネットワークデバイスに対する名前を決定します。
553 しかし、もしこの名前を自分で指定したい場合、<option>lxc.net.[i].veth.pair</option> オプションを使って名前を設定し、lxc に対して指定をすることができます (非特権コンテナの場合をのぞきます。セキュリティ上の理由からこのオプションは無視されます)。
554 </para>
555
556 <para>
557 <!--
558 <option>vlan:</option> a vlan interface is linked with
559 the interface specified by
560 the <option>lxc.net.[i].link</option> and assigned to
561 the container. The vlan identifier is specified with the
562 option <option>lxc.net.[i].vlan.id</option>.
563 -->
564 <option>vlan:</option> vlan インターフェースは <option>lxc.net.[i].link</option> で指定されたインターフェースとリンクし、コンテナに割り当てられます。
565 vlan の指定は <option>lxc.net.[i].vlan.id</option> オプションで指定します。
566 </para>
567
568 <para>
569 <!--
570 <option>macvlan:</option> a macvlan interface is linked
571 with the interface specified by
572 the <option>lxc.net.[i].link</option> and assigned to
573 the container.
574 <option>lxc.net.[i].macvlan.mode</option> specifies the
575 mode the macvlan will use to communicate between
576 different macvlan on the same upper device. The accepted
577 modes are <option>private</option>, <option>vepa</option>,
578 <option>bridge</option> and <option>passthru</option>.
579 In <option>private</option> mode, the device never
580 communicates with any other device on the same upper_dev (default).
581 In <option>vepa</option> mode, the new Virtual Ethernet Port
582 Aggregator (VEPA) mode, it assumes that the adjacent
583 bridge returns all frames where both source and
584 destination are local to the macvlan port, i.e. the
585 bridge is set up as a reflective relay. Broadcast
586 frames coming in from the upper_dev get flooded to all
587 macvlan interfaces in VEPA mode, local frames are not
588 delivered locally. In <option>bridge</option> mode, it
589 provides the behavior of a simple bridge between
590 different macvlan interfaces on the same port. Frames
591 from one interface to another one get delivered directly
592 and are not sent out externally. Broadcast frames get
593 flooded to all other bridge ports and to the external
594 interface, but when they come back from a reflective
595 relay, we don't deliver them again. Since we know all
596 the MAC addresses, the macvlan bridge mode does not
597 require learning or STP like the bridge module does. In
598 <option>passthru</option> mode, all frames received by
599 the physical interface are forwarded to the macvlan
600 interface. Only one macvlan interface in <option>passthru</option>
601 mode is possible for one physical interface.
602 -->
603 <option>macvlan:</option> macvlan インターフェースは <option>lxc.net.[i].link</option> により指定されるインターフェースとリンクし、コンテナに割り当てられます。
604 <option>lxc.net.[i].macvlan.mode</option> でモードを指定すると、その macvlan の指定を、同じ上位デバイスで異なる macvlan の間の通信をする時に使います。
605 指定できるモードは <option>private</option>、<option>vepa</option>、<option>bridge</option>、<option>passthru</option> のいずれかです。
606 <option>private</option> モードの場合、デバイスは同じ上位デバイスの他のデバイスとの通信を行いません (デフォルト)。
607 新しい仮想イーサネットポート集約モード (Virtual Ethernet Port Aggregator (VEPA)) である <option>vepa</option> モードの場合、隣接したポートが、ソースとデスティネーションの両方が macvlan ポートに対してローカルであるフレームを全て返すと仮定します。
608 すなわち、ブリッジが reflective relay として設定されているということです。
609 上位デバイスから入ってくるブロードキャストフレームは、VEPA モードである全ての macvlan インターフェースに送りつけられます。
610 ローカルのフレームはローカルには配送されません。
611 <option>bridge</option> モードの場合、同じポートの異なる macvlan インターフェースの間のシンプルなブリッジとして動作します。
612 あるインターフェースから他のインターフェースへのフレームは、直接配送され、外部には送出されません。
613 ブロードキャストフレームは、全ての他のブリッジと外部のインターフェースに対して送られます。
614 しかし、reflective relay からフレームが返ってきたときは、再度それを配送することはしません。
615 全ての MAC アドレスを知っているので、ブリッジモジュールのように、macvlan ブリッジモードは学習や STP の必要はありません。
616 <option>passthru</option> モードの場合、物理インターフェースで受け取った全てのフレームは macvlan インターフェースに転送されます。<option>passthru</option> モードの場合、ひとつの macvlan インターフェースだけが、ひとつの物理インターフェースに対して設定できます。
617 </para>
618
619 <para>
620 <!--
621 <option>phys:</option> an already existing interface
622 specified by the <option>lxc.net.[i].link</option> is
623 assigned to the container.
624 -->
625 <option>phys:</option> <option>lxc.net.[i].link</option> で指定された、すでに存在しているインターフェースがコンテナに割り当てられます。
626 </para>
627 </listitem>
628 </varlistentry>
629
630 <varlistentry>
631 <term>
632 <option>lxc.net.[i].flags</option>
633 </term>
634 <listitem>
635 <para>
636 <!--
637 Specify an action to do for the network.
638 -->
639 ネットワークに対して行うアクションを指定します。
640 </para>
641
642 <para>
643 <!--
644 <option>up:</option> activates the interface.
645 -->
646 <option>up:</option> インターフェースを起動させます。
647 </para>
648 </listitem>
649 </varlistentry>
650
651 <varlistentry>
652 <term>
653 <option>lxc.net.[i].link</option>
654 </term>
655 <listitem>
656 <para>
657 <!--
658 Specify the interface to be used for real network traffic.
659 -->
660 実際のネットワークトラフィックに使うインターフェースを指定します。
661 </para>
662 </listitem>
663 </varlistentry>
664
665 <varlistentry>
666 <term>
667 <option>lxc.net.[i].mtu</option>
668 </term>
669 <listitem>
670 <para>
671 <!--
672 Specify the maximum transfer unit for this interface.
673 -->
674 インターフェースに対する MTU を指定します。
675 </para>
676 </listitem>
677 </varlistentry>
678
679 <varlistentry>
680 <term>
681 <option>lxc.net.[i].name</option>
682 </term>
683 <listitem>
684 <para>
685 <!--
686 The interface name is dynamically allocated, but if another name
687 is needed because the configuration files being used by the
688 container use a generic name, eg. eth0, this option will rename
689 the interface in the container.
690 -->
691 インターフェース名は動的に割り当てられます。しかし、もしコンテナが使用する設定ファイルが一般的な名前を使用するために、他の特定の名前が必要であれば (例えば eth0 など)、コンテナ内のインターフェースは、このオプションで指定した名前にリネームされます。
692 </para>
693 </listitem>
694 </varlistentry>
695
696 <varlistentry>
697 <term>
698 <option>lxc.net.[i].hwaddr</option>
699 </term>
700 <listitem>
701 <para>
702 <!--
703 The interface mac address is dynamically allocated by default to
704 the virtual interface, but in some cases, this is needed to
705 resolve a mac address conflict or to always have the same
706 link-local ipv6 address. Any "x" in address will be replaced by
707 random value, this allows setting hwaddr templates.
708 -->
709 仮想インターフェースの MAC アドレスは、デフォルトでは動的に割り当てられます。しかし、MAC アドレスの衝突や、リンクローカルIPv6 アドレスを常に同じにした場合などは、このオプションが必要です。アドレス中の "x" という文字は、ランダムな値に置き換えられます。これによりテンプレートに hwaddr を設定することが可能になります。
710 </para>
711 </listitem>
712 </varlistentry>
713
714 <varlistentry>
715 <term>
716 <option>lxc.net.[i].ipv4.address</option>
717 </term>
718 <listitem>
719 <para>
720 <!--
721 Specify the ipv4 address to assign to the virtualized interface.
722 Several lines specify several ipv4 addresses. The address is in
723 format x.y.z.t/m, eg. 192.168.1.123/24.
724 -->
725 仮想インターフェースに割り当てる ipv4 アドレスを指定します。複数行により複数の ipv4 アドレスを指定します。このアドレスは x.y.z.t/m というフォーマットで指定します。例) 192.168.1.123/24
726 </para>
727 </listitem>
728 </varlistentry>
729
730 <varlistentry>
731 <term>
732 <option>lxc.net.[i].ipv4.gateway</option>
733 </term>
734 <listitem>
735 <para>
736 <!--
737 specify the ipv4 address to use as the gateway inside the
738 container. The address is in format x.y.z.t, eg. 192.168.1.123.
739
740 Can also have the special value <option>auto</option>,
741 which means to take the primary address from the bridge
742 interface (as specified by the
743 <option>lxc.net.[i].link</option> option) and use that as
744 the gateway. <option>auto</option> is only available when
745 using the <option>veth</option> and
746 <option>macvlan</option> network types.
747 -->
748 コンテナでゲートウェイとして使う IPv4 アドレスを指定します。アドレスは x.y.z.t というフォーマットです。例) 192.168.1.123
749 <option>auto</option> という特別な値を指定できます。これは (<option>lxc.net.[i].link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し、それをゲートウェイに使うという意味になります。<option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります。
750 </para>
751 </listitem>
752 </varlistentry>
753
754
755 <varlistentry>
756 <term>
757 <option>lxc.net.[i].ipv6.address</option>
758 </term>
759 <listitem>
760 <para>
761 <!--
762 Specify the ipv6 address to assign to the virtualized
763 interface. Several lines specify several ipv6 addresses. The
764 address is in format x::y/m, eg.
765 2003:db8:1:0:214:1234:fe0b:3596/64
766 -->
767 仮想インターフェースに割り当てる ipv6 アドレスを指定します。複数行により複数の ipv6 アドレスを指定します。このアドレスは x::y/m というフォーマットで指定します。例) 2003:db8:1:0:214:1234:fe0b:3596/64
768 </para>
769 </listitem>
770 </varlistentry>
771
772 <varlistentry>
773 <term>
774 <option>lxc.net.[i].ipv6.gateway</option>
775 </term>
776 <listitem>
777 <para>
778 <!--
779 Specify the ipv6 address to use as the gateway inside the
780 container. The address is in format x::y, eg. 2003:db8:1:0::1
781
782 Can also have the special value <option>auto</option>,
783 which means to take the primary address from the bridge
784 interface (as specified by the
785 <option>lxc.net.[i].link</option> option) and use that as
786 the gateway. <option>auto</option> is only available when
787 using the <option>veth</option> and
788 <option>macvlan</option> network types.
789 -->
790 コンテナでゲートウェイとして使う IPv6 アドレスを指定します。アドレスは x::y というフォーマットです。例) 2003:db8:1:0::1
791 <option>auto</option> という特別な値を記述する事も可能です。これは (<option>lxc.net.[i].link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し、それをゲートウェイに使うという意味になります。<option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります。
792 </para>
793 </listitem>
794 </varlistentry>
795
796 <varlistentry>
797 <term>
798 <option>lxc.net.[i].script.up</option>
799 </term>
800 <listitem>
801 <para>
802 <!--
803 add a configuration option to specify a script to be
804 executed after creating and configuring the network used
805 from the host side. The following arguments are passed
806 to the script: container name and config section name
807 (net) Additional arguments depend on the config section
808 employing a script hook; the following are used by the
809 network system: execution context (up), network type
810 (empty/veth/macvlan/phys), Depending on the network
811 type, other arguments may be passed:
812 veth/macvlan/phys. And finally (host-sided) device name.
813 -->
814 ホスト側から使われる、ネットワークの作成と設定が済んだ後に実行するスクリプトを指定します。以下の引数がスクリプトに渡されます: コンテナ名、設定セクション名(net)。
815 その後の引数はスクリプトのフックで使われる設定セクションに依存します。以下がネットワークシステムによって使われます: 実行コンテキスト (up)、ネットワークのタイプ (empty/veth/macvlan/phys)
816 ネットワークのタイプによっては、更に別の引数が渡されるかもしれません: veth/macvlan/phys の場合 (ホスト側の) デバイス名
817 </para>
818 <para>
819 <!--
820 Standard output from the script is logged at debug level.
821 Standard error is not logged, but can be captured by the
822 hook redirecting its standard error to standard output.
823 -->
824 スクリプトからの標準出力は debug レベルでロギングされます。標準エラー出力はロギングされません。しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
825 </para>
826 </listitem>
827 </varlistentry>
828
829 <varlistentry>
830 <term>
831 <option>lxc.net.[i].script.down</option>
832 </term>
833 <listitem>
834 <para>
835 <!--
836 add a configuration option to specify a script to be
837 executed before destroying the network used from the
838 host side. The following arguments are passed to the
839 script: container name and config section name (net)
840 Additional arguments depend on the config section
841 employing a script hook; the following are used by the
842 network system: execution context (down), network type
843 (empty/veth/macvlan/phys), Depending on the network
844 type, other arguments may be passed:
845 veth/macvlan/phys. And finally (host-sided) device name.
846 -->
847 ホスト側から使われる、ネットワークを破壊する前に実行するスクリプトを指定します。以下の引数がスクリプトに渡されます: コンテナ名、設定セクション名(net)。
848 その後の引数はスクリプトのフックで使われる設定セクションに依存します。以下がネットワークシステムによって使われます: 実行コンテキスト (up)、ネットワークのタイプ (empty/veth/macvlan/phys)。
849 ネットワークのタイプによっては、更に別の引数が渡されるかもしれません: veth/macvlan/phys。そして最後に (ホスト側の) デバイス名が渡されます。
850 </para>
851 <para>
852 <!--
853 Standard output from the script is logged at debug level.
854 Standard error is not logged, but can be captured by the
855 hook redirecting its standard error to standard output.
856 -->
857 スクリプトからの標準出力は debug レベルでロギングされます。標準エラー出力はロギングされません。しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
858 </para>
859 </listitem>
860 </varlistentry>
861 </variablelist>
862
863 </refsect2>
864
865 <refsect2>
866 <title><!-- New pseudo tty instance (devpts) -->新しい擬似端末のインスタンス (devpts)</title>
867 <para>
868 <!--
869 For stricter isolation the container can have its own private
870 instance of the pseudo tty.
871 -->
872 さらに厳しい隔離のために、コンテナは自身のプライベートな pseudo tty (擬似端末) を持つことが可能です。
873 </para>
874 <variablelist>
875 <varlistentry>
876 <term>
877 <option>lxc.pty.max</option>
878 </term>
879 <listitem>
880 <para>
881 <!--
882 If set, the container will have a new pseudo tty
883 instance, making this private to it. The value specifies
884 the maximum number of pseudo ttys allowed for a pts
885 instance (this limitation is not implemented yet).
886 -->
887 もし設定された場合、コンテナは新しい pseudo tty インスタンスを持ち、それを自身のプライベートとします。
888 この値は pts インスタンスに許可される pseudo tty の最大数を指定します (この制限はまだ実装されていません)。
889 </para>
890 </listitem>
891 </varlistentry>
892 </variablelist>
893 </refsect2>
894
895 <refsect2>
896 <title><!-- Container system console -->コンテナのシステムコンソール</title>
897 <para>
898 <!--
899 If the container is configured with a root filesystem and the
900 inittab file is setup to use the console, you may want to specify
901 where the output of this console goes.
902 -->
903 コンテナでルートファイルシステムを持つように設定されており、inittab ファイルでコンソールの使用が設定されている場合、このコンソールの出力がどこになされるのかを指定したいと思うでしょう。
904 </para>
905 <variablelist>
906
907 <varlistentry>
908 <term>
909 <option>lxc.console.buffer.size</option>
910 </term>
911 <listitem>
912 <para>
913 <!--
914 Setting this option instructs liblxc to allocate an in-memory
915 ringbuffer. The container's console output will be written to the
916 ringbuffer. Note that ringbuffer must be at least as big as a
917 standard page size. When passed a value smaller than a single page
918 size liblxc will allocate a ringbuffer of a single page size. A page
919 size is usually 4kB.
920 -->
921 このオプションを設定すると、liblxc はインメモリのリングバッファを割り当てます。コンテナのコンソールはリングバッファに出力されます。リングバッファは少なくとも標準ページサイズの大きさでなければなりません。ページサイズより小さい値を与えた場合は、liblxc はページサイズのリングバッファを割り当てます。ページサイズは通常は 4kB です。
922
923 <!--
924 The keyword 'auto' will cause liblxc to allocate a ringbuffer of
925 128kB.
926 -->
927 'auto' を指定すると、liblxc は 128kB のリングバッファを割り当てます。
928
929 <!--
930 When manually specifying a size for the ringbuffer the value should
931 be a power of 2 when converted to bytes. Valid size prefixes are
932 'kB', 'MB', 'GB'. (Note that all conversions are based on multiples
933 of 1024. That means 'kb' == 'KiB', 'MB' == 'MiB', 'GB' == 'GiB'.)
934 -->
935 リングバッファサイズを数値指定する場合、値がバイトに変換されるときに 2 の累乗になります。サイズ接頭辞付きの単位として 'kB'、'MB'、'GB' が使えます。(この場合の変換は 1024 の倍数に基づいています。つまり 'kB' == 'KiB'、'MB' == 'MiB'、'GB' == 'GiB' という意味です。)
936 </para>
937 </listitem>
938 </varlistentry>
939
940 <varlistentry>
941 <term>
942 <option>lxc.console.buffer.logfile</option>
943 </term>
944 <listitem>
945 <para>
946 <!--
947 Setting this option instructs liblxc to write the in-memory
948 ringbuffer to disk. For performance reasons liblxc will only write
949 the in-memory ringbuffer to disk when requested. Note that the this
950 option is only used by liblxc when
951 <option>lxc.console.buffer.size</option> is set.
952 -->
953 このオプションを設定すると、liblxc はインメモリのリングバッファをディスクに書き込みます。パフォーマンスを考慮して、liblxc は指定をした場合に限り、インメモリのリングバッファをディスクに書き込みます。liblxc はこのオプションを、<option>lxc.console.buffer.size</option> が指定された場合のみ使います。
954
955 <!--
956 By default liblxc will dump the contents of the in-memory ringbuffer
957 to disk when the container terminates. This allows users to diagnose
958 boot failures when the container crashed before an API request to
959 retrieve the in-memory ringbuffer could be sent or handled.
960 -->
961 デフォルトでは liblxc は、コンテナが終了した際にインメモリのリングバッファの内容をディスクに書き出します。これによりユーザは、インメモリのリングバッファを取得する API リクエストが送られたり処理される前に、コンテナがクラッシュした場合、ブートの失敗を調査できます。
962 </para>
963 </listitem>
964 </varlistentry>
965
966 <varlistentry>
967 <term>
968 <option>lxc.console.logfile</option>
969 </term>
970 <listitem>
971 <para>
972 <!--
973 Specify a path to a file where the console output will be written.
974 Note that in contrast to the on-disk ringbuffer logfile this file
975 will keep growing potentially filling up the users disks if not
976 rotated and deleted. This problem can also be avoided by using the
977 in-memory ringbuffer options
978 <option>lxc.console.buffer.size</option> and
979 <option>lxc.console.buffer.logfile</option>.
980 -->
981 コンソール出力を書き込むファイルのパスを指定します。ディスクに保存されるリングバッファログと異なり、このファイルはサイズが大きくなり続けるので、ファイルがローテートや削除されない限りは、ユーザのディスクをいっぱいにしてしまう可能性があります。この問題は、インメモリのリングバッファオプションである、<option>lxc.console.buffer.size</option> と <option>lxc.console.buffer.logfile</option> を使うことでも回避できます。
982 </para>
983 </listitem>
984 </varlistentry>
985
986 <varlistentry>
987 <term>
988 <option>lxc.console.rotate</option>
989 </term>
990 <listitem>
991 <para>
992 <!--
993 Whether to rotate the console logfile specified in
994 <option>lxc.console.logfile</option>. Users can send an API
995 request to rotate the logfile. Note that the old logfile will have
996 the same name as the original with the suffix ".1" appended.
997 -->
998 <option>lxc.console.logfile</option> で指定したコンソールログファイルをローテートするかどうかを指定します。ユーザはログファイルをローテートするように API リクエストを送ることができます。古いログファイルは、元のファイル名と同じ名前のファイルに ".1" というサフィックスが付け加わります。
999
1000 <!--
1001 Users wishing to prevent the console log file from filling the
1002 disk should rotate the logfile and delete it if unneeded. This
1003 problem can also be avoided by using the in-memory ringbuffer
1004 options <option>lxc.console.buffer.size</option> and
1005 <option>lxc.console.buffer.logfile</option>.
1006 -->
1007 ユーザがコンソールログでディスクがいっぱいになるのを防ぐには、ログファイルをローテートし、不要なログファイルを削除してください。この問題はインメモリのリングバッファオプションである <option>lxc.console.buffer.size</option> と <option>lxc.console.buffer.logfile</option> を使うことでも防げます。
1008 </para>
1009 </listitem>
1010 </varlistentry>
1011
1012 <varlistentry>
1013 <term>
1014 <option>lxc.console.path</option>
1015 </term>
1016 <listitem>
1017 <para>
1018 <!--
1019 Specify a path to a device to which the console will be
1020 attached. The keyword 'none' will simply disable the
1021 console. Note, when specifying 'none' and creating a device node
1022 for the console in the container at /dev/console or bind-mounting
1023 the hosts's /dev/console into the container at /dev/console the
1024 container will have direct access to the hosts's /dev/console.
1025 This is dangerous when the container has write access to the
1026 device and should thus be used with caution.
1027 -->
1028 コンソールを割り当てるデバイスのパスを指定します。'none' というキーワードは、単純にコンソールを無効にします。
1029 'none' を指定し、コンテナ内のコンソールに対するデバイスノードを /dev/console に作成するか、もしくはホストの /dev/console をコンテナ内の /dev/console に bind mount する場合、そのコンテナはホストの /dev/console へ直接アクセスを行うことに注意が必要です。
1030 そのコンテナがデバイスへの書き込み権を持っている場合は危険ですので、注意してこの指定を使用する必要があります。
1031 </para>
1032 </listitem>
1033 </varlistentry>
1034 </variablelist>
1035 </refsect2>
1036
1037 <refsect2>
1038 <title><!-- Console through the ttys -->tty を通したコンソール</title>
1039 <para>
1040 <!--
1041 This option is useful if the container is configured with a root
1042 filesystem and the inittab file is setup to launch a getty on the
1043 ttys. The option specifies the number of ttys to be available for
1044 the container. The number of gettys in the inittab file of the
1045 container should not be greater than the number of ttys specified
1046 in this option, otherwise the excess getty sessions will die and
1047 respawn indefinitely giving annoying messages on the console or in
1048 <filename>/var/log/messages</filename>.
1049 -->
1050 このオプションはコンテナが root ファイルシステムを持つように設定されており、inittab ファイルで tty 上に getty の起動が設定されている場合に役に立ちます。
1051 このオプションはコンテナで利用できる tty の数を指定します。
1052 inittab ファイルに設定する getty の数は、このオプションの指定する tty の数より大きくしてはいけません。
1053 さもなければ、超過した分の getty セッションはコンソールか /var/log/messages にうっとうしいメッセージを生死を表示しながら、永久に生死を繰り返すでしょう。
1054 </para>
1055 <variablelist>
1056 <varlistentry>
1057 <term>
1058 <option>lxc.tty.max</option>
1059 </term>
1060 <listitem>
1061 <para>
1062 <!--
1063 Specify the number of tty to make available to the
1064 container.
1065 -->
1066 コンテナに作成出来る tty の数を指定します。
1067 </para>
1068 </listitem>
1069 </varlistentry>
1070 </variablelist>
1071 </refsect2>
1072
1073 <refsect2>
1074 <title><!-- Console devices location -->コンソールデバイスの位置</title>
1075 <para>
1076 <!--
1077 LXC consoles are provided through Unix98 PTYs created on the
1078 host and bind-mounted over the expected devices in the container.
1079 By default, they are bind-mounted over <filename>/dev/console</filename>
1080 and <filename>/dev/ttyN</filename>. This can prevent package upgrades
1081 in the guest. Therefore you can specify a directory location (under
1082 <filename>/dev</filename> under which LXC will create the files and
1083 bind-mount over them. These will then be symbolically linked to
1084 <filename>/dev/console</filename> and <filename>/dev/ttyN</filename>.
1085 A package upgrade can then succeed as it is able to remove and replace
1086 the symbolic links.
1087 -->
1088 LXC のコンソールはホストによって作られ、コンテナ内で要求されたデバイスに bind マウントされた Unix98 PTY 経由で提供されます。
1089 デフォルトでは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> に bind マウントされます。
1090 これはゲスト内でのパッケージのアップグレードを妨げる可能性があります。
1091 なので <filename>/dev</filename> 以下のディレクトリを指定することができます。
1092 LXC はこのディレクトリ以下にファイルを作成し、これらのファイルを bind マウントします。
1093 そして、これらの (作成された) ファイルは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> にシンボリックリンクされます。
1094 シンボリックリンクを消去したり置き換えたりすることは可能ですから、パッケージのアップグレードは成功します。
1095 </para>
1096 <variablelist>
1097 <varlistentry>
1098 <term>
1099 <option>lxc.tty.dir</option>
1100 </term>
1101 <listitem>
1102 <para>
1103 <!--
1104 Specify a directory under <filename>/dev</filename>
1105 under which to create the container console devices. Note that LXC
1106 will move any bind-mounts or device nodes for /dev/console into
1107 this directory.
1108 -->
1109 コンテナのコンソールデバイスを作成するための <filename>/dev</filename> 以下のディレクトリを指定します。
1110 LXC は /dev/console に対する bind mount や /dev/console デバイスノードをこのディレクトリ以下に移動することに注意が必要です。
1111 </para>
1112 </listitem>
1113 </varlistentry>
1114 </variablelist>
1115 </refsect2>
1116
1117 <refsect2>
1118 <title><!-- /dev directory -->/dev ディレクトリ</title>
1119 <para>
1120 <!--
1121 By default, lxc creates a few symbolic links (fd,stdin,stdout,stderr)
1122 in the container's <filename>/dev</filename> directory but does not
1123 automatically create device node entries. This allows the container's
1124 <filename>/dev</filename> to be set up as needed in the container
1125 rootfs. If lxc.autodev is set to 1, then after mounting the container's
1126 rootfs LXC will mount a fresh tmpfs under <filename>/dev</filename>
1127 (limited to 500k) and fill in a minimal set of initial devices.
1128 This is generally required when starting a container containing
1129 a "systemd" based "init" but may be optional at other times. Additional
1130 devices in the containers /dev directory may be created through the
1131 use of the <option>lxc.hook.autodev</option> hook.
1132 -->
1133 デフォルトでは、lxc はコンテナの <filename>/dev</filename> 以下に fd, stdin, stdout, stderr のシンボリックリンクを作成しますが、自動的にはデバイスノードのエントリは作成しません。
1134 これは、コンテナの rootfs で必要な設定を行えるようにするものです。
1135 lxc.autodev が 1 に設定されている場合、コンテナの rootfs をマウントした後、LXC は新しい tmpfs を <filename>/dev</filename> 以下にマウントします (500k 制限の)。
1136 そして初期デバイスの最小限のセットを作成します。
1137 これは、"systemd" ベースの "init" 環境のコンテナを起動する時に通常必要ですが、他の環境の場合はオプショナルなものです。
1138 コンテナの /dev ディレクトリ内の追加デバイスは <option>lxc.hook.autodev</option> フックを使用して作成されます。
1139 </para>
1140 <variablelist>
1141 <varlistentry>
1142 <term>
1143 <option>lxc.autodev</option>
1144 </term>
1145 <listitem>
1146 <para>
1147 <!--
1148 Set this to 0 to stop LXC from mounting and populating a minimal
1149 <filename>/dev</filename> when starting the container.
1150 -->
1151 コンテナの起動時に LXC が /dev をマウントして最小限の /dev を作成するのを止めるには、この値を 0 に設定してください。
1152 </para>
1153 </listitem>
1154 </varlistentry>
1155 </variablelist>
1156 </refsect2>
1157
1158 <refsect2>
1159 <title><!-- Mount points -->マウントポイント</title>
1160 <para>
1161 <!--
1162 The mount points section specifies the different places to be
1163 mounted. These mount points will be private to the container
1164 and won't be visible by the processes running outside of the
1165 container. This is useful to mount /etc, /var or /home for
1166 examples.
1167 -->
1168 マウントポイントセクションは、マウントするための区別された場所を指定します。
1169 これらのマウントポイントは、コンテナだけに見え、コンテナ外で実行されるプロセスから見えることはありません。
1170 例えば、/etc や /var や /home をマウントするときに役に立つでしょう。
1171 </para>
1172 <para>
1173 <!--
1174 NOTE - LXC will generally ensure that mount targets and relative
1175 bind-mount sources are properly confined under the container
1176 root, to avoid attacks involving over-mounting host directories
1177 and files. (Symbolic links in absolute mount sources are ignored)
1178 However, if the container configuration first mounts a directory which
1179 is under the control of the container user, such as /home/joe, into
1180 the container at some <filename>path</filename>, and then mounts
1181 under <filename>path</filename>, then a TOCTTOU attack would be
1182 possible where the container user modifies a symbolic link under
1183 his home directory at just the right time.
1184 -->
1185 注意: 通常 LXC は、マウント対象と相対パス指定のバインドマウントを、適切にコンテナルート以下に閉じ込めます。
1186 これは、ホストのディレクトリやファイルに対して重ね合わせを行うようなマウントによる攻撃を防ぎます。(絶対パス指定のマウントソース中の各パスがシンボリックリンクである場合は無視されます。)
1187 しかし、もしコンテナの設定が最初に、/home/joe のようなコンテナユーザのコントロール配下にあるディレクトリを、コンテナ中のある <filename>path</filename> にマウントし、その後 <filename>path</filename> 以下でマウントが行われるような場合、コンテナユーザがタイミングを見計らって自身のホームディレクトリ以下でシンボリックリンクを操作するような TOCTTOU 攻撃が成立する可能性があります。
1188 </para>
1189 <variablelist>
1190 <varlistentry>
1191 <term>
1192 <option>lxc.mount.fstab</option>
1193 </term>
1194 <listitem>
1195 <para>
1196 <!--
1197 specify a file location in
1198 the <filename>fstab</filename> format, containing the
1199 mount information. The mount target location can and in
1200 most cases should be a relative path, which will become
1201 relative to the mounted container root. For instance,
1202 -->
1203 マウント情報の書かれた <filename>fstab</filename> フォーマットで書かれたファイルの場所を指定します。
1204 マウントする場所は相対バスで書くことができます。そして、ほとんどの場合にコンテナの root からの相対パスとなるはずです。例えば、以下のように書きます。
1205 </para>
1206 <programlisting>
1207 proc proc proc nodev,noexec,nosuid 0 0
1208 </programlisting>
1209 <para>
1210 <!--
1211 Will mount a proc filesystem under the container's /proc,
1212 regardless of where the root filesystem comes from. This
1213 is resilient to block device backed filesystems as well as
1214 container cloning.
1215 -->
1216 この例は、root ファイルシステムがどこにあっても、コンテナの /proc 以下に proc ファイルシステムをマウントします。これは、ブロックデバイスがバックエンドのファイルシステムだけでなく、コンテナのクローンにも柔軟に対応できます。
1217 </para>
1218 <para>
1219 <!--
1220 Note that when mounting a filesystem from an
1221 image file or block device the third field (fs_vfstype)
1222 cannot be auto as with
1223 <citerefentry>
1224 <refentrytitle>mount</refentrytitle>
1225 <manvolnum>8</manvolnum>
1226 </citerefentry>
1227 but must be explicitly specified.
1228 -->
1229 ファイルシステムがイメージファイルやブロックデバイスからマウントされている場合、3 つ目のフィールド (fs_vfstype) は
1230 <citerefentry>
1231 <refentrytitle>mount</refentrytitle>
1232 <manvolnum>8</manvolnum>
1233 </citerefentry>
1234 のように auto を指定することはできず、明確に指定しなければいけません。
1235 </para>
1236 </listitem>
1237 </varlistentry>
1238
1239 <varlistentry>
1240 <term>
1241 <option>lxc.mount.entry</option>
1242 </term>
1243 <listitem>
1244 <para>
1245 <!--
1246 specify a mount point corresponding to a line in the
1247 fstab format.
1248 -->
1249 fstab フォーマットの一行と同じフォーマットのマウントポイントの指定をします。
1250
1251 <!--
1252 Moreover lxc add two options to mount.
1253 <option>optional</option> don't fail if mount does not work.
1254 <option>create=dir</option> or <option>create=file</option>
1255 to create dir (or file) when the point will be mounted.
1256 -->
1257 fstab フォーマットに加えて、LXC ではマウントに対して独自の 2 つのオプションが使えます。
1258 <option>optional</option> は、マウントが失敗しても失敗を返さずに無視します。
1259 <option>create=dir</option> と <option>create=file</option> は、マウントポイントをマウントする際にディレクトリもしくはファイルを作成します。
1260 </para>
1261 </listitem>
1262 </varlistentry>
1263
1264 <varlistentry>
1265 <term>
1266 <option>lxc.mount.auto</option>
1267 </term>
1268 <listitem>
1269 <para>
1270 <!--
1271 specify which standard kernel file systems should be
1272 automatically mounted. This may dramatically simplify
1273 the configuration. The file systems are:
1274 -->
1275 標準のカーネルファイルシステムで自動的にマウントするものを指定します。
1276 これは劇的に設定を容易にする可能性があります。
1277 </para>
1278 <itemizedlist>
1279 <listitem>
1280 <!--
1281 <para>
1282 <option>proc:mixed</option> (or <option>proc</option>):
1283 mount <filename>/proc</filename> as read-write, but
1284 remount <filename>/proc/sys</filename> and
1285 <filename>/proc/sysrq-trigger</filename> read-only
1286 for security / container isolation purposes.
1287 </para>
1288 -->
1289 <para>
1290 <option>proc:mixed</option> (or <option>proc</option>):
1291 <filename>/proc</filename> を読み書き可能でマウントします。
1292 ただし、<filename>/proc/sys</filename> と <filename>/proc/sysrq-trigger</filename> は、セキュリティとコンテナの隔離の目的でリードオンリーで再マウントされます。
1293 </para>
1294 </listitem>
1295 <listitem>
1296 <!--
1297 <para>
1298 <option>proc:rw</option>: mount
1299 <filename>/proc</filename> as read-write
1300 </para>
1301 -->
1302 <para>
1303 <option>proc:rw</option>:
1304 <filename>/proc</filename> を読み書き可能でマウントします。
1305 </para>
1306 </listitem>
1307 <listitem>
1308 <!--
1309 <para>
1310 <option>sys:mixed</option> (or <option>sys</option>):
1311 mount <filename>/sys</filename> as read-only but with
1312 /sys/devices/virtual/net writable.
1313 </para>
1314 -->
1315 <para>
1316 <option>sys:mixed</option> (or <option>sys</option>):
1317 /sys/devices/virtual/net のみ書き込み可能で、その他の <filename>/sys</filename> はリードオンリーでマウントします。
1318 </para>
1319 </listitem>
1320 <listitem>
1321 <!--
1322 <para>
1323 <option>sys:ro</option>
1324 mount <filename>/sys</filename> as read-only
1325 for security / container isolation purposes.
1326 </para>
1327 -->
1328 <para>
1329 <option>sys:ro</option>:
1330 <filename>/sys</filename> を、セキュリティとコンテナの隔離の目的でリードオンリーでマウントします。
1331 </para>
1332 </listitem>
1333 <listitem>
1334 <!--
1335 <para>
1336 <option>sys:rw</option>: mount
1337 <filename>/sys</filename> as read-write
1338 </para>
1339 -->
1340 <para>
1341 <option>sys:rw</option>:
1342 <filename>/sys</filename> を読み書き可能でマウントします。
1343 </para>
1344 </listitem>
1345 <listitem>
1346 <!--
1347 <para>
1348 <option>cgroup:mixed</option>:
1349 mount a tmpfs to <filename>/sys/fs/cgroup</filename>,
1350 create directories for all hierarchies to which
1351 the container is added, create subdirectories
1352 there with the name of the cgroup, and bind-mount
1353 the container's own cgroup into that directory.
1354 The container will be able to write to its own
1355 cgroup directory, but not the parents, since they
1356 will be remounted read-only
1357 </para>
1358 -->
1359 <para>
1360 <option>cgroup:mixed</option>:
1361 <filename>/sys/fs/cgroup</filename> を tmpfs でマウントし、そのコンテナの追加が行われた全ての階層構造に対するディレクトリを作製し、その cgroup の名前でその中にサブディレクトリを作製し、そのコンテナ自身の cgroup をそのディレクトリにバインドマウントします。
1362 コンテナは自身の cgroup ディレクトリに書き込みが可能ですが、親ディレクトリはリードオンリーで再マウントされているため書き込めません。
1363 </para>
1364 </listitem>
1365 <listitem>
1366 <!--
1367 <para>
1368 <option>cgroup:ro</option>: similar to
1369 <option>cgroup:mixed</option>, but everything will
1370 be mounted read-only.
1371 </para>
1372 -->
1373 <para>
1374 <option>cgroup:ro</option>:
1375 <option>cgroup:mixed</option> と同様にマウントされますが、全てリードオンリーでマウントされます。
1376 </para>
1377 </listitem>
1378 <listitem>
1379 <!--
1380 <para>
1381 <option>cgroup:rw</option>: similar to
1382 <option>cgroup:mixed</option>, but everything will
1383 be mounted read-write. Note that the paths leading
1384 up to the container's own cgroup will be writable,
1385 but will not be a cgroup filesystem but just part
1386 of the tmpfs of <filename>/sys/fs/cgroup</filename>
1387 </para>
1388 -->
1389 <para>
1390 <option>cgroup:rw</option>:
1391 <option>cgroup:mixed</option> と同様にマウントされますが、全て読み書き可能でマウントされます。
1392 コンテナ自身の cgroup に至るまでのパスも書き込み可能になることに注意が必要ですが、cgroup ファイルシステムにはならず、
1393 <filename>/sys/fs/cgroup</filename> の tmpfs の一部分になるでしょう。
1394 </para>
1395 </listitem>
1396 <listitem>
1397 <para>
1398 <!--
1399 <option>cgroup</option> (without specifier):
1400 defaults to <option>cgroup:rw</option> if the
1401 container retains the CAP_SYS_ADMIN capability,
1402 <option>cgroup:mixed</option> otherwise.
1403 -->
1404 <option>cgroup</option> (マウントオプションなしの場合):
1405 コンテナが CAP_SYS_ADMIN ケーパビリティを保持している場合、<option>cgroup:rw</option> となります。保持していない場合、<option>cgroup:mixed</option> となります。
1406 </para>
1407 </listitem>
1408 <listitem>
1409 <!--
1410 <para>
1411 <option>cgroup-full:mixed</option>:
1412 mount a tmpfs to <filename>/sys/fs/cgroup</filename>,
1413 create directories for all hierarchies to which
1414 the container is added, bind-mount the hierarchies
1415 from the host to the container and make everything
1416 read-only except the container's own cgroup. Note
1417 that compared to <option>cgroup</option>, where
1418 all paths leading up to the container's own cgroup
1419 are just simple directories in the underlying
1420 tmpfs, here
1421 <filename>/sys/fs/cgroup/$hierarchy</filename>
1422 will contain the host's full cgroup hierarchy,
1423 albeit read-only outside the container's own cgroup.
1424 This may leak quite a bit of information into the
1425 container.
1426 </para>
1427 -->
1428 <para>
1429 <option>cgroup-full:mixed</option>:
1430 <filename>/sys/fs/cgroup</filename> を tmpfs でマウントし、そのコンテナの追加が行われた全ての階層構造に対するディレクトリを作製し、ホストからコンテナまでの階層構造を全てバインドマウントし、コンテナ自身の cgroup を除いてリードオンリーにします。
1431 <option>cgroup</option> と比べると、コンテナ自身の cgroup に至るまでの全てのパスが tmpfs の下層のシンプルなディレクトリとなり、コンテナ自身の cgroup の外ではリードオンリーになりますが、<filename>/sys/fs/cgroup/$hierarchy</filename> はホストの全ての cgroup 階層構造を含みます。
1432 これにより、コンテナにはかなりの情報が漏洩します。
1433 </para>
1434 </listitem>
1435 <listitem>
1436 <!--
1437 <para>
1438 <option>cgroup-full:ro</option>: similar to
1439 <option>cgroup-full:mixed</option>, but everything
1440 will be mounted read-only.
1441 </para>
1442 -->
1443 <para>
1444 <option>cgroup-full:ro</option>:
1445 <option>cgroup-full:mixed</option> と同様にマウントされますが、全てリードオンリーでマウントされます。
1446 </para>
1447 </listitem>
1448 <listitem>
1449 <!--
1450 <para>
1451 <option>cgroup-full:rw</option>: similar to
1452 <option>cgroup-full:mixed</option>, but everything
1453 will be mounted read-write. Note that in this case,
1454 the container may escape its own cgroup. (Note also
1455 that if the container has CAP_SYS_ADMIN support
1456 and can mount the cgroup filesystem itself, it may
1457 do so anyway.)
1458 </para>
1459 -->
1460 <para>
1461 <option>cgroup-full:rw</option>:
1462 <option>cgroup-full:mixed</option>と同様にマウントされますが、全て読み書き可能でマウントされます。
1463 この場合、コンテナは自身の cgroup から脱出する可能性があることに注意してください (コンテナが CAP_SYS_ADMIN を持ち、自身で cgroup ファイルシステムをマウント可能なら、いずれにせよそのようにするかもしれないことにも注意してください)。
1464 </para>
1465 </listitem>
1466 <listitem>
1467 <para>
1468 <!--
1469 <option>cgroup-full</option> (without specifier):
1470 defaults to <option>cgroup-full:rw</option> if the
1471 container retains the CAP_SYS_ADMIN capability,
1472 <option>cgroup-full:mixed</option> otherwise.
1473 -->
1474 <option>cgroup-full</option> (マウントオプションなしの場合):
1475 コンテナが CAP_SYS_ADMIN ケーパビリティを保持している場合、<option>cgroup-full:rw</option> となります。保持していない場合、<option>cgroup-full:mixed</option> となります。
1476 </para>
1477 </listitem>
1478 </itemizedlist>
1479 <para>
1480 <!--
1481 If cgroup namespaces are enabled, then any <option>cgroup</option>
1482 auto-mounting request will be ignored, since the container can
1483 mount the filesystems itself, and automounting can confuse the
1484 container init.
1485 -->
1486 cgroup 名前空間が有効の場合、<option>cgroup</option> の自動マウントの指定はどれも無視されます。これは、コンテナが自身でファイルシステムをマウントするため、自動マウントがコンテナの init を混乱させる可能性があるためです。
1487 </para>
1488 <para>
1489 <!--
1490 Note that if automatic mounting of the cgroup filesystem
1491 is enabled, the tmpfs under
1492 <filename>/sys/fs/cgroup</filename> will always be
1493 mounted read-write (but for the <option>:mixed</option>
1494 and <option>:ro</option> cases, the individual
1495 hierarchies,
1496 <filename>/sys/fs/cgroup/$hierarchy</filename>, will be
1497 read-only). This is in order to work around a quirk in
1498 Ubuntu's
1499 <citerefentry>
1500 <refentrytitle>mountall</refentrytitle>
1501 <manvolnum>8</manvolnum>
1502 </citerefentry>
1503 command that will cause containers to wait for user
1504 input at boot if
1505 <filename>/sys/fs/cgroup</filename> is mounted read-only
1506 and the container can't remount it read-write due to a
1507 lack of CAP_SYS_ADMIN.
1508 -->
1509 cgroup ファイルシステムの自動マウントが有効の場合、<filename>/sys/fs/cgroup</filename> 以下の tmpfs は常に読み書き可能でマウントされることに注意が必要です (しかし <option>:mixed</option> と <option>:ro</option> の場合は、個々の階層の <filename>/sys/fs/cgroup/$hierarchy</filename> は読み込み専用となるでしょう)。これは Ubuntu の
1510 <citerefentry>
1511 <refentrytitle>mountall</refentrytitle>
1512 <manvolnum>8</manvolnum>
1513 </citerefentry>
1514 コマンドの特異な動きに対処するためのものです。特異な動きとは、<filename>/sys/fs/cgroup</filename> が読み込み専用でマウントされた状態で、コンテナが CAP_SYS_ADMIN を持たない場合、/sys/fs/cgroup を読み書き可能で再マウントしようとしてできないため、コンテナのブート時にユーザからの入力を待ってしまうというものです。
1515 </para>
1516 <para>
1517 <!--
1518 Examples:
1519 -->
1520 例:
1521 </para>
1522 <programlisting>
1523 lxc.mount.auto = proc sys cgroup
1524 lxc.mount.auto = proc:rw sys:rw cgroup-full:rw
1525 </programlisting>
1526 </listitem>
1527 </varlistentry>
1528
1529 </variablelist>
1530 </refsect2>
1531
1532 <refsect2>
1533 <title><!-- Root file system -->ルートファイルシステム</title>
1534 <para>
1535 <!--
1536 The root file system of the container can be different than that
1537 of the host system.
1538 -->
1539 コンテナのルートファイルシステムは、ホストのルートファイルシステムと異なるようにすることも可能です。
1540 </para>
1541 <variablelist>
1542 <varlistentry>
1543 <term>
1544 <option>lxc.rootfs.path</option>
1545 </term>
1546 <listitem>
1547 <para>
1548 <!--
1549 specify the root file system for the container. It can
1550 be an image file, a directory or a block device. If not
1551 specified, the container shares its root file system
1552 with the host.
1553 -->
1554 コンテナのルートファイルシステムを指定します。
1555 この値はイメージファイル、ディレクトリ、ブロックデバイスのどれかを取ることができます。
1556 もし指定されない場合、コンテナはホストとルートファイルシステムを共有します。
1557 </para>
1558 <para>
1559 <!--
1560 For directory or simple block-device backed containers,
1561 a pathname can be used. If the rootfs is backed by a nbd
1562 device, then <filename>nbd:file:1</filename> specifies that
1563 <filename>file</filename> should be attached to a nbd device,
1564 and partition 1 should be mounted as the rootfs.
1565 <filename>nbd:file</filename> specifies that the nbd device
1566 itself should be mounted. <filename>overlayfs:/lower:/upper</filename>
1567 specifies that the rootfs should be an overlay with <filename>/upper</filename>
1568 being mounted read-write over a read-only mount of <filename>/lower</filename>.
1569 <filename>aufs:/lower:/upper</filename> does the same using aufs in place
1570 of overlayfs. For both <filename>overlayfs</filename> and
1571 <filename>aufs</filename> multiple <filename>/lower</filename>
1572 directories can be specified. <filename>loop:/file</filename> tells lxc to attach
1573 <filename>/file</filename> to a loop device and mount the loop device.
1574 -->
1575 ディレクトリ、単純なブロックデバイスのバックエンドを持つコンテナの場合、パス名を使うことができます。
1576 もし rootfs が nbd デバイスの場合、<filename>nbd:file:1</filename> という指定は <filename>file</filename> を nbd デバイスとして使用し、その 1 番目のパーティションが rootfs としてマウントされます。
1577 <filename>nbd:file</filename> という指定は、nbd デバイス自身をマウントします。
1578 <filename>overlayfs:/lower:/upper</filename> という指定は、rootfs は <filename>/lower</filename> という読み込み専用でマウントされるディレクトリの上に、<filename>/upper</filename> というディレクトリを読み書き可能で重ね合わせてマウントします。
1579 <filename>aufs:/lower:/upper</filename> は overlayfs で指定している部分を aufs と指定すれば同じことになります。<filename>overlayfs</filename> と <filename>aufs</filename> は両方とも、複数の <filename>/lower</filename> ディレクトリを指定できます。
1580 <filename>loop:/file</filename> は <filename>/file</filename> を loop デバイスとして使用し、loop デバイスをマウントします。
1581 </para>
1582 </listitem>
1583 </varlistentry>
1584
1585 <varlistentry>
1586 <term>
1587 <option>lxc.rootfs.mount</option>
1588 </term>
1589 <listitem>
1590 <para>
1591 <!--
1592 where to recursively bind <option>lxc.rootfs.path</option>
1593 before pivoting. This is to ensure success of the
1594 <citerefentry>
1595 <refentrytitle><command>pivot_root</command></refentrytitle>
1596 <manvolnum>8</manvolnum>
1597 </citerefentry>
1598 syscall. Any directory suffices, the default should
1599 generally work.
1600 -->
1601 root ファイルシステムの変更の前に、<option>lxc.rootfs.path</option> を再帰的にどこにバインドするのかを指定します。これは
1602 <citerefentry>
1603 <refentrytitle><command>pivot_root</command></refentrytitle>
1604 <manvolnum>8</manvolnum>
1605 </citerefentry>
1606 システムコールが確実に成功する事を保証します。
1607 どんなディレクトリでも良く、デフォルトでも通常は動くはずです。
1608 </para>
1609 </listitem>
1610 </varlistentry>
1611
1612 <varlistentry>
1613 <term>
1614 <option>lxc.rootfs.options</option>
1615 </term>
1616 <listitem>
1617 <para>
1618 <!--
1619 extra mount options to use when mounting the rootfs.
1620 -->
1621 rootfs をマウントするときに追加したいマウントオプション。
1622 </para>
1623 </listitem>
1624 </varlistentry>
1625
1626 </variablelist>
1627 </refsect2>
1628
1629 <refsect2>
1630 <title>Control group</title>
1631 <para>
1632 <!--
1633 The control group section contains the configuration for the
1634 different subsystem. <command>lxc</command> does not check the
1635 correctness of the subsystem name. This has the disadvantage
1636 of not detecting configuration errors until the container is
1637 started, but has the advantage of permitting any future
1638 subsystem.
1639 -->
1640 CONTROL GROUP セクションは、(lxc とは) 別のサブシステムの設定を含みます。
1641 <command>lxc</command> は、このサブシステム名の正しさはチェックしません。
1642 実行時のエラーを検出するのに不便ですが、別の将来のサブシステムをサポート出来るという有利な点もあります。
1643 </para>
1644 <variablelist>
1645 <varlistentry>
1646 <term>
1647 <option>lxc.cgroup.[subsystem name]</option>
1648 </term>
1649 <listitem>
1650 <para>
1651 <!--
1652 specify the control group value to be set. The
1653 subsystem name is the literal name of the control group
1654 subsystem. The permitted names and the syntax of their
1655 values is not dictated by LXC, instead it depends on the
1656 features of the Linux kernel running at the time the
1657 container is started,
1658 eg. <option>lxc.cgroup.cpuset.cpus</option>
1659 -->
1660 設定する control group の値を指定します。
1661 サブシステム名は、control group のそのままの名前です。
1662 許される名前や値の書式は LXC が指示することはなく、コンテナが実行された時に実行されている Linux カーネルの機能に依存します。
1663 例えば <option>lxc.cgroup.cpuset.cpus</option>
1664 </para>
1665 </listitem>
1666 </varlistentry>
1667 <varlistentry>
1668 <term>
1669 <option>lxc.cgroup.dir</option>
1670 </term>
1671 <listitem>
1672 <para>
1673 <!--
1674 specify a directory or path in which the container's cgroup will
1675 be created. For example, setting
1676 <option>lxc.cgroup.dir = my-cgroup/first</option> for a container
1677 named "c1" will create the container's cgroup as a sub-cgroup of
1678 "my-cgroup". For example, if the user's current cgroup "my-user"
1679 is located in the root cgroup of the cpuset controllerin in a
1680 cgroup v1 hierarchy this would create the cgroup
1681 "/sys/fs/cgroup/cpuset/my-user/my-cgroup/first/c1" for the
1682 container. Any missing cgroups will be created by LXC. This
1683 presupposes that the user has write access to its current cgroup.
1684 -->
1685 コンテナの cgroup を作成するパスやディレクトリを指定します。
1686 例えば、"c1" という名前のコンテナで <option>lxc.cgroup.dir = my-cgroup/first</option> のように設定すると、"my-cgroup" のサブ cgroup のようにコンテナの cgroup を作成します。
1687 例えば、ユーザのカレントの cgroup である "my-user" が cgroup v1 階層にある cpuset コントローラの root cgroup 内に存在する場合、この設定は "/sys/fs/cgroup/cpuset/my-user/my-cgroup/first/c1" という cgroup をこのコンテナ向けに作成します。
1688 存在しない cgroup は LXC が作成しますが、ユーザがカレントの cgroup に書き込み権を持っていることが前提となります。
1689 </para>
1690 </listitem>
1691 </varlistentry>
1692 </variablelist>
1693 </refsect2>
1694
1695 <refsect2>
1696 <title><!-- Capabilities -->ケーパビリティ</title>
1697 <para>
1698 <!--
1699 The capabilities can be dropped in the container if this one
1700 is run as root.
1701 -->
1702 コンテナが root 権限で実行されていても、コンテナ内ではケーパビリティ (capabilities) を削除する事は可能です。
1703 </para>
1704 <variablelist>
1705 <varlistentry>
1706 <term>
1707 <option>lxc.cap.drop</option>
1708 </term>
1709 <listitem>
1710 <para>
1711 <!--
1712 Specify the capability to be dropped in the container. A
1713 single line defining several capabilities with a space
1714 separation is allowed. The format is the lower case of
1715 the capability definition without the "CAP_" prefix,
1716 eg. CAP_SYS_MODULE should be specified as
1717 sys_module. See
1718 <citerefentry>
1719 <refentrytitle><command>capabilities</command></refentrytitle>
1720 <manvolnum>7</manvolnum>
1721 </citerefentry>,
1722 If used with no value, lxc will clear any drop capabilities
1723 specified up to this point.
1724 -->
1725 コンテナ内で削除するケーパビリティ (capability) を指定します。
1726 一行でスペース区切りで複数のケーパビリティを指定することも可能です。
1727 指定は、"CAP_" というプレフィックスなしで、小文字でケーパビリティを指定します。
1728 例えば、CAP_SYS_MODULE というケーパビリティは sys_module と指定する必要があります。
1729 詳しくは以下を参照してください。
1730 <citerefentry>
1731 <refentrytitle><command>capabilities</command></refentrytitle>
1732 <manvolnum>7</manvolnum>
1733 </citerefentry>
1734 この設定を、値を指定しない状態で使った場合、それ以前に指定された削除対象のケーパビリティの指定をすべてクリアします (lxc.cap.drop に何も指定しない状態になります)。
1735 </para>
1736 </listitem>
1737 </varlistentry>
1738 <varlistentry>
1739 <term>
1740 <option>lxc.cap.keep</option>
1741 </term>
1742 <listitem>
1743 <para>
1744 <!--
1745 Specify the capability to be kept in the container. All other
1746 capabilities will be dropped. When a special value of "none" is
1747 encountered, lxc will clear any keep capabilities specified up
1748 to this point. A value of "none" alone can be used to drop all
1749 capabilities.
1750 -->
1751 コンテナ内で維持するケーパビリティを指定します。指定した以外の全てのケーパビリティはドロップされます。
1752 特別な値 "none" が指定されている時点で、lxc はこの時点で保持することになっている全てのケーパビリティをクリアします。"none" を単独で使用するとすべてのケーパビリティを削除できます。
1753 </para>
1754 </listitem>
1755 </varlistentry>
1756 </variablelist>
1757 </refsect2>
1758
1759 <refsect2>
1760 <title>リソース制限 <!-- Resource limits --></title>
1761 <para>
1762 <!--
1763 The soft and hard resource limits for the container can be changed.
1764 Unprivileged containers can only lower them. Resources which are not
1765 explicitly specified will be inherited.
1766 -->
1767 コンテナに対するソフトもしくはハードリミットを変更できます。非特権コンテナでは、制限を下げることしかできません。明示的に指定されていないリソースは継承されます。
1768 </para>
1769 <variablelist>
1770 <varlistentry>
1771 <term>
1772 <option>lxc.prlimit.[limit name]</option>
1773 </term>
1774 <listitem>
1775 <para>
1776 <!--
1777 Specify the resource limit to be set. A limit is specified as two
1778 colon separated values which are either numeric or the word
1779 'unlimited'. A single value can be used as a shortcut to set both
1780 soft and hard limit to the same value. The permitted names the
1781 "RLIMIT_" resource names in lowercase without the "RLIMIT_"
1782 prefix, eg. RLIMIT_NOFILE should be specified as "nofile". See
1783 <citerefentry>
1784 <refentrytitle><command>setrlimit</command></refentrytitle>
1785 <manvolnum>2</manvolnum>
1786 </citerefentry>.
1787 If used with no value, lxc will clear the resource limit
1788 specified up to this point. A resource with no explicitly
1789 configured limitation will be inherited from the process starting
1790 up the container.
1791 -->
1792 設定したいリソースと制限値を指定します。制限値はコロンで区切られた 2 つの値で指定します。値は数値もしくは 'unlimited' で指定します。ソフトもハードも同じ値を指定する場合は単一の値を指定できます。指定できる名前は、"RLIMIT_" 接頭辞がなく小文字で書かれた、"RLIMIT_" リソース名です。例えば、RLIMIT_NOFILE は "nofile" と指定します。詳しくは
1793 <citerefentry>
1794 <refentrytitle><command>setrlimit</command></refentrytitle>
1795 <manvolnum>2</manvolnum>
1796 </citerefentry> を参照してください。
1797 値を指定せずに使用した場合、lxc はこの指定以前に設定されたリソース制限をクリアします。明示的に制限が設定されていないリソースについては、コンテナを起動したプロセスから継承します。
1798 </para>
1799 </listitem>
1800 </varlistentry>
1801 </variablelist>
1802 </refsect2>
1803
1804 <refsect2>
1805 <title><!-- Apparmor profile -->Apparmor プロファイル</title>
1806 <para>
1807 <!--
1808 If lxc was compiled and installed with apparmor support, and the host
1809 system has apparmor enabled, then the apparmor profile under which the
1810 container should be run can be specified in the container
1811 configuration. The default is <command>lxc-container-default-cgns</command>
1812 if the host kernel is cgroup namespace aware, or
1813 <command>lxc-container-default</command> othewise.
1814 -->
1815 lxc が apparmor サポートでコンパイルされ、インストールされている場合で、ホストで apparmor が有効な場合、コンテナが従って動くべき apparmor プロファイルは、コンテナの設定で指定することが可能です。
1816 デフォルトは、ホストのカーネルで cgroup 名前空間が使える場合は <command>lxc-container-default-cgns</command>です。使えない場合は <command>lxc-container-default</command> です。
1817 </para>
1818 <variablelist>
1819 <varlistentry>
1820 <term>
1821 <option>lxc.apparmor.profile</option>
1822 </term>
1823 <listitem>
1824 <para>
1825 <!--
1826 Specify the apparmor profile under which the container should
1827 be run. To specify that the container should be unconfined,
1828 use
1829 -->
1830 コンテナが従うべき apparmor プロファイルを指定します。
1831 コンテナが apparmor による制限を受けないように設定するには、以下のように設定します。
1832 </para>
1833 <programlisting>lxc.apparmor.profile = unconfined</programlisting>
1834 <para>
1835 <!--
1836 If the apparmor profile should remain unchanged (i.e. if you
1837 are nesting containers and are already confined), then use
1838 -->
1839 もし apparmor プロファイルが変更されないままでなくてはならない場合 (ネストしたコンテナである場合や、すでに confined されている場合) は以下のように設定します。
1840 </para>
1841 <programlisting>lxc.apparmor.profile = unchanged</programlisting>
1842 </listitem>
1843 </varlistentry>
1844 <varlistentry>
1845 <term>
1846 <option>lxc.apparmor.allow_incomplete</option>
1847 </term>
1848 <listitem>
1849 <para>
1850 <!--
1851 Apparmor profiles are pathname based. Therefore many file
1852 restrictions require mount restrictions to be effective against
1853 a determined attacker. However, these mount restrictions are not
1854 yet implemented in the upstream kernel. Without the mount
1855 restrictions, the apparmor profiles still protect against accidental
1856 damager.
1857 -->
1858 apparmor プロファイルはパス名ベースですので、多数のファイルの制限を行う際、執念深い攻撃者に対して効果的であるためにはマウントの制限が必要です。
1859 しかし、これらのマウントの制限は upstream のカーネルではまだ実装されていません。マウントの制限なしでも、apparmor プロファイルによって予想外のダメージに対する保護が可能です。
1860 </para>
1861 <para>
1862 <!--
1863 If this flag is 0 (default), then the container will not be
1864 started if the kernel lacks the apparmor mount features, so that a
1865 regression after a kernel upgrade will be detected. To start the
1866 container under partial apparmor protection, set this flag to 1.
1867 -->
1868 このフラグが 0 の場合 (デフォルト)、カーネルが apparmor のマウント機能をサポートしていない場合にコンテナが起動しません。これはカーネルを更新した後に機能が退行したことが検出できるようにするためです。
1869 不完全な apparmor の保護の下でコンテナを起動するためには、このフラグを 1 に設定してください。
1870 </para>
1871 </listitem>
1872 </varlistentry>
1873 </variablelist>
1874 </refsect2>
1875
1876 <refsect2>
1877 <title><!-- SELinux context -->SELinux コンテキスト</title>
1878 <para>
1879 <!--
1880 If lxc was compiled and installed with SELinux support, and the host
1881 system has SELinux enabled, then the SELinux context under which the
1882 container should be run can be specified in the container
1883 configuration. The default is <command>unconfined_t</command>,
1884 which means that lxc will not attempt to change contexts.
1885 See @DATADIR@/lxc/selinux/lxc.te for an example policy and more
1886 information.
1887 -->
1888 lxc が SELinux サポートでコンパイルされ、インストールされている場合で、ホストで SELinux が有効な場合、コンテナが従って動くべき SELinux コンテキストは、コンテナの設定で指定することが可能です。
1889 デフォルトは <command>unconfined_t</command> であり、これは lxc がコンテキストを変えないという意味になります。
1890 ポリシーの例と追加の情報は @DATADIR@/lxc/selinux/lxc.te ファイルを参照してください。
1891 </para>
1892 <variablelist>
1893 <varlistentry>
1894 <term>
1895 <option>lxc.selinux.context</option>
1896 </term>
1897 <listitem>
1898 <para>
1899 <!--
1900 Specify the SELinux context under which the container should
1901 be run or <command>unconfined_t</command>. For example
1902 -->
1903 コンテナが従うべき SELinux コンテキストを指定するか、<command>unconfined_t</command> を指定します。例えば以下のように設定します。
1904 </para>
1905 <programlisting>lxc.selinux.context = system_u:system_r:lxc_t:s0:c22</programlisting>
1906 </listitem>
1907 </varlistentry>
1908 </variablelist>
1909 </refsect2>
1910
1911 <refsect2>
1912 <title><!-- Seccomp configuration -->Seccomp の設定</title>
1913 <para>
1914 <!--
1915 A container can be started with a reduced set of available
1916 system calls by loading a seccomp profile at startup. The
1917 seccomp configuration file must begin with a version number
1918 on the first line, a policy type on the second line, followed
1919 by the configuration.
1920 -->
1921 コンテナは、起動時に seccomp プロファイルをロードすることで、利用可能なシステムコールを減らして起動することが可能です。
1922 seccomp の設定ファイルは、1 行目がバージョン番号、2 行目がポリシーのタイプで始まる必要があり、その後に設定を書きます。
1923 </para>
1924 <para>
1925 <!--
1926 Versions 1 and 2 are currently supported. In version 1, the
1927 policy is a simple whitelist. The second line therefore must
1928 read "whitelist", with the rest of the file containing one (numeric)
1929 sycall number per line. Each syscall number is whitelisted,
1930 while every unlisted number is blacklisted for use in the container
1931 -->
1932 現時点では、バージョン番号は 1 と 2 をサポートしています。バージョン 1 では、ポリシーはシンプルなホワイトリストですので、2 行目は "whitelist" でなければなりません。
1933 そして残りの行には 1 行に 1 つずつ、システムコール番号を書きます。各行のシステムコール番号がホワイトリスト化され、リストにない番号は、そのコンテナではブラックリストに入ります。
1934 </para>
1935
1936 <para>
1937 <!--
1938 In version 2, the policy may be blacklist or whitelist,
1939 supports per-rule and per-policy default actions, and supports
1940 per-architecture system call resolution from textual names.
1941 -->
1942 バージョン 2 では、ポリシーはブラックリストもしくはホワイトリストで表され、ルールごとのアクションと、ポリシーごとのデフォルトのアクションを設定できます。そして、アーキテクチャごとの設定と、テキストで書かれたシステムコール名での設定が可能です。
1943 </para>
1944 <para>
1945 <!--
1946 An example blacklist policy, in which all system calls are
1947 allowed except for mknod, which will simply do nothing and
1948 return 0 (success), looks like:
1949 -->
1950 以下にブラックリストのポリシーの例を示します。これは mknod 以外の全てのシステムコールが許可され、mknod が呼ばれると、何もせずに単に 0(成功) を返します。
1951 </para>
1952
1953 <programlisting>
1954 2
1955 blacklist
1956 mknod errno 0
1957 </programlisting>
1958
1959 <variablelist>
1960 <varlistentry>
1961 <term>
1962 <option>lxc.seccomp.profile</option>
1963 </term>
1964 <listitem>
1965 <para>
1966 <!--
1967 Specify a file containing the seccomp configuration to
1968 load before the container starts.
1969 -->
1970 コンテナがスタートする前にロードする seccomp の設定を含むファイルを指定します。
1971 </para>
1972 </listitem>
1973 </varlistentry>
1974 </variablelist>
1975 </refsect2>
1976
1977 <refsect2>
1978 <title>PR_SET_NO_NEW_PRIVS</title>
1979 <para>
1980 <!--
1981 With PR_SET_NO_NEW_PRIVS active execve() promises not to grant
1982 privileges to do anything that could not have been done without
1983 the execve() call (for example, rendering the set-user-ID and
1984 set-group-ID mode bits, and file capabilities non-functional).
1985 Once set, this bit cannot be unset. The setting of this bit is
1986 inherited by children created by fork() and clone(), and preserved
1987 across execve().
1988 Note that PR_SET_NO_NEW_PRIVS is applied after the container has
1989 changed into its intended AppArmor profile or SElinux context.
1990 -->
1991 PR_SET_NO_NEW_PRIVS を付与すると、対象の execve() は、execve() の呼び出しなしでは実行できなかったことに対する特権を許可しなくなります (例えば、set-user-ID、set-group-ID 許可ビットや、ファイルケーパビリティが動作しなくなります)。
1992 一度設定されると、このビットは解除できません。このビットの設定は fork() や clone() で生成される子プロセスにも継承され、execve() の前後で保持されます。
1993 PR_SET_NO_NEW_PRIVS は、コンテナに適用しようとする AppArmor プロファイルもしくは SELinux コンテキストへの変更がなされたあとに適用されます。
1994 </para>
1995 <variablelist>
1996 <varlistentry>
1997 <term>
1998 <option>lxc.no_new_privs</option>
1999 </term>
2000 <listitem>
2001 <para>
2002 <!--
2003 Specify whether the PR_SET_NO_NEW_PRIVS flag should be set for the
2004 container. Set to 1 to activate.
2005 -->
2006 コンテナに対して PR_SET_NO_NEW_PRIVS ビットを設定するかどうかを指定します。1 に設定すると有効になります。
2007 </para>
2008 </listitem>
2009 </varlistentry>
2010 </variablelist>
2011 </refsect2>
2012
2013 <refsect2>
2014 <title><!-- UID mappings -->UID のマッピング</title>
2015 <para>
2016 <!--
2017 A container can be started in a private user namespace with
2018 user and group id mappings. For instance, you can map userid
2019 0 in the container to userid 200000 on the host. The root
2020 user in the container will be privileged in the container,
2021 but unprivileged on the host. Normally a system container
2022 will want a range of ids, so you would map, for instance,
2023 user and group ids 0 through 20,000 in the container to the
2024 ids 200,000 through 220,000.
2025 -->
2026 コンテナは、ユーザとグループの id のマッピングを持った専用のユーザ名前空間で起動することが可能です。
2027 たとえば、コンテナ内のユーザ id 0 を、ホストのユーザ id 200000 にマッピングすることが可能です。
2028 コンテナの root ユーザはコンテナ内では特権を持ちますが、ホストでは特権を持ちません。
2029 通常は、システムコンテナは id の範囲を要求し、それをマッピングします。
2030 例えば、コンテナ内のユーザとグループの id 0 から 20,000 を 200,000 から 220,000 にマッピングします。
2031 </para>
2032 <variablelist>
2033 <varlistentry>
2034 <term>
2035 <option>lxc.idmap</option>
2036 </term>
2037 <listitem>
2038 <para>
2039 <!--
2040 Four values must be provided. First a character, either
2041 'u', or 'g', to specify whether user or group ids are
2042 being mapped. Next is the first userid as seen in the
2043 user namespace of the container. Next is the userid as
2044 seen on the host. Finally, a range indicating the number
2045 of consecutive ids to map.
2046 -->
2047 4 つの値を記述する必要があります。
2048 最初の文字は 'u' か 'g' のどちらかで、ユーザかグループの ID のどちらをマッピングするかを指定します。
2049 次はコンテナのユーザ名前空間内に現れる最初のユーザ ID です。
2050 その次は、そのユーザ ID のホスト上での値です。
2051 最後は、ID のマッピングをいくつ連続して行うかの数を指定します。
2052 </para>
2053 </listitem>
2054 </varlistentry>
2055 </variablelist>
2056 </refsect2>
2057
2058 <refsect2>
2059 <title><!-- Container hooks -->コンテナのフック</title>
2060 <para>
2061 <!--
2062 Container hooks are programs or scripts which can be executed
2063 at various times in a container's lifetime.
2064 -->
2065 コンテナのフックは、コンテナの存続期間の色々な場面で実行することのできるプログラムやスクリプトです。
2066 </para>
2067 <para>
2068 <!--
2069 When a container hook is executed, information is passed both
2070 as command line arguments and through environment variables.
2071 The arguments are:
2072 <itemizedlist>
2073 <listitem><para> Container name. </para></listitem>
2074 <listitem><para> Section (always 'lxc'). </para></listitem>
2075 <listitem><para> The hook type (i.e. 'clone' or 'pre-mount'). </para></listitem>
2076 <listitem><para> Additional arguments. In the
2077 case of the clone hook, any extra arguments passed to
2078 lxc-clone will appear as further arguments to the hook.
2079 In the case of the stop hook, paths to filedescriptors
2080 for each of the container's namespaces along with their types
2081 are passed. </para></listitem>
2082 </itemizedlist>
2083 The following environment variables are set:
2084 <itemizedlist>
2085 <listitem><para> LXC_NAME: is the container's name. </para></listitem>
2086 <listitem><para> LXC_ROOTFS_MOUNT: the path to the mounted root filesystem. </para></listitem>
2087 <listitem><para> LXC_CONFIG_FILE: the path to the container configuration file. </para></listitem>
2088 <listitem><para> LXC_SRC_NAME: in the case of the clone hook, this is the original container's name. </para></listitem>
2089 <listitem><para> LXC_ROOTFS_PATH: this is the lxc.rootfs.path 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>
2090 </itemizedlist>
2091 -->
2092 コンテナのフックが実行されるとき、情報がコマンドライン引数と環境変数の両方を通して渡されます。引数は:
2093 <itemizedlist>
2094 <listitem><para>コンテナ名</para></listitem>
2095 <listitem><para>セクション (常に 'lxc')</para></listitem>
2096 <listitem><para>フックのタイプ ('clone' や 'pre-mount' など)</para></listitem>
2097 <listitem><para>追加の引数。clone フックの場合、lxc-clone に渡される追加の引数は、フックへの引数として追加されます。stop フックの場合は、コンテナの名前空間のそれぞれに対するファイルディスクリプタへのパスが、名前空間名とともに渡されます。</para></listitem>
2098 </itemizedlist>
2099 以下の環境変数がセットされます。
2100 <itemizedlist>
2101 <listitem><para> LXC_NAME: コンテナ名</para></listitem>
2102 <listitem><para> LXC_ROOTFS_MOUNT: マウントされた root ファイルシステムへのパス</para></listitem>
2103 <listitem><para> LXC_CONFIG_FILE: コンテナの設定ファイルのパス </para></listitem>
2104 <listitem><para> LXC_SRC_NAME: clone フックの場合、元のコンテナの名前</para></listitem>
2105 <listitem><para> LXC_ROOTFS_PATH: コンテナの lxc.rootfs.path エントリ。これはマウントされた rootfs が存在する場所にはならないでしょう。それには LXC_ROOTFS_MOUNT を使用してください。</para></listitem>
2106 </itemizedlist>
2107 </para>
2108 <para>
2109 <!--
2110 Standard output from the hooks is logged at debug level.
2111 Standard error is not logged, but can be captured by the
2112 hook redirecting its standard error to standard output.
2113 -->
2114 スクリプトからの標準出力は debug レベルでロギングされます。
2115 標準エラー出力はロギングされません。
2116 しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
2117 </para>
2118 <variablelist>
2119 <varlistentry>
2120 <term>
2121 <option>lxc.hook.pre-start</option>
2122 </term>
2123 <listitem>
2124 <para>
2125 <!--
2126 A hook to be run in the host's namespace before the
2127 container ttys, consoles, or mounts are up.
2128 -->
2129 コンテナの tty、コンソールの作成、マウントが実行される前に、ホストの名前空間内で実行するフック。
2130 </para>
2131 </listitem>
2132 </varlistentry>
2133 </variablelist>
2134 <variablelist>
2135 <varlistentry>
2136 <term>
2137 <option>lxc.hook.pre-mount</option>
2138 </term>
2139 <listitem>
2140 <para>
2141 <!--
2142 A hook to be run in the container's fs namespace but before
2143 the rootfs has been set up. This allows for manipulation
2144 of the rootfs, i.e. to mount an encrypted filesystem. Mounts
2145 done in this hook will not be reflected on the host (apart from
2146 mounts propagation), so they will be automatically cleaned up
2147 when the container shuts down.
2148 -->
2149 コンテナのファイルシステムの名前空間で実行されますが、rootfs が設定される前に実行するフック。
2150 これにより rootfs の操作が可能になります。
2151 例えば、暗号化されたファイルシステムのマウントなどです。
2152 このフック内でなされるマウントはホストには影響しません (mounts propagation を除いて)。
2153 なので、それらはコンテナがシャットダウンする時に自動的にクリーンアップされます。
2154 </para>
2155 </listitem>
2156 </varlistentry>
2157 </variablelist>
2158 <variablelist>
2159 <varlistentry>
2160 <term>
2161 <option>lxc.hook.mount</option>
2162 </term>
2163 <listitem>
2164 <para>
2165 <!--
2166 A hook to be run in the container's namespace after
2167 mounting has been done, but before the pivot_root.
2168 -->
2169 マウントが完了した後ですが、pivot_root の前にコンテナの名前空間で実行されるフック。
2170 </para>
2171 </listitem>
2172 </varlistentry>
2173 </variablelist>
2174 <variablelist>
2175 <varlistentry>
2176 <term>
2177 <option>lxc.hook.autodev</option>
2178 </term>
2179 <listitem>
2180 <para>
2181 <!--
2182 A hook to be run in the container's namespace after
2183 mounting has been done and after any mount hooks have
2184 run, but before the pivot_root, if
2185 <option>lxc.autodev</option> == 1.
2186 The purpose of this hook is to assist in populating the
2187 /dev directory of the container when using the autodev
2188 option for systemd based containers. The container's /dev
2189 directory is relative to the
2190 ${<option>LXC_ROOTFS_MOUNT</option>} environment
2191 variable available when the hook is run.
2192 -->
2193 <option>lxc.autodev</option> == 1 が設定されている場合で、マウントが完了し、マウント時のフックも実行された後ですが、pivot_root の前にコンテナの名前空間で実行するフック。
2194 このフックの目的は、systemd ベースのコンテナ向けの autodev オプションが設定されている時に、コンテナの /dev ディレクトリを設定するのを支援することです。コンテナの /dev ディレクトリは、このフックが実行される時有効な ${<option>LXC_ROOTFS_MOUNT</option>} 環境変数からの相対パスとなります。
2195 </para>
2196 </listitem>
2197 </varlistentry>
2198 </variablelist>
2199 <variablelist>
2200 <varlistentry>
2201 <term>
2202 <option>lxc.hook.start-host</option>
2203 </term>
2204 <listitem>
2205 <para>
2206 <!--
2207 A hook to be run in the host's namespace after the
2208 container has been setup, and immediately before starting
2209 the container init.
2210 -->
2211 コンテナのセットアップが済んだあと、コンテナの init を実行する直前に、ホストの名前空間で実行するためのフックです。
2212 </para>
2213 </listitem>
2214 </varlistentry>
2215 </variablelist>
2216 <variablelist>
2217 <varlistentry>
2218 <term>
2219 <option>lxc.hook.start</option>
2220 </term>
2221 <listitem>
2222 <para>
2223 <!--
2224 A hook to be run in the container's namespace immediately
2225 before executing the container's init. This requires the
2226 program to be available in the container.
2227 -->
2228 コンテナの init が実行される直前にコンテナの名前空間で実行されるフック。
2229 コンテナ内で利用可能なプログラムである必要があります。
2230 </para>
2231 </listitem>
2232 </varlistentry>
2233 </variablelist>
2234 <variablelist>
2235 <varlistentry>
2236 <term>
2237 <option>lxc.hook.stop</option>
2238 </term>
2239 <listitem>
2240 <para>
2241 <!--
2242 A hook to be run in the host's namespace with references
2243 to the container's namespaces after the container has been shut
2244 down. For each namespace an extra argument is passed to the hook
2245 containing the namespace's type and a filename that can be used to
2246 obtain a file descriptor to the corresponding namespace, separated
2247 by a colon. The type is the name as it would appear in the
2248 <filename>/proc/PID/ns</filename> directory.
2249 For instance for the mount namespace the argument usually looks
2250 like <filename>mnt:/proc/PID/fd/12</filename>.
2251 -->
2252 コンテナのシャットダウン後、コンテナの名前空間への参照とともに、ホストの名前空間で実行されるフックです。
2253 それぞれの名前空間に対応する追加の引数がフックに渡されます。その引数にはコロンで区切られた名前空間のタイプ名とファイル名が含まれており、ファイル名は名前空間に対するファイルディスクリプタを取得するのに使えます。
2254 タイプ名は <filename>/proc/PID/ns</filename> ディレクトリ内のファイル名です。
2255 例えば、マウント名前空間に対応する引数は通常は <filename>mnt:/proc/PID/fd/12</filename> のようになります。
2256 </para>
2257 </listitem>
2258 </varlistentry>
2259 </variablelist>
2260 <variablelist>
2261 <varlistentry>
2262 <term>
2263 <option>lxc.hook.post-stop</option>
2264 </term>
2265 <listitem>
2266 <para>
2267 <!--
2268 A hook to be run in the host's namespace after the
2269 container has been shut down.
2270 -->
2271 コンテナがシャットダウンされた後にホストの名前空間で実行するフック。
2272 </para>
2273 </listitem>
2274 </varlistentry>
2275 </variablelist>
2276 <variablelist>
2277 <varlistentry>
2278 <term>
2279 <option>lxc.hook.clone</option>
2280 </term>
2281 <listitem>
2282 <para>
2283 <!--
2284 A hook to be run when the container is cloned to a new one.
2285 See <citerefentry><refentrytitle><command>lxc-clone</command></refentrytitle>
2286 <manvolnum>1</manvolnum></citerefentry> for more information.
2287 -->
2288 コンテナが新しいコンテナにクローンされる際に実行されるフック。詳しくは
2289 <citerefentry><refentrytitle><command>lxc-clone</command></refentrytitle>
2290 <manvolnum>1</manvolnum></citerefentry>
2291 を参照してください。
2292 </para>
2293 </listitem>
2294 </varlistentry>
2295 </variablelist>
2296 <variablelist>
2297 <varlistentry>
2298 <term>
2299 <option>lxc.hook.destroy</option>
2300 </term>
2301 <listitem>
2302 <para>
2303 <!--
2304 A hook to be run when the container is destroyed.
2305 -->
2306 コンテナを破壊する際に実行されるフックです。
2307 </para>
2308 </listitem>
2309 </varlistentry>
2310 </variablelist>
2311 </refsect2>
2312
2313 <refsect2>
2314 <title><!-- Container hooks Environment Variables -->コンテナのフックで使える環境変数</title>
2315 <para>
2316 <!--
2317 A number of environment variables are made available to the startup
2318 hooks to provide configuration information and assist in the
2319 functioning of the hooks. Not all variables are valid in all
2320 contexts. In particular, all paths are relative to the host system
2321 and, as such, not valid during the <option>lxc.hook.start</option> hook.
2322 -->
2323 起動時のフックに設定情報を提供し、フックの機能を助けるための環境変数がいくつか利用可能です。
2324 全ての変数が全てのコンテキストで利用可能なわけではありません。
2325 具体的には、全てのパスはホストシステム上のパスであり、そのため、<option>lxc.hook.start</option> フックの時点では使用できません。
2326 </para>
2327 <variablelist>
2328 <varlistentry>
2329 <term>
2330 <option>LXC_NAME</option>
2331 </term>
2332 <listitem>
2333 <para>
2334 <!--
2335 The LXC name of the container. Useful for logging messages
2336 in common log environments. [<option>-n</option>]
2337 -->
2338 LXC コンテナの名前。共通のログ環境内でのログメッセージに使うときに便利です。[<option>-n</option>]
2339 </para>
2340 </listitem>
2341 </varlistentry>
2342 </variablelist>
2343 <variablelist>
2344 <varlistentry>
2345 <term>
2346 <option>LXC_CONFIG_FILE</option>
2347 </term>
2348 <listitem>
2349 <para>
2350 <!--
2351 Host relative path to the container configuration file. This
2352 gives the container to reference the original, top level,
2353 configuration file for the container in order to locate any
2354 additional configuration information not otherwise made
2355 available. [<option>-f</option>]
2356 -->
2357 コンテナの設定ファイルのホスト上でのパス。
2358 これは、他の方法では得られない追加の設定情報を見つけるために、コンテナに、元の、トップレベルの設定ファイルの位置を与えるものです。 [<option>-f</option>]
2359 </para>
2360 </listitem>
2361 </varlistentry>
2362 </variablelist>
2363 <variablelist>
2364 <varlistentry>
2365 <term>
2366 <option>LXC_CONSOLE</option>
2367 </term>
2368 <listitem>
2369 <para>
2370 <!--
2371 The path to the console output of the container if not NULL.
2372 [<option>-c</option>] [<option>lxc.console.path</option>]
2373 -->
2374 設定されている場合のコンテナのコンソール出力のパス。
2375 [<option>-c</option>] [<option>lxc.console.path</option>]
2376 </para>
2377 </listitem>
2378 </varlistentry>
2379 </variablelist>
2380 <variablelist>
2381 <varlistentry>
2382 <term>
2383 <option>LXC_CONSOLE_LOGPATH</option>
2384 </term>
2385 <listitem>
2386 <para>
2387 <!--
2388 The path to the console log output of the container if not NULL.
2389 [<option>-L</option>]
2390 -->
2391 設定されている場合のコンテナのコンソールログ出力のパス。
2392 [<option>-L</option>]
2393 </para>
2394 </listitem>
2395 </varlistentry>
2396 </variablelist>
2397 <variablelist>
2398 <varlistentry>
2399 <term>
2400 <option>LXC_ROOTFS_MOUNT</option>
2401 </term>
2402 <listitem>
2403 <para>
2404 <!--
2405 The mount location to which the container is initially bound.
2406 This will be the host relative path to the container rootfs
2407 for the container instance being started and is where changes
2408 should be made for that instance.
2409 [<option>lxc.rootfs.mount</option>]
2410 -->
2411 初期にコンテナがマウントされる場所。
2412 これは、コンテナインスタンスが起動するためのコンテナの rootfs へのホスト上のパスであり、インスタンスのための移行が行われる場所です。
2413 [<option>lxc.rootfs.mount</option>]
2414 </para>
2415 </listitem>
2416 </varlistentry>
2417 </variablelist>
2418 <variablelist>
2419 <varlistentry>
2420 <term>
2421 <option>LXC_ROOTFS_PATH</option>
2422 </term>
2423 <listitem>
2424 <para>
2425 <!--
2426 The host relative path to the container root which has been
2427 mounted to the rootfs.mount location.
2428 [<option>lxc.rootfs.path</option>]
2429 -->
2430 rootfs.mount へマウントされるコンテナのルートへのホスト上のパスです。
2431 [<option>lxc.rootfs.path</option>]
2432 </para>
2433 </listitem>
2434 </varlistentry>
2435 </variablelist>
2436 <variablelist>
2437 <varlistentry>
2438 <term>
2439 <option>LXC_SRC_NAME</option>
2440 </term>
2441 <listitem>
2442 <para>
2443 <!--
2444 Only for the clone hook. Is set to the original container name.
2445 -->
2446 clone フックの場合のみ使われます。クローン元のコンテナ名が設定されます。
2447 </para>
2448 </listitem>
2449 </varlistentry>
2450 </variablelist>
2451 <variablelist>
2452 <varlistentry>
2453 <term>
2454 <option>LXC_TARGET</option>
2455 </term>
2456 <listitem>
2457 <para>
2458 <!--
2459 Only for the stop hook. Is set to "stop" for a container
2460 shutdown or "reboot" for a container reboot.
2461 -->
2462 stop フックの場合のみ使われます。コンテナのシャットダウンの場合は "stop"、リブートの場合は "reboot" が設定されます。
2463 </para>
2464 </listitem>
2465 </varlistentry>
2466 </variablelist>
2467 <variablelist>
2468 <varlistentry>
2469 <term>
2470 <option>LXC_CGNS_AWARE</option>
2471 </term>
2472 <listitem>
2473 <para>
2474 <!--
2475 If unset, then this version of lxc is not aware of cgroup
2476 namespaces. If set, it will be set to 1, and lxc is aware
2477 of cgroup namespaces. Note this does not guarantee that
2478 cgroup namespaces are enabled in the kernel. This is used
2479 by the lxcfs mount hook.
2480 -->
2481 この変数が設定されていない場合、お使いのバージョンの LXC は cgroup 名前空間を扱えません。設定されている場合、この値は 1 に設定されています。そして、cgroup 名前空間を扱えます。
2482 この変数はカーネルで cgroup 名前空間が有効であることは保証しません。この変数は lxcfs のマウントフックが使います。
2483 </para>
2484 </listitem>
2485 </varlistentry>
2486 </variablelist>
2487 </refsect2>
2488
2489 <refsect2>
2490 <title><!-- Logging -->ロギング</title>
2491 <para>
2492 <!--
2493 Logging can be configured on a per-container basis. By default,
2494 depending upon how the lxc package was compiled, container startup
2495 is logged only at the ERROR level, and logged to a file named after
2496 the container (with '.log' appended) either under the container path,
2497 or under @LOGPATH@.
2498 -->
2499 ロギングはコンテナごとに設定することが可能です。
2500 デフォルトでは、lxc パッケージのコンパイル条件に依存し、コンテナのスタートアップは ERROR レベルでのみロギングされ、コンテナのパス以下か、@LOGPATH@ 以下のどちらかにコンテナ名 (の後に '.log' が付与される) をもとにした名前でロギングされます。
2501 </para>
2502 <para>
2503 <!--
2504 Both the default log level and the log file can be specified in the
2505 container configuration file, overriding the default behavior. Note
2506 that the configuration file entries can in turn be overridden by the
2507 command line options to <command>lxc-start</command>.
2508 -->
2509 デフォルトのログレベルとログファイルは両方とも、コンテナの設定ファイル内で指定され、デフォルトの値を上書きします。
2510 同様に、設定ファイルのエントリは <command>lxc-start</command> のコマンドラインオプションで上書きすることも可能です。
2511 </para>
2512 <variablelist>
2513 <varlistentry>
2514 <term>
2515 <option>lxc.log.level</option>
2516 </term>
2517 <listitem>
2518 <para>
2519 <!--
2520 The level at which to log. The log level is an integer in
2521 the range of 0..8 inclusive, where a lower number means more
2522 verbose debugging. In particular 0 = trace, 1 = debug, 2 =
2523 info, 3 = notice, 4 = warn, 5 = error, 6 = critical, 7 =
2524 alert, and 8 = fatal. If unspecified, the level defaults
2525 to 5 (error), so that only errors and above are logged.
2526 -->
2527 ログを取得するレベル。
2528 ログレベルは 0..8 の範囲の整数です。
2529 数字が小さいほど冗長なデバッグを意味します。
2530 具体的には、0 = trace, 1 = debug, 2 = info, 3 = notice, 4 = warn, 5 = error, 6 = critical, 7 = alert, and 8 = fatal です。
2531 指定されない場合、レベルのデフォルトは 5 (error) で、それ以上のエラーがロギングされます。
2532 </para>
2533 <para>
2534 <!--
2535 Note that when a script (such as either a hook script or a
2536 network interface up or down script) is called, the script's
2537 standard output is logged at level 1, debug.
2538 -->
2539 (フックスクリプトやネットワークインターフェースの起動、停止時のスクリプトのような) スクリプトが呼ばれた時、スクリプトの標準出力は level 1 の debug でロギングされます。
2540 </para>
2541 </listitem>
2542 </varlistentry>
2543 <varlistentry>
2544 <term>
2545 <option>lxc.log</option>
2546 </term>
2547 <listitem>
2548 <para>
2549 <!--
2550 The file to which logging info should be written.
2551 -->
2552 ログ情報を書き込むファイル。
2553 </para>
2554 </listitem>
2555 </varlistentry>
2556 <varlistentry>
2557 <term>
2558 <option>lxc.log.syslog</option>
2559 </term>
2560 <listitem>
2561 <para>
2562 <!--
2563 Send logging info to syslog. It respects the log level defined in
2564 <command>lxc.log.level</command>. The argument should be the syslog
2565 facility to use, valid ones are: daemon, local0, local1, local2,
2566 local3, local4, local5, local5, local7.
2567 -->
2568 ログ情報を syslog に送ります。ログレベルとして <command>lxc.log.level</command> の値を使用します。指定する値は使用する syslog の facility です。有効な値は daemon, local0, local1, local2, local3, local4, local5, local5, local6, local7 のいずれかです。
2569 </para>
2570 </listitem>
2571 </varlistentry>
2572 </variablelist>
2573 </refsect2>
2574
2575 <refsect2>
2576 <title><!-- Autostart -->自動起動</title>
2577 <para>
2578 <!--
2579 The autostart options support marking which containers should be
2580 auto-started and in what order. These options may be used by LXC tools
2581 directly or by external tooling provided by the distributions.
2582 -->
2583 自動起動オプションでは、自動起動させるコンテナと順番の設定が可能です。
2584 このオプションは LXC ツールが直接使用するか、ディストリビューションが提供する外部ツールが使用するかもしれません。
2585 </para>
2586
2587 <variablelist>
2588 <varlistentry>
2589 <term>
2590 <option>lxc.start.auto</option>
2591 </term>
2592 <listitem>
2593 <para>
2594 <!--
2595 Whether the container should be auto-started.
2596 Valid values are 0 (off) and 1 (on).
2597 -->
2598 コンテナを自動起動させるかどうかを設定します。
2599 有効な値は 0(オフ) か 1(オン) です。
2600 </para>
2601 </listitem>
2602 </varlistentry>
2603 <varlistentry>
2604 <term>
2605 <option>lxc.start.delay</option>
2606 </term>
2607 <listitem>
2608 <para>
2609 <!--
2610 How long to wait (in seconds) after the container is
2611 started before starting the next one.
2612 -->
2613 コンテナを起動させた後、次のコンテナを起動させるまでにどれくらい (秒) 待つかを設定します。
2614 </para>
2615 </listitem>
2616 </varlistentry>
2617 <varlistentry>
2618 <term>
2619 <option>lxc.start.order</option>
2620 </term>
2621 <listitem>
2622 <para>
2623 <!--
2624 An integer used to sort the containers when auto-starting
2625 a series of containers at once.
2626 -->
2627 多数の自動起動させるコンテナがある場合のコンテナの起動順を決めるのに使う整数を指定します。
2628 </para>
2629 </listitem>
2630 </varlistentry>
2631 <varlistentry>
2632 <term>
2633 <option>lxc.monitor.unshare</option>
2634 </term>
2635 <listitem>
2636 <para>
2637 <!--
2638 If not zero the mount namespace will be unshared from the host
2639 before initializing the container (before running any pre-start
2640 hooks). This requires the CAP_SYS_ADMIN capability at startup.
2641 Default is 0.
2642 -->
2643 この値が 0 でない場合、コンテナが初期化される前 (pre-start フックが実行される前) にマウント名前空間がホストから unshare されます。この機能を使う場合、スタート時に CAP_SYS_ADMIN ケーパビリティが必要です。デフォルト値は 0 です。
2644 </para>
2645 </listitem>
2646 </varlistentry>
2647 <varlistentry>
2648 <term>
2649 <option>lxc.group</option>
2650 </term>
2651 <listitem>
2652 <para>
2653 <!--
2654 A multi-value key (can be used multiple times) to put the
2655 container in a container group. Those groups can then be
2656 used (amongst other things) to start a series of related
2657 containers.
2658 -->
2659 コンテナを追加したいコンテナグループ名を指定します。
2660 複数の値を設定でき、複数回指定することもできます。
2661 設定されたグループは、関連する一連のコンテナを起動させるために使われます。
2662 </para>
2663 </listitem>
2664 </varlistentry>
2665 </variablelist>
2666 </refsect2>
2667
2668 <refsect2>
2669 <title><!-- Autostart and System Boot -->自動起動とシステムブート</title>
2670 <para>
2671 <!--
2672 Each container can be part of any number of groups or no group at all.
2673 Two groups are special. One is the NULL group, i.e. the container does
2674 not belong to any group. The other group is the "onboot" group.
2675 -->
2676 コンテナはいくつでもグループに属することができ、全く属さないことも可能です。特別なグループが 2 つ存在します。1 つは NULL グループです。これはどのグループにも属さないコンテナです。もう 1 つは "onboot" グループです。
2677 </para>
2678
2679 <para>
2680 <!--
2681 When the system boots with the LXC service enabled, it will first
2682 attempt to boot any containers with lxc.start.auto == 1 that is a member
2683 of the "onboot" group. The startup will be in order of lxc.start.order.
2684 If an lxc.start.delay has been specified, that delay will be honored
2685 before attempting to start the next container to give the current
2686 container time to begin initialization and reduce overloading the host
2687 system. After starting the members of the "onboot" group, the LXC system
2688 will proceed to boot containers with lxc.start.auto == 1 which are not
2689 members of any group (the NULL group) and proceed as with the onboot
2690 group.
2691 -->
2692 LXC サービスが有効になった状態でシステムがブートすると、最初に "onboot" グループのメンバーである lxc.start.auto == 1 が設定されたコンテナを起動しようとします。起動は lxc.start.order の順に起動します。
2693 lxc.start.delay が指定されている場合、現在対象となっているコンテナに初期化の時間を与え、ホストシステムの負荷を低減するために、次のコンテナを開始させるまでに遅延時間を与えます。
2694 "onboot" グループのメンバーが開始した後、LXC システムは lxc.start.auto == 1 が設定された、どのグループのメンバーでもない (NULL グループの) コンテナのブートを onboot グループのコンテナと同様に開始します。
2695 </para>
2696
2697 </refsect2>
2698
2699 <refsect2>
2700 <title><!-- Container Environment -->コンテナの環境変数</title>
2701 <para>
2702 <!--
2703 If you want to pass environment variables into the container (that
2704 is, environment variables which will be available to init and all of
2705 its descendents), you can use <command>lxc.environment</command>
2706 parameters to do so. Be careful that you do not pass in anything
2707 sensitive; any process in the container which doesn't have its
2708 environment scrubbed will have these variables available to it, and
2709 environment variables are always available via
2710 <command>/proc/PID/environ</command>.
2711 -->
2712 コンテナに環境変数を渡したい場合 (環境変数はコンテナの init とその子孫全てで利用可能です)、<command>lxc.environment</command> パラメータがその用途に使えます。
2713 機微 (センシティブ) な情報を渡さないように注意が必要です。そのような情報を持たないコンテナ内のプロセスでこれらの環境変数が利用可能になってしまいます。環境変数は常に <command>/proc/PID/environ</command> 経由で利用可能になります。
2714 </para>
2715
2716 <para>
2717 <!--
2718 This configuration parameter can be specified multiple times; once
2719 for each environment variable you wish to configure.
2720 -->
2721 この設定項目は、設定したい環境変数ごとに 1 度ずつ、何度でも指定できます。
2722 </para>
2723
2724 <variablelist>
2725 <varlistentry>
2726 <term>
2727 <option>lxc.environment</option>
2728 </term>
2729 <listitem>
2730 <para>
2731 <!--
2732 Specify an environment variable to pass into the container.
2733 Example:
2734 -->
2735 コンテナに渡したい環境変数を指定します。
2736 例:
2737 </para>
2738 <programlisting>
2739 lxc.environment = APP_ENV=production
2740 lxc.environment = SYSLOG_SERVER=192.0.2.42
2741 </programlisting>
2742 </listitem>
2743 </varlistentry>
2744 </variablelist>
2745 </refsect2>
2746
2747 </refsect1>
2748
2749 <refsect1>
2750 <title><!-- Examples -->例</title>
2751 <para>
2752 <!--
2753 In addition to the few examples given below, you will find
2754 some other examples of configuration file in @DOCDIR@/examples
2755 -->
2756 以下に紹介するいくつかの例に加えて、他の設定例が @DOCDIR@/examples にあります。
2757 </para>
2758 <refsect2>
2759 <title><!-- Network -->ネットワーク</title>
2760 <para>
2761 <!--
2762 This configuration sets up a container to use a veth pair
2763 device with one side plugged to a bridge br0 (which has been
2764 configured before on the system by the administrator). The
2765 virtual network device visible in the container is renamed to
2766 eth0.
2767 -->
2768 この設定は、片方をブリッジである br0 と接続される veth ペアデバイスを使うコンテナを設定します (ブリッジは管理者によりあらかじめシステム上に設定済みである必要があります)。
2769 仮想ネットワークデバイスは、コンテナ内では eth0 とリネームされます。
2770 </para>
2771 <programlisting>
2772 lxc.uts.name = myhostname
2773 lxc.net.0.type = veth
2774 lxc.net.0.flags = up
2775 lxc.net.0.link = br0
2776 lxc.net.0.name = eth0
2777 lxc.net.0.hwaddr = 4a:49:43:49:79:bf
2778 lxc.net.0.ipv4.address = 1.2.3.5/24 1.2.3.255
2779 lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3597
2780 </programlisting>
2781 </refsect2>
2782
2783 <refsect2>
2784 <title><!-- UID/GID mapping -->UID/GID のマッピング</title>
2785 <para><!-- This configuration will map both user and group ids in the
2786 range 0-9999 in the container to the ids 100000-109999 on the host. -->
2787 この設定は、コンテナ内のユーザとグループ両方の id 0-9999 の範囲を、ホスト上の 100000-109999 へマッピングします。
2788 </para>
2789 <programlisting>
2790 lxc.idmap = u 0 100000 10000
2791 lxc.idmap = g 0 100000 10000
2792 </programlisting>
2793 </refsect2>
2794
2795 <refsect2>
2796 <title>Control group</title>
2797 <para>
2798 <!-- This configuration will setup several control groups for
2799 the application, cpuset.cpus restricts usage of the defined cpu,
2800 cpus.share prioritize the control group, devices.allow makes
2801 usable the specified devices.-->
2802 この設定は、アプリケーションのための control group をいくつか設定します。
2803 cpuset.cpus は定義された cpu のみ使用できるように制限します。
2804 cpus.share は、control group の (cpu) 優先度を指定します。
2805 devices.allow は、特定のデバイスを使用可能にします。
2806 </para>
2807 <programlisting>
2808 lxc.cgroup.cpuset.cpus = 0,1
2809 lxc.cgroup.cpu.shares = 1234
2810 lxc.cgroup.devices.deny = a
2811 lxc.cgroup.devices.allow = c 1:3 rw
2812 lxc.cgroup.devices.allow = b 8:0 rw
2813 </programlisting>
2814 </refsect2>
2815
2816 <refsect2>
2817 <title><!-- Complex configuration -->複雑な設定</title>
2818 <para>
2819 <!-- This example show a complex configuration making a complex
2820 network stack, using the control groups, setting a new hostname,
2821 mounting some locations and a changing root file system. -->
2822 この例は、control group を使って、複雑なネットワークスタックを作成し、新しいホスト名を指定し、いくつかの場所をマウントし、ルートファイルシステムを変更するような複雑な設定を示します。
2823 </para>
2824 <programlisting>
2825 lxc.uts.name = complex
2826 lxc.net.0.type = veth
2827 lxc.net.0.flags = up
2828 lxc.net.0.link = br0
2829 lxc.net.0.hwaddr = 4a:49:43:49:79:bf
2830 lxc.net.0.ipv4.address = 10.2.3.5/24 10.2.3.255
2831 lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3597
2832 lxc.net.0.ipv6.address = 2003:db8:1:0:214:5432:feab:3588
2833 lxc.net.1.type = macvlan
2834 lxc.net.1.flags = up
2835 lxc.net.1.link = eth0
2836 lxc.net.1.hwaddr = 4a:49:43:49:79:bd
2837 lxc.net.1.ipv4.address = 10.2.3.4/24
2838 lxc.net.1.ipv4.address = 192.168.10.125/24
2839 lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
2840 lxc.net.2.type = phys
2841 lxc.net.2.flags = up
2842 lxc.net.2.link = dummy0
2843 lxc.net.2.hwaddr = 4a:49:43:49:79:ff
2844 lxc.net.2.ipv4.address = 10.2.3.6/24
2845 lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
2846 lxc.cgroup.cpuset.cpus = 0,1
2847 lxc.cgroup.cpu.shares = 1234
2848 lxc.cgroup.devices.deny = a
2849 lxc.cgroup.devices.allow = c 1:3 rw
2850 lxc.cgroup.devices.allow = b 8:0 rw
2851 lxc.mount.fstab = /etc/fstab.complex
2852 lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
2853 lxc.rootfs.path = dir:/mnt/rootfs.complex
2854 lxc.cap.drop = sys_module mknod setuid net_raw
2855 lxc.cap.drop = mac_override
2856 </programlisting>
2857 </refsect2>
2858
2859 </refsect1>
2860
2861 <refsect1>
2862 <title>See Also</title>
2863 <simpara>
2864 <citerefentry>
2865 <refentrytitle><command>chroot</command></refentrytitle>
2866 <manvolnum>1</manvolnum>
2867 </citerefentry>,
2868
2869 <citerefentry>
2870 <refentrytitle><command>pivot_root</command></refentrytitle>
2871 <manvolnum>8</manvolnum>
2872 </citerefentry>,
2873
2874 <citerefentry>
2875 <refentrytitle><filename>fstab</filename></refentrytitle>
2876 <manvolnum>5</manvolnum>
2877 </citerefentry>
2878
2879 <citerefentry>
2880 <refentrytitle><filename>capabilities</filename></refentrytitle>
2881 <manvolnum>7</manvolnum>
2882 </citerefentry>
2883
2884 </simpara>
2885 </refsect1>
2886
2887 &seealso;
2888
2889 <refsect1>
2890 <title><!-- Author -->作者</title>
2891 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
2892 </refsect1>
2893
2894 </refentry>
2895
2896 <!-- Keep this comment at the end of the file
2897 Local variables:
2898 mode: sgml
2899 sgml-omittag:t
2900 sgml-shorttag:t
2901 sgml-minimize-attributes:nil
2902 sgml-always-quote-attributes:t
2903 sgml-indent-step:2
2904 sgml-indent-data:t
2905 sgml-parent-document:nil
2906 sgml-default-dtd-file:nil
2907 sgml-exposed-tags:nil
2908 sgml-local-catalogs:nil
2909 sgml-local-ecat-files:nil
2910 End:
2911 -->