]> git.proxmox.com Git - mirror_lxc.git/blob - doc/ja/lxc.conf.sgml.in
Remove trailing whitespaces
[mirror_lxc.git] / doc / ja / lxc.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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
23
24 Translated into Japanese
25 by KATOH Yasufumi <karma at jazz.email.ne.jp>
26
27 -->
28
29 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
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.conf</refentrytitle>
40 <manvolnum>5</manvolnum>
41 </refmeta>
42
43 <refnamediv>
44 <refname>lxc.conf</refname>
45
46 <refpurpose>
47 <!--
48 linux container configuration file
49 -->
50 linux コンテナ設定ファイル
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>) は,常に使用する前に作成されます.コンテナは,プロセスがコンテナを使う時に仮想化/隔離するシステムリソースのセットを定義することによって作成します.デフォルトでは,pid, sysv ipc, マウントポイントが仮想化され,隔離されます.他のシステムリソースは,設定ファイルで明確に定義されない限りは,コンテナをまたいで共有されます.例えば,もしネットワークが設定されていなければ,コンテナを作成する側とコンテナでネットワークを共有します.もし,ネットワークが指定されれば,新しいネットワークスタックがコンテナ用に作成され,コンテナは作成元の環境のネットワークを使いません.
72 </para>
73
74 <para>
75 <!--
76 The configuration file defines the different system resources to
77 be assigned for the container. At present, the utsname, the
78 network, the mount points, the root file system and the control
79 groups are supported.
80 -->
81 設定ファイルは,コンテナに割り当てられる様々なシステムリソースを定義します.現時点では,utsname,ネットワーク,マウントポイント,root ファイルシステム,control groups がサポートされます.
82 </para>
83
84 <para>
85 <!--
86 Each option in the configuration file has the form <command>key
87 = value</command> fitting in one line. The '#' character means
88 the line is a comment.
89 -->
90 設定ファイルのオプション一つを,<command>key = value</command> の形で一行で表します.'#' は,その行はコメントであることを示します.
91 </para>
92
93 <refsect2>
94 <title><!-- Architecture -->アーキテクチャ</title>
95 <para>
96 <!--
97 Allows to set the architecture for the container. For example,
98 set a 32bits architecture for a container running 32bits
99 binaries on a 64bits host. That fix the container scripts
100 which rely on the architecture to do some work like
101 downloading the packages.
102 -->
103 コンテナに対してアーキテクチャを設定することが可能です.例えば,64 ビットのホスト上で 32 ビットのバイナリを動かすために 32 ビットアーキテクチャを設定することが可能です.この設定を行うことにより,パッケージのダウンロードを行うなどの作業のうち,アーキテクチャ名に依存するような作業を行うコンテナスクリプトの修正を行います.
104 </para>
105
106 <variablelist>
107 <varlistentry>
108 <term>
109 <option>lxc.arch</option>
110 </term>
111 <listitem>
112 <para>
113 <!--
114 Specify the architecture for the container.
115 -->
116 コンテナに設定するアーキテクチャを指定します.
117 </para>
118 <para>
119 <!--
120 Valid options are
121 <option>x86</option>,
122 <option>i686</option>,
123 <option>x86_64</option>,
124 <option>amd64</option>
125 -->
126 有効なオプションは以下です.
127 <option>x86</option>,
128 <option>i686</option>,
129 <option>x86_64</option>,
130 <option>amd64</option>
131 </para>
132 </listitem>
133 </varlistentry>
134 </variablelist>
135
136 </refsect2>
137
138 <refsect2>
139 <title><!-- Hostname -->ホスト名</title>
140 <para>
141 <!--
142 The utsname section defines the hostname to be set for the
143 container. That means the container can set its own hostname
144 without changing the one from the system. That makes the
145 hostname private for the container.
146 -->
147 utsname セクションは,コンテナに設定されるホスト名を定義します.コンテナは,システムのホスト名を変えることなく,自身のホスト名を持つ事が可能です.このことにより,ホスト名はコンテナ専用となります.
148 </para>
149 <variablelist>
150 <varlistentry>
151 <term>
152 <option>lxc.utsname</option>
153 </term>
154 <listitem>
155 <para>
156 <!--
157 specify the hostname for the container
158 -->
159 コンテナのホスト名を指定します.
160 </para>
161 </listitem>
162 </varlistentry>
163 </variablelist>
164 </refsect2>
165
166 <refsect2>
167 <title><!-- Stop signal -->停止時のシグナル</title>
168 <para>
169 <!--
170 Allows to specify signal name or number, sent by lxc-stop to
171 shutdown the container. Different init systems could use
172 different signals to perform clean shutdown sequence. Option
173 allows signal to be specified in kill(1) fashion, e.g.
174 SIGKILL, SIGRTMIN+14, SIGRTMAX-10 or plain number.
175 -->
176 lxc-stop がコンテナをシャットダウンするときに送出するシグナル名か番号を指定可能です.様々な init システムが,クリーンなシャットダウンシーケンスを実行するために,様々なシグナルを用いる可能性があります.オプションとして,シグナルを kill(1) の形式で指定することが可能です.例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式,もしくは数字を指定します.
177 </para>
178 <variablelist>
179 <varlistentry>
180 <term>
181 <option>lxc.stopsignal</option>
182 </term>
183 <listitem>
184 <para>
185 <!--
186 specify the signal used to stop the container
187 -->
188 コンテナを停止するのに使用するシグナルを指定します.
189 </para>
190 </listitem>
191 </varlistentry>
192 </variablelist>
193 </refsect2>
194
195 <refsect2>
196 <title><!-- Network -->ネットワーク</title>
197 <para>
198 <!--
199 The network section defines how the network is virtualized in
200 the container. The network virtualization acts at layer
201 two. In order to use the network virtualization, parameters
202 must be specified to define the network interfaces of the
203 container. Several virtual interfaces can be assigned and used
204 in a container even if the system has only one physical
205 network interface.
206 -->
207 ネットワークセクションは,コンテナ内でどのようにネットワークを仮想化するかを定義します.ネットワークの仮想化はレイヤー 2 で作動します.ネットワークの仮想化を使用するためには,コンテナのネットワークインターフェースを定義しなければなりません.いくつかの仮想インターフェースをアサインすることができます.そして,仮に物理ネットワークインターフェースが一つしかなくても,コンテナ内でいくつもの仮想インターフェースを使うことができます.
208 </para>
209 <variablelist>
210 <varlistentry>
211 <term>
212 <option>lxc.network.type</option>
213 </term>
214 <listitem>
215 <para>
216 <!--
217 specify what kind of network virtualization to be used
218 for the container. Each time
219 a <option>lxc.network.type</option> field is found a new
220 round of network configuration begins. In this way,
221 several network virtualization types can be specified
222 for the same container, as well as assigning several
223 network interfaces for one container. The different
224 virtualization types can be:
225 -->
226 コンテナがどの種類のネットワーク仮想化を使うかを指定します.一つのネットワークの設定ごとに <option>lxc.network.type</option> フィールドを指定します.このように,一つのコンテナに複数のネットワークインターフェースを割り当てることができるだけでなく,同じコンテナに対して複数のネットワーク仮想化の種類を指定することが出来ます.仮想化の種類は以下の値を取る事が出来ます:
227 </para>
228
229 <para>
230 <!--
231 <option>empty:</option> will create only the loopback
232 interface.
233 -->
234 <option>empty:</option> ループバックインターフェースだけを作成します.
235 </para>
236
237 <para>
238 <!--
239 <option>veth:</option> a peer network device is created
240 with one side assigned to the container and the other
241 side is attached to a bridge specified by
242 the <option>lxc.network.link</option>. If the bridge is
243 not specified, then the veth pair device will be created
244 but not attached to any bridge. Otherwise, the bridge
245 has to be setup before on the
246 system, <command>lxc</command> won't handle any
247 configuration outside of the container. By
248 default <command>lxc</command> choose a name for the
249 network device belonging to the outside of the
250 container, this name is handled
251 by <command>lxc</command>, but if you wish to handle
252 this name yourself, you can tell <command>lxc</command>
253 to set a specific name with
254 the <option>lxc.network.veth.pair</option> option.
255 -->
256 <option>veth:</option> 一方がコンテナに,もう一方が <option>lxc.network.link</option> で指定されるブリッジにアタッチされる,ピアネットワークデバイスを作成します.もし,ブリッジが指定されていない場合,veth ペアデバイスは作成されますが,ブリッジにはアタッチされません.ブリッジはシステムで事前に設定する必要があります.さもなければ,<command>lxc</command> はコンテナ外のいかなる設定も扱うことはできないでしょう.デフォルトでは,<command>lxc</command> はコンテナの外部に属するネットワークデバイスに対する名前を決定し,<command>lxc</command> はこの名前を使います.しかし,もしこの名前を自分で指定したい場合,<option>lxc.network.veth.pair</option> オプションを使って名前を設定し,lxc に対して指定をすることができます.
257 </para>
258
259 <para>
260 <!--
261 <option>vlan:</option> a vlan interface is linked with
262 the interface specified by
263 the <option>lxc.network.link</option> and assigned to
264 the container. The vlan identifier is specified with the
265 option <option>lxc.network.vlan.id</option>.
266 -->
267 <option>vlan:</option> vlan インターフェースは <option>lxc.network.link</option> で指定されたインターフェースとリンクし,コンテナに割り当てられます.vlan の指定は <option>lxc.network.vlan.id</option> オプションで指定します.
268 </para>
269
270 <para>
271 <!--
272 <option>macvlan:</option> a macvlan interface is linked
273 with the interface specified by
274 the <option>lxc.network.link</option> and assigned to
275 the container.
276 <option>lxc.network.macvlan.mode</option> specifies the
277 mode the macvlan will use to communicate between
278 different macvlan on the same upper device. The accepted
279 modes are <option>private</option>, the device never
280 communicates with any other device on the same upper_dev (default),
281 <option>vepa</option>, the new Virtual Ethernet Port
282 Aggregator (VEPA) mode, it assumes that the adjacent
283 bridge returns all frames where both source and
284 destination are local to the macvlan port, i.e. the
285 bridge is set up as a reflective relay. Broadcast
286 frames coming in from the upper_dev get flooded to all
287 macvlan interfaces in VEPA mode, local frames are not
288 delivered locallay, or <option>bridge</option>, it
289 provides the behavior of a simple bridge between
290 different macvlan interfaces on the same port. Frames
291 from one interface to another one get delivered directly
292 and are not sent out externally. Broadcast frames get
293 flooded to all other bridge ports and to the external
294 interface, but when they come back from a reflective
295 relay, we don't deliver them again. Since we know all
296 the MAC addresses, the macvlan bridge mode does not
297 require learning or STP like the bridge module does.
298 -->
299 <option>macvlan:</option> macvlan インターフェースは <option>lxc.network.link</option> により指定されるインターフェースとリンクし,コンテナに割り当てられます.<option>lxc.network.macvlan.mode</option> でモードを指定すると,その macvlan の指定を,同じ上位デバイスで異なる macvlan の間の通信をする時に使います.受け入れられたモードが <option>private</option> であれば,デバイスは同じ上位デバイスの他のデバイスとの通信を行いません (デフォルト).新しい仮想イーサネットポート集約モード (Virtual Ethernet Port Aggregator (VEPA)) である <option>vepa</option> は,隣接したポートが,ソースとデスティネーションの両方が macvlan ポートに対してローカルであるフレームを全て返すと仮定します.すなわち,ブリッジが reflective relay として設定されているということです.上位デバイスから入ってくるブロードキャストフレームは,VEPA モードである全ての macvlan インターフェースに送りつけられます.ローカルのフレームはローカルには配送されません.<option>bridge</option> の指定は,同じポートの異なる macvlan インターフェースの間のシンプルなブリッジとして動作します.あるインターフェースから他のインターフェースへのフレームは,直接配送され,外部には送出されません.ブロードキャストフレームは,全ての他のブリッジと外部のインターフェースに対して送られます.しかし,reflective relay からフレームが返ってきたときは,再度それを配送することはしません.全ての MAC アドレスを知っているので,ブリッジモジュールのように,macvlan ブリッジモードは学習や STP の必要はありません.
300 </para>
301
302 <para>
303 <!--
304 <option>phys:</option> an already existing interface
305 specified by the <option>lxc.network.link</option> is
306 assigned to the container.
307 -->
308 <option>phys:</option> <option>lxc.network.link</option> で指定された,すでに存在しているインターフェースがコンテナに割り当てられます.
309 </para>
310 </listitem>
311 </varlistentry>
312
313 <varlistentry>
314 <term>
315 <option>lxc.network.flags</option>
316 </term>
317 <listitem>
318 <para>
319 <!--
320 specify an action to do for the
321 network.
322 -->
323 ネットワークに対して行うアクションを指定します.
324 </para>
325
326 <para>
327 <!--
328 <option>up:</option> activates the interface.
329 -->
330 <option>up:</option> インターフェースを起動させます.
331 </para>
332 </listitem>
333 </varlistentry>
334
335 <varlistentry>
336 <term>
337 <option>lxc.network.link</option>
338 </term>
339 <listitem>
340 <para>
341 <!--
342 specify the interface to be used for real network
343 traffic.
344 -->
345 実際のネットワークトラフィックに使うインターフェースを指定します.
346 </para>
347 </listitem>
348 </varlistentry>
349
350 <varlistentry>
351 <term>
352 <option>lxc.network.name</option>
353 </term>
354 <listitem>
355 <para>
356 <!--
357 the interface name is dynamically allocated, but if
358 another name is needed because the configuration files
359 being used by the container use a generic name,
360 eg. eth0, this option will rename the interface in the
361 container.
362 -->
363 インターフェース名は動的に割り当てられます.しかし,もしコンテナが使用する設定ファイルが一般的な名前を使用するために,他の特定の名前が必要であれば (例えば eth0 など),コンテナ内のインターフェースは,このオプションで指定した名前にリネームされます.
364 </para>
365 </listitem>
366 </varlistentry>
367
368 <varlistentry>
369 <term>
370 <option>lxc.network.hwaddr</option>
371 </term>
372 <listitem>
373 <para>
374 <!--
375 the interface mac address is dynamically allocated by
376 default to the virtual interface, but in some cases,
377 this is needed to resolve a mac address conflict or to
378 always have the same link-local ipv6 address
379 -->
380 インターフェースの MAC アドレスは,デフォルトでは動的に割り当てられます.しかし,MAC アドレスの衝突や,リンクローカルIPv6 アドレスを常に同じにした場合などは,このオプションが必要です.
381 </para>
382 </listitem>
383 </varlistentry>
384
385 <varlistentry>
386 <term>
387 <option>lxc.network.ipv4</option>
388 </term>
389 <listitem>
390 <para>
391 <!--
392 specify the ipv4 address to assign to the virtualized
393 interface. Several lines specify several ipv4 addresses.
394 The address is in format x.y.z.t/m,
395 eg. 192.168.1.123/24.The broadcast address should be
396 specified on the same line, right after the ipv4
397 address.
398 -->
399 仮想インターフェースに割り当てる ipv4 アドレスを指定します.複数行により複数の ipv4 アドレスを指定します.このアドレスは x.y.z.t/m というフォーマットで指定します.例えば,192.168.1.123/24.ブロードキャストアドレスも同じ行の ipv4 アドレスのすぐ後で指定しなくてはなりません.
400 </para>
401 </listitem>
402 </varlistentry>
403
404 <varlistentry>
405 <term>
406 <option>lxc.network.ipv4.gateway</option>
407 </term>
408 <listitem>
409 <para>
410 <!--
411 specify the ipv4 address to use as the gateway inside the
412 container. The address is in format x.y.z.t, eg.
413 192.168.1.123.
414
415 Can also have the special value <option>auto</option>,
416 which means to take the primary address from the bridge
417 interface (as specified by the
418 <option>lxc.network.link</option> option) and use that as
419 the gateway. <option>auto</option> is only available when
420 using the <option>veth</option> and
421 <option>macvlan</option> network types.
422 -->
423 コンテナでゲートウェイとして使う IPv4 アドレスを指定します.アドレスは x.y.z.t というフォーマットです.例えば,192.168.1.123.
424
425 <option>auto</option> という特別な値を記述する事も可能です.これは (<option>lxc.network.link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し,それをゲートウェイに使うという意味になります.<option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります.
426 </para>
427 </listitem>
428 </varlistentry>
429
430
431 <varlistentry>
432 <term>
433 <option>lxc.network.ipv6</option>
434 </term>
435 <listitem>
436 <para>
437 <!--
438 specify the ipv6 address to assign to the virtualized
439 interface. Several lines specify several ipv6 addresses.
440 The address is in format x::y/m,
441 eg. 2003:db8:1:0:214:1234:fe0b:3596/64
442 -->
443 仮想インターフェースに割り当てる ipv6 アドレスを指定します.複数行により複数の ipv6 アドレスを指定します.このアドレスは x::y/m というフォーマットで指定します.例えば,2003:db8:1:0:214:1234:fe0b:3596/64.
444 </para>
445 </listitem>
446 </varlistentry>
447
448 <varlistentry>
449 <term>
450 <option>lxc.network.ipv6.gateway</option>
451 </term>
452 <listitem>
453 <para>
454 <!--
455 specify the ipv6 address to use as the gateway inside the
456 container. The address is in format x::y,
457 eg. 2003:db8:1:0::1
458
459 Can also have the special value <option>auto</option>,
460 which means to take the primary address from the bridge
461 interface (as specified by the
462 <option>lxc.network.link</option> option) and use that as
463 the gateway. <option>auto</option> is only available when
464 using the <option>veth</option> and
465 <option>macvlan</option> network types.
466 -->
467 コンテナでゲートウェイとして使う IPv6 アドレスを指定します.アドレスは x::y というフォーマットです.例えば,2003:db8:1:0::1.
468
469 <option>auto</option> という特別な値を記述する事も可能です.これは (<option>lxc.network.link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し,それをゲートウェイに使うという意味になります.<option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります.
470 </para>
471 </listitem>
472 </varlistentry>
473
474 <varlistentry>
475 <term>
476 <option>lxc.network.script.up</option>
477 </term>
478 <listitem>
479 <para>
480 <!--
481 add a configuration option to specify a script to be
482 executed after creating and configuring the network used
483 from the host side. The following arguments are passed
484 to the script: container name and config section name
485 (net) Additional arguments depend on the config section
486 employing a script hook; the following are used by the
487 network system: execution context (up), network type
488 (empty/veth/macvlan/phys), Depending on the network
489 type, other arguments may be passed:
490 veth/macvlan/phys. And finally (host-sided) device name.
491 -->
492 ホスト側から使われる,ネットワークの作成と設定が済んだ後に実行するスクリプトを指定します.以下の引数がスクリプトに渡されます: コンテナ名,設定セクション名(net).
493 </para>
494 <para>
495 その後の引数はスクリプトのフックで使われる設定セクションに依存します.以下がネットワークシステムによって使われます: 実行コンテキスト (up),ネットワークのタイプ (empty/veth/macvlan/phys)
496 </para>
497 <para>
498 ネットワークのタイプによっては,更に別の引数が渡されるかもしれません: veth/macvlan/phys の場合 (ホスト側の) デバイス名
499 </para>
500 </listitem>
501 </varlistentry>
502
503 <varlistentry>
504 <term>
505 <option>lxc.network.script.down</option>
506 </term>
507 <listitem>
508 <para>
509 <!--
510 add a configuration option to specify a script to be
511 executed before destroying the network used from the
512 host side. The following arguments are passed to the
513 script: container name and config section name (net)
514 Additional arguments depend on the config section
515 employing a script hook; the following are used by the
516 network system: execution context (down), network type
517 (empty/veth/macvlan/phys), Depending on the network
518 type, other arguments may be passed:
519 veth/macvlan/phys. And finally (host-sided) device name.
520 -->
521 ホスト側から使われる,ネットワークを破壊する前に実行するスクリプトを指定します.以下の引数がスクリプトに渡されます: コンテナ名,設定セクション名(net).
522 その後の引数はスクリプトのフックで使われる設定セクションに依存します.以下がネットワークシステムによって使われます: 実行コンテキスト (up),ネットワークのタイプ (empty/veth/macvlan/phys).
523 ネットワークのタイプによっては,更に別の引数が渡されるかもしれません: veth/macvlan/phys.そして最後に (ホスト側の) デバイス名が渡されます.
524 </para>
525 </listitem>
526 </varlistentry>
527 </variablelist>
528
529 </refsect2>
530
531 <refsect2>
532 <title><!-- New pseudo tty instance (devpts) -->新しい擬似端末のインスタンス (devpts)</title>
533 <para>
534 <!--
535 For stricter isolation the container can have its own private
536 instance of the pseudo tty.
537 -->
538 さらに厳しい隔離のために,コンテナは自身のプライベートな pseudo tty (擬似端末) を持つことが可能です.
539 </para>
540 <variablelist>
541 <varlistentry>
542 <term>
543 <option>lxc.pts</option>
544 </term>
545 <listitem>
546 <para>
547 <!--
548 If set, the container will have a new pseudo tty
549 instance, making this private to it. The value specifies
550 the maximum number of pseudo ttys allowed for a pts
551 instance (this limitation is not implemented yet).
552 -->
553 もし設定された場合,コンテナは新しい psuedo tty インスタンスを持ち,それを自身のプライベートとします.この値は pts インスタンスに許可される pseudo tty の最大数を指定します (この制限はまだ実装されていません).
554 </para>
555 </listitem>
556 </varlistentry>
557 </variablelist>
558 </refsect2>
559
560 <refsect2>
561 <title><!-- Container system console -->コンテナのシステムコンソール</title>
562 <para>
563 <!--
564 If the container is configured with a root filesystem and the
565 inittab file is setup to use the console, you may want to specify
566 where goes the output of this console.
567 -->
568 コンテナでルートファイルシステムを持つように設定されており,inittab ファイルでコンソールの使用が設定されている場合,このコンソールの出力がどこになされるのかを指定したいと思うでしょう.
569 </para>
570 <variablelist>
571 <varlistentry>
572 <term>
573 <option>lxc.console</option>
574 </term>
575 <listitem>
576 <para>
577 <!--
578 Specify a path to a file where the console output will
579 be written.
580 -->
581 コンソールの出力が書かれるファイルのパスを指定します.
582 </para>
583 </listitem>
584 </varlistentry>
585 </variablelist>
586 </refsect2>
587
588 <refsect2>
589 <title><!-- Console through the ttys -->tty を通したコンソール</title>
590 <para>
591 <!--
592 If the container is configured with a root filesystem and the
593 inittab file is setup to launch a getty on the ttys. This
594 option will specify the number of ttys to be available for the
595 container. The number of getty in the inittab file of the
596 container should not be greater than the number of ttys
597 specified in this configuration file, otherwise the excess
598 getty sessions will die and respawn indefinitly giving
599 annoying messages on the console.
600 -->
601 コンテナがルートファイルシステムで設定されており,inittab ファイルで tty 上に getty の開始が設定されている場合,このオプションはコンテナが利用出来る tty の数を指定します.コンテナの inittab ファイル内の getty の数と,この設定ファイルに指定される tty の数は等しくする必要があります.さもないと,getty は最終的にコンソールにうっとおしいメッセージを多数表示しながら生死を繰り返すでしょう.
602 </para>
603 <variablelist>
604 <varlistentry>
605 <term>
606 <option>lxc.tty</option>
607 </term>
608 <listitem>
609 <para>
610 <!--
611 Specify the number of tty to make available to the
612 container.
613 -->
614 コンテナに作成出来る tty の数を指定します.
615 </para>
616 </listitem>
617 </varlistentry>
618 </variablelist>
619 </refsect2>
620
621 <refsect2>
622 <title><!-- Console devices location -->コンソールデバイスの位置</title>
623 <para>
624 <!--
625 LXC consoles are provided through Unix98 PTYs created on the
626 host and bind-mounted over the expected devices in the container.
627 By default, they are bind-mounted over <filename>/dev/console</filename>
628 and <filename>/dev/ttyN</filename>. This can prevent package upgrades
629 in the guest. Therefore you can specify a directory location (under
630 <filename>/dev</filename> under which LXC will create the files and
631 bind-mount over them. These will then be symbolically linked to
632 <filename>/dev/console</filename> and <filename>/dev/ttyN</filename>.
633 A package upgrade can then succeed as it is able to remove and replace
634 the symbolic links.
635 -->
636 LXC のコンソールはホストによって作られ,コンテナ内で要求されたデバイスに bind マウントされた Unix98 PTY 経由で提供されます.デフォルトでは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> に bind マウントされます.これはゲスト内でのパッケージのアップグレードを妨げる可能性があります.なので <filename>/dev</filename> 以下のディレクトリを指定することができます.LXC はこのディレクトリ以下にファイルを作成し,これらのファイルを bind マウントします.そして,これらの (作成された) ファイルは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> にシンボリックリンクされます.シンボリックリンクを消去したり置き換えたりすることは可能ですから,パッケージのアップグレードは成功します.
637 </para>
638 <variablelist>
639 <varlistentry>
640 <term>
641 <option>lxc.devttydir</option>
642 </term>
643 <listitem>
644 <para>
645 <!--
646 Specify a directory under <filename>/dev</filename>
647 under which to create the container console devices.
648 -->
649 コンテナのコンソールデバイスを作成するための <filename>/dev</filename> 以下のディレクトリを指定します.
650 </para>
651 </listitem>
652 </varlistentry>
653 </variablelist>
654 </refsect2>
655
656 <refsect2>
657 <title><!-- /dev directory -->/dev ディレクトリ</title>
658 <para>
659 <!--
660 By default, lxc does nothing with the container's
661 <filename>/dev</filename>. This allows the container's
662 <filename>/dev</filename> to be set up as needed in the container
663 rootfs. If lxc.autodev is set to 1, then after mounting the container's
664 rootfs LXC will mount a fresh tmpfs under <filename>/dev</filename>
665 (limited to 100k) and fill in a minimal set of initial devices.
666 This is generally required when starting a container containing
667 a "systemd" based "init" but may be optional at other times. Addional
668 devices in the containers /dev directory may be created through the
669 use of the <option>lxc.hook.autodev</option> hook.
670 -->
671 デフォルトでは,lxc はコンテナの <filename>/dev</filename> については何も行いません.これは,コンテナの rootfs で必要な設定を行えるようにするものです.lxc.autodev が 1 に設定されている場合,コンテナの rootfs をマウントした後,LXC は新しい tmpfs を <filename>/dev</filename> 以下にマウントします (100k 制限の).そして初期デバイスの最小限のセットを作成します.これは,"systemd" ベースの "init" 環境のコンテナを起動する時に通常必要ですが,他の環境の場合はオプショナルなものです.コンテナの /dev ディレクトリ内の追加デバイスは <option>lxc.hook.autodev</option> フックを使用して作成されます.
672 </para>
673 <variablelist>
674 <varlistentry>
675 <term>
676 <option>lxc.autodev</option>
677 </term>
678 <listitem>
679 <para>
680 <!--
681 Set this to 1 to have LXC mount and populate a minimal
682 <filename>/dev</filename> when starting the container.
683 -->
684 コンテナの起動時に LXC が /dev をマウントして,最小限の /dev を作成しているようにするには,これを 1 に設定してください.
685 </para>
686 </listitem>
687 </varlistentry>
688 </variablelist>
689 </refsect2>
690
691 <refsect2>
692 <title><!-- Enable kmsg symlink -->kmsg のシンボリックリンクの有効化</title>
693 <para>
694 <!--
695 Enable creating /dev/kmsg as symlink to /dev/console. This defaults to 1.
696 -->
697 /dev/kmsg の /dev/console へのシンボリックリンクとしての作成を有効にします.デフォルトは 1 です.
698 </para>
699 <variablelist>
700 <varlistentry>
701 <term>
702 <option>lxc.kmsg</option>
703 </term>
704 <listitem>
705 <para>
706 <!--
707 Set this to 0 to disable /dev/kmsg symlinking.
708 -->
709 /dev/kmsg のシンボリックリンクを無効にするには 0 を設定してください.
710 </para>
711 </listitem>
712 </varlistentry>
713 </variablelist>
714 </refsect2>
715
716 <refsect2>
717 <title><!-- Mount points -->マウントポイント</title>
718 <para>
719 <!--
720 The mount points section specifies the different places to be
721 mounted. These mount points will be private to the container
722 and won't be visible by the processes running outside of the
723 container. This is useful to mount /etc, /var or /home for
724 examples.
725 -->
726 マウントポイントセクションは,マウントするための区別された場所を指定します.これらのマウントポイントは,コンテナだけに見え,コンテナ外で実行されるプロセスから見えることはありません.例えば,/etc や /var や /home をマウントするときに役に立つでしょう.
727 </para>
728 <variablelist>
729 <varlistentry>
730 <term>
731 <option>lxc.mount</option>
732 </term>
733 <listitem>
734 <para>
735 <!--
736 specify a file location in
737 the <filename>fstab</filename> format, containing the
738 mount informations. If the rootfs is an image file or a
739 device block and the fstab is used to mount a point
740 somewhere in this rootfs, the path of the rootfs mount
741 point should be prefixed with the
742 <filename>@LXCROOTFSMOUNT@</filename> default path or
743 the value of <option>lxc.rootfs.mount</option> if
744 specified.
745 -->
746 マウントに関する情報が書かれた <filename>fstab</filename> フォーマットのファイルの場所を指定します.rootfs がイメージファイルやデバイスブロックで,fstab ファイルがこの rootfs 内のどこかをマウントするために使われる場合,rootfs のマウントポイントのパスはデフォルトパスである <filename>@LXCROOTFSMOUNT@</filename> か,もしくは <option>lxc.rootfs.mount</option> が指定されている場合は,その値を前に付ける必要があります.
747 </para>
748 </listitem>
749 </varlistentry>
750
751 <varlistentry>
752 <term>
753 <option>lxc.mount.entry</option>
754 </term>
755 <listitem>
756 <para>
757 <!--
758 specify a mount point corresponding to a line in the
759 fstab format.
760 -->
761 fstab フォーマットの一行と同じフォーマットのマウントポイントの指定をします.
762 </para>
763 </listitem>
764 </varlistentry>
765
766 </variablelist>
767 </refsect2>
768
769 <refsect2>
770 <title><!-- Root file system -->ルートファイルシステム</title>
771 <para>
772 <!--
773 The root file system of the container can be different than that
774 of the host system.
775 -->
776 コンテナのルートファイルシステムは,ホストのルートファイルシステムと異なるようにすることも可能です.
777 </para>
778 <variablelist>
779 <varlistentry>
780 <term>
781 <option>lxc.rootfs</option>
782 </term>
783 <listitem>
784 <para>
785 <!--
786 specify the root file system for the container. It can
787 be an image file, a directory or a block device. If not
788 specified, the container shares its root file system
789 with the host.
790 -->
791 コンテナのルートファイルシステムになるディレクトリを指定します.この値はイメージファイル,ディレクトリ,ブロックデバイスのどれかを取ることができます.もし指定されない場合,コンテナはホストとルートファイルシステムを共有します.
792 </para>
793 </listitem>
794 </varlistentry>
795
796 <varlistentry>
797 <term>
798 <option>lxc.rootfs.mount</option>
799 </term>
800 <listitem>
801 <para>
802 <!--
803 where to recursively bind <option>lxc.rootfs</option>
804 before pivoting. This is to ensure success of the
805 <citerefentry>
806 <refentrytitle><command>pivot_root</command></refentrytitle>
807 <manvolnum>8</manvolnum>
808 </citerefentry>
809 syscall. Any directory suffices, the default should
810 generally work.
811 -->
812 root ファイルシステムの変更の前に,<option>lxc.rootfs</option> を再帰的にどこにバインドするのかを指定します.これは
813 <citerefentry>
814 <refentrytitle><command>pivot_root</command></refentrytitle>
815 <manvolnum>8</manvolnum>
816 </citerefentry>
817 システムコールが確実に成功する事を保証します.どんなディレクトリでも良く,デフォルトでも通常は動くはずです.
818 </para>
819 </listitem>
820 </varlistentry>
821
822 <varlistentry>
823 <term>
824 <option>lxc.pivotdir</option>
825 </term>
826 <listitem>
827 <para>
828 <!--
829 where to pivot the original root file system under
830 <option>lxc.rootfs</option>, specified relatively to
831 that. The default is <filename>mnt</filename>.
832 It is created if necessary, and also removed after
833 unmounting everything from it during container setup.
834 -->
835 元の root ファイルシステムを,<option>lxc.rootfs</option> 以下のどこに移動させるかを <option>lxc.rootfs</option> からの相対パスで指定します.デフォルトは <filename>mnt</filename> です.これはもし必要であれば作成され,そしてコンテナのセットアップの間,全てアンマウントされた後で消去されます.
836 </para>
837 </listitem>
838 </varlistentry>
839 </variablelist>
840 </refsect2>
841
842 <refsect2>
843 <title>Control group</title>
844 <para>
845 <!--
846 The control group section contains the configuration for the
847 different subsystem. <command>lxc</command> does not check the
848 correctness of the subsystem name. This has the disadvantage
849 of not detecting configuration errors until the container is
850 started, but has the advantage of permitting any future
851 subsystem.
852 -->
853 CONTROL GROUP セクションは,(lxc とは) 別のサブシステムの設定を含みます.<command>lxc</command> は,このサブシステム名の正しさはチェックしません.実行時のエラーを検出するのに不便ですが,別の将来のサブシステムをサポート出来るという有利な点もあります.
854 </para>
855 <variablelist>
856 <varlistentry>
857 <term>
858 <option>lxc.cgroup.[subsystem name]</option>
859 </term>
860 <listitem>
861 <para>
862 <!--
863 specify the control group value to be set. The
864 subsystem name is the literal name of the control group
865 subsystem. The permitted names and the syntax of their
866 values is not dictated by LXC, instead it depends on the
867 features of the Linux kernel running at the time the
868 container is started,
869 eg. <option>lxc.cgroup.cpuset.cpus</option>
870 -->
871 設定する control group の値を指定します.サブシステム名は,control group のそのままの名前です.許される名前や値の書式は LXC が指示することはなく,コンテナが実行された時に実行されている Linux カーネルの機能に依存します.
872 例えば <option>lxc.cgroup.cpuset.cpus</option>
873 </para>
874 </listitem>
875 </varlistentry>
876 </variablelist>
877 </refsect2>
878
879 <refsect2>
880 <title><!-- Capabilities -->ケーパビリティ</title>
881 <para>
882 <!--
883 The capabilities can be dropped in the container if this one
884 is run as root.
885 -->
886 コンテナが root 権限で実行されていても,コンテナ内ではケーパビリティ (capabilities) を削除する事は可能です.
887 </para>
888 <variablelist>
889 <varlistentry>
890 <term>
891 <option>lxc.cap.drop</option>
892 </term>
893 <listitem>
894 <para>
895 <!--
896 Specify the capability to be dropped in the container. A
897 single line defining several capabilities with a space
898 separation is allowed. The format is the lower case of
899 the capability definition without the "CAP_" prefix,
900 eg. CAP_SYS_MODULE should be specified as
901 sys_module. See
902 <citerefentry>
903 <refentrytitle><command>capabilities</command></refentrytitle>
904 <manvolnum>7</manvolnum>
905 </citerefentry>,
906 -->
907 コンテナ内で削除するケーパビリティ (capability) を指定します.一行でスペース区切りで複数のケーパビリティを指定することも可能です.指定は,"CAP_" というプレフィックスなしで,小文字でケーパビリティを指定します.例えば,CAP_SYS_MODULE というケーパビリティは sys_module と指定する必要があります.詳しくは以下を参照してください.
908 <citerefentry>
909 <refentrytitle><command>capabilities</command></refentrytitle>
910 <manvolnum>7</manvolnum>
911 </citerefentry>
912 </para>
913 </listitem>
914 </varlistentry>
915 </variablelist>
916 </refsect2>
917 <refsect2>
918 <title><!-- UID mappings -->UID のマッピング</title>
919 <para>
920 <!--
921 A container can be started in a private user namespace with
922 user and group id mappings. For instance, you can map userid
923 0 in the container to userid 200000 on the host. The root
924 user in the container will be privileged in the container,
925 but unprivileged on the host. Normally a system container
926 will want a range of ids, so you would map, for instance,
927 user and group ids 0 through 20,000 in the container to the
928 ids 200,000 through 220,000.
929 -->
930 コンテナは,ユーザとグループの id のマッピングを持った専用のユーザ名前空間で起動することが可能です.たとえば,コンテナ内のユーザ id 0 を,ホストのユーザ id 200000 にマッピングすることが可能です.コンテナの root ユーザはコンテナ内では特権を持ちますが,ホストでは特権を持ちません.通常は,システムコンテナは id の範囲を要求し,それをマッピングします.例えば,コンテナ内のユーザとグループの id 0 から 20,000 を 200,000 から 220,000 にマッピングします.
931 </para>
932 <variablelist>
933 <varlistentry>
934 <term>
935 <option>lxc.id_map</option>
936 </term>
937 <listitem>
938 <para>
939 <!--
940 Four values must be provided. First a character, either
941 'u', or 'g', to specify whether user or group ids are
942 being mapped. Next is the first userid as seen in the
943 user namespace of the container. Next is the userid as
944 seen on the host. Finally, a range indicating the number
945 of consecutive ids to map.
946 -->
947 4 つの値を記述する必要があります.最初の文字は 'u' か 'g' のどちらかで,ユーザかグループの ID のどちらをマッピングするかを指定します.次はコンテナのユーザ名前空間内に現れる最初のユーザ ID です.その次は,そのユーザ ID のホスト上での値です.最後は,ID のマッピングをいくつ連続して行うかの数を指定します.
948 </para>
949 </listitem>
950 </varlistentry>
951 </variablelist>
952 </refsect2>
953
954 <refsect2>
955 <title><!-- Startup hooks -->スタート時のフック</title>
956 <para>
957 <!--
958 Startup hooks are programs or scripts which can be executed
959 at various times in a container's lifetime.
960 -->
961 起動時のフックは,コンテナの存続期間の色々な場面で実行することのできるプログラムやスクリプトです.
962 </para>
963 <variablelist>
964 <varlistentry>
965 <term>
966 <option>lxc.hook.pre-start</option>
967 </term>
968 <listitem>
969 <para>
970 <!--
971 A hook to be run in the host's namespace before the
972 container ttys, consoles, or mounts are up.
973 -->
974 コンテナの tty,コンソールの作成,マウントが実行される前に,ホストの名前空間内で実行するフック.
975 </para>
976 </listitem>
977 </varlistentry>
978 </variablelist>
979 <variablelist>
980 <varlistentry>
981 <term>
982 <option>lxc.hook.pre-mount</option>
983 </term>
984 <listitem>
985 <para>
986 <!--
987 A hook to be run in the container's fs namespace but before
988 the rootfs has been set up. This allows for manipulation
989 of the rootfs, i.e. to mount an encrypted filesystem. Mounts
990 done in this hook will not be reflected on the host (apart from
991 mounts propagation), so they will be automatically cleaned up
992 when the container shuts down.
993 -->
994 コンテナのファイルシステムの名前空間で実行されますが,rootfs が設定される前に実行するフック.これにより rootfs の操作が可能になります.例えば,暗号化されたファイルシステムのマウントなどです.このフック内でなされるマウントはホストには影響しません (mounts propagation を除いて).なので,それらはコンテナがシャットダウンする時に自動的にクリーンアップされます.
995 </para>
996 </listitem>
997 </varlistentry>
998 </variablelist>
999 <variablelist>
1000 <varlistentry>
1001 <term>
1002 <option>lxc.hook.mount</option>
1003 </term>
1004 <listitem>
1005 <para>
1006 <!--
1007 A hook to be run in the container's namespace after
1008 mounting has been done, but before the pivot_root.
1009 -->
1010 マウントが完了した後ですが,pivot_root の前にコンテナの名前空間で実行されるフック.
1011 </para>
1012 </listitem>
1013 </varlistentry>
1014 </variablelist>
1015 <variablelist>
1016 <varlistentry>
1017 <term>
1018 <option>lxc.hook.autodev</option>
1019 </term>
1020 <listitem>
1021 <para>
1022 <!--
1023 A hook to be run in the container's namespace after
1024 mounting has been done and after any mount hooks have
1025 run, but before the pivot_root, if
1026 <option>lxc.autodev</option> == 1.
1027 The purpose of this hook is to assist in populating the
1028 /dev directory of the container when using the autodev
1029 option for systemd based containers. The container's /dev
1030 directory is relative to the
1031 ${<option>LXC_ROOTFS_MOUNT</option>} environment
1032 variable available when the hook is run.
1033 -->
1034 <option>lxc.autodev</option> == 1 が設定されている場合で,マウントが完了し,マウント時のフックも実行された後ですが,pivot_root の前にコンテナの名前空間で実行するフック.
1035 このフックの目的は,systemd ベースのコンテナ向けの autodev オプションが設定されている時に,コンテナの /dev ディレクトリを設定するのを支援することです.コンテナの /dev ディレクトリは,このフックが実行される時有効な ${<option>LXC_ROOTFS_MOUNT</option>} 環境変数からの相対パスとなります.
1036 </para>
1037 </listitem>
1038 </varlistentry>
1039 </variablelist>
1040 <variablelist>
1041 <varlistentry>
1042 <term>
1043 <option>lxc.hook.start</option>
1044 </term>
1045 <listitem>
1046 <para>
1047 <!--
1048 A hook to be run in the container's namespace immediately
1049 before executing the container's init. This requires the
1050 program to be available in the container.
1051 -->
1052 コンテナの init が実行される直前にコンテナの名前空間で実行されるフック.コンテナ内で利用可能なプログラムである必要があります.
1053 </para>
1054 </listitem>
1055 </varlistentry>
1056 </variablelist>
1057 <variablelist>
1058 <varlistentry>
1059 <term>
1060 <option>lxc.hook.post-stop</option>
1061 </term>
1062 <listitem>
1063 <para>
1064 <!--
1065 A hook to be run in the host's namespace after the
1066 container has been shut down.
1067 -->
1068 コンテナがシャットダウンされた後にホストの名前空間で実行するフック.
1069 </para>
1070 </listitem>
1071 </varlistentry>
1072 </variablelist>
1073 </refsect2>
1074
1075 <refsect2>
1076 <title><!-- Startup hooks Environment Variables -->スタート時のフックで使える環境変数</title>
1077 <para>
1078 <!--
1079 A number of environment variables are made available to the startup
1080 hooks to provide configuration information and assist in the
1081 functioning of the hooks. Not all variables are valid in all
1082 contexts. In particular, all paths are relative to the host system
1083 and, as such, not valid during the <option>lxc.hook.start</option> hook.
1084 -->
1085 起動時のフックに設定情報を提供し,フックの機能を助けるための環境変数がいくつか利用可能です.全ての変数が全てのコンテキストで利用可能なわけではありません.具体的には,全てのパスはホストシステム上のパスであり,そのため,<option>lxc.hook.start</option> フックの時点では使用できません.
1086 </para>
1087 <variablelist>
1088 <varlistentry>
1089 <term>
1090 <option>LXC_NAME</option>
1091 </term>
1092 <listitem>
1093 <para>
1094 <!--
1095 The LXC name of the container. Useful for logging messages
1096 in commmon log environments. [<option>-n</option>]
1097 -->
1098 LXC コンテナの名前.共通のログ環境内でのログメッセージに使うときに便利です.[<option>-n</option>]
1099 </para>
1100 </listitem>
1101 </varlistentry>
1102 </variablelist>
1103 <variablelist>
1104 <varlistentry>
1105 <term>
1106 <option>LXC_CONFIG_FILE</option>
1107 </term>
1108 <listitem>
1109 <para>
1110 <!--
1111 Host relative path to the container configuration file. This
1112 gives the container to reference the original, top level,
1113 configuration file for the container in order to locate any
1114 addotional configuration information not otherwise made
1115 available. [<option>-f</option>]
1116 -->
1117 コンテナの設定ファイルのホスト上でのパス.これは,他の方法では得られない追加の設定情報を見つけるために,コンテナに,元の,トップレベルの設定ファイルの位置を与えるものです. [<option>-f</option>]
1118 </para>
1119 </listitem>
1120 </varlistentry>
1121 </variablelist>
1122 <variablelist>
1123 <varlistentry>
1124 <term>
1125 <option>LXC_CONSOLE</option>
1126 </term>
1127 <listitem>
1128 <para>
1129 <!--
1130 The path to the console output of the container if not NULL.
1131 [<option>-c</option>] [<option>lxc.console</option>]
1132 -->
1133 設定されている場合のコンテナのコンソール出力のパス.
1134 [<option>-c</option>] [<option>lxc.console</option>]
1135 </para>
1136 </listitem>
1137 </varlistentry>
1138 </variablelist>
1139 <variablelist>
1140 <varlistentry>
1141 <term>
1142 <option>LXC_CONSOLE_LOGPATH</option>
1143 </term>
1144 <listitem>
1145 <para>
1146 <!--
1147 The path to the console log output of the container if not NULL.
1148 [<option>-L</option>]
1149 -->
1150 設定されている場合のコンテナのコンソールログ出力のパス.
1151 [<option>-L</option>]
1152 </para>
1153 </listitem>
1154 </varlistentry>
1155 </variablelist>
1156 <variablelist>
1157 <varlistentry>
1158 <term>
1159 <option>LXC_ROOTFS_MOUNT</option>
1160 </term>
1161 <listitem>
1162 <para>
1163 <!--
1164 The mount location to which the container is initially bound.
1165 This will be the host relative path to the container rootfs
1166 for the container instance being started and is where changes
1167 should be made for that instance.
1168 [<option>lxc.rootfs.mount</option>]
1169 -->
1170 初期にコンテナがマウントされる場所.これは,コンテナインスタンスが起動するためのコンテナの rootfs へのホスト上のパスであり,インスタンスのための移行が行われる場所です.
1171 [<option>lxc.rootfs.mount</option>]
1172 </para>
1173 </listitem>
1174 </varlistentry>
1175 </variablelist>
1176 <variablelist>
1177 <varlistentry>
1178 <term>
1179 <option>LXC_ROOTFS_PATH</option>
1180 </term>
1181 <listitem>
1182 <para>
1183 <!--
1184 The host relative path to the container root which has been
1185 mounted to the rootfs.mount location.
1186 [<option>lxc.rootfs</option>]
1187 -->
1188 rootfs.mount へマウントされるコンテナのルートへのホスト上のパスです.
1189 </para>
1190 </listitem>
1191 </varlistentry>
1192 </variablelist>
1193
1194 </refsect2>
1195
1196 </refsect1>
1197
1198 <refsect1>
1199 <title><!-- Examples -->例</title>
1200 <para>
1201 <!--
1202 In addition to the few examples given below, you will find
1203 some other examples of configuration file in @DOCDIR@/examples
1204 -->
1205 以下に紹介するいくつかの例に加えて,他の設定例が @DOCDIR@/examples にあります.
1206 </para>
1207 <refsect2>
1208 <title><!-- Network -->ネットワーク</title>
1209 <para>
1210 <!--
1211 This configuration sets up a container to use a veth pair
1212 device with one side plugged to a bridge br0 (which has been
1213 configured before on the system by the administrator). The
1214 virtual network device visible in the container is renamed to
1215 eth0.
1216 -->
1217 この設定は,片方をブリッジである br0 と接続される veth ペアデバイスを使うコンテナを設定します (ブリッジは管理者によりあらかじめシステム上に設定済みである必要があります).仮想ネットワークデバイスは,コンテナ内では eth0 とリネームされます.
1218 </para>
1219 <programlisting>
1220 lxc.utsname = myhostname
1221 lxc.network.type = veth
1222 lxc.network.flags = up
1223 lxc.network.link = br0
1224 lxc.network.name = eth0
1225 lxc.network.hwaddr = 4a:49:43:49:79:bf
1226 lxc.network.ipv4 = 1.2.3.5/24 1.2.3.255
1227 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
1228 </programlisting>
1229 </refsect2>
1230
1231 <refsect2>
1232 <title><!-- UID/GID mapping -->UID/GID のマッピング</title>
1233 <para><!-- This configuration will map both user and group ids in the
1234 range 0-9999 in the container to the ids 100000-109999 on the host. -->
1235 この設定は,コンテナ内のユーザとグループ両方の id 0-9999 の範囲を,ホスト上の 100000-109999 へマッピングします.
1236 </para>
1237 <programlisting>
1238 lxc.id_map = u 0 100000 10000
1239 lxc.id_map = g 0 100000 10000
1240 </programlisting>
1241 </refsect2>
1242
1243 <refsect2>
1244 <title>Control group</title>
1245 <para>
1246 <!-- This configuration will setup several control groups for
1247 the application, cpuset.cpus restricts usage of the defined cpu,
1248 cpus.share prioritize the control group, devices.allow makes
1249 usable the specified devices.-->
1250 この設定は,アプリケーションのための control group をいくつか設定します.cpuset.cpus は定義された cpu のみ使用できるように制限します.cpus.share は,control group の (cpu) 優先度を指定します.devices.allow は,特定のデバイスを使用可能にします.
1251 </para>
1252 <programlisting>
1253 lxc.cgroup.cpuset.cpus = 0,1
1254 lxc.cgroup.cpu.shares = 1234
1255 lxc.cgroup.devices.deny = a
1256 lxc.cgroup.devices.allow = c 1:3 rw
1257 lxc.cgroup.devices.allow = b 8:0 rw
1258 </programlisting>
1259 </refsect2>
1260
1261 <refsect2>
1262 <title><!-- Complex configuration -->複雑な設定</title>
1263 <para>
1264 <!-- This example show a complex configuration making a complex
1265 network stack, using the control groups, setting a new hostname,
1266 mounting some locations and a changing root file system. -->
1267 この例は,control group を使って,複雑なネットワークスタックを作成し,新しいホスト名を指定し,いくつかの場所をマウントし,ルートファイルシステムを変更するような複雑な設定を示します.
1268 </para>
1269 <programlisting>
1270 lxc.utsname = complex
1271 lxc.network.type = veth
1272 lxc.network.flags = up
1273 lxc.network.link = br0
1274 lxc.network.hwaddr = 4a:49:43:49:79:bf
1275 lxc.network.ipv4 = 10.2.3.5/24 10.2.3.255
1276 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3597
1277 lxc.network.ipv6 = 2003:db8:1:0:214:5432:feab:3588
1278 lxc.network.type = macvlan
1279 lxc.network.flags = up
1280 lxc.network.link = eth0
1281 lxc.network.hwaddr = 4a:49:43:49:79:bd
1282 lxc.network.ipv4 = 10.2.3.4/24
1283 lxc.network.ipv4 = 192.168.10.125/24
1284 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3596
1285 lxc.network.type = phys
1286 lxc.network.flags = up
1287 lxc.network.link = dummy0
1288 lxc.network.hwaddr = 4a:49:43:49:79:ff
1289 lxc.network.ipv4 = 10.2.3.6/24
1290 lxc.network.ipv6 = 2003:db8:1:0:214:1234:fe0b:3297
1291 lxc.cgroup.cpuset.cpus = 0,1
1292 lxc.cgroup.cpu.shares = 1234
1293 lxc.cgroup.devices.deny = a
1294 lxc.cgroup.devices.allow = c 1:3 rw
1295 lxc.cgroup.devices.allow = b 8:0 rw
1296 lxc.mount = /etc/fstab.complex
1297 lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
1298 lxc.rootfs = /mnt/rootfs.complex
1299 lxc.cap.drop = sys_module mknod setuid net_raw
1300 lxc.cap.drop = mac_override
1301 </programlisting>
1302 </refsect2>
1303
1304 </refsect1>
1305
1306 <refsect1>
1307 <title>See Also</title>
1308 <simpara>
1309 <citerefentry>
1310 <refentrytitle><command>chroot</command></refentrytitle>
1311 <manvolnum>1</manvolnum>
1312 </citerefentry>,
1313
1314 <citerefentry>
1315 <refentrytitle><command>pivot_root</command></refentrytitle>
1316 <manvolnum>8</manvolnum>
1317 </citerefentry>,
1318
1319 <citerefentry>
1320 <refentrytitle><filename>fstab</filename></refentrytitle>
1321 <manvolnum>5</manvolnum>
1322 </citerefentry>
1323
1324 </simpara>
1325 </refsect1>
1326
1327 &seealso;
1328
1329 <refsect1>
1330 <title><!-- Author -->作者</title>
1331 <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
1332 </refsect1>
1333
1334 </refentry>
1335
1336 <!-- Keep this comment at the end of the file
1337 Local variables:
1338 mode: sgml
1339 sgml-omittag:t
1340 sgml-shorttag:t
1341 sgml-minimize-attributes:nil
1342 sgml-always-quote-attributes:t
1343 sgml-indent-step:2
1344 sgml-indent-data:t
1345 sgml-parent-document:nil
1346 sgml-default-dtd-file:nil
1347 sgml-exposed-tags:nil
1348 sgml-local-catalogs:nil
1349 sgml-local-ecat-files:nil
1350 End:
1351 -->