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