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