/
lxc.container.conf.sgml.in
2334 lines (2234 loc) · 106 KB
/
lxc.container.conf.sgml.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!--
lxc: linux Container library
(C) Copyright IBM Corp. 2007, 2008
Authors:
Daniel Lezcano <daniel.lezcano at free.fr>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Translated into Japanese
by KATOH Yasufumi <karma at jazz.email.ne.jp>
-->
<!DOCTYPE refentry PUBLIC @docdtd@ [
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
]>
<refentry>
<docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
<refmeta>
<refentrytitle>lxc.container.conf</refentrytitle>
<manvolnum>5</manvolnum>
</refmeta>
<refnamediv>
<refname>lxc.container.conf</refname>
<refpurpose>
<!--
LXC container configuration file
-->
LXC コンテナ設定ファイル
</refpurpose>
</refnamediv>
<refsect1>
<title><!-- Description -->説明</title>
<para>
<!--
The linux containers (<command>lxc</command>) are always created
before being used. This creation defines a set of system
resources to be virtualized / isolated when a process is using
the container. By default, the pids, sysv ipc and mount points
are virtualized and isolated. The other system resources are
shared across containers, until they are explicitly defined in
the configuration file. For example, if there is no network
configuration, the network will be shared between the creator of
the container and the container itself, but if the network is
specified, a new network stack is created for the container and
the container can no longer use the network of its ancestor.
-->
linux コンテナ (<command>lxc</command>) は、常に使用する前に作成されます。
コンテナは、プロセスがコンテナを使う時に仮想化/隔離するシステムリソースのセットを定義することによって作成します。
デフォルトでは、pid, sysv ipc, マウントポイントが仮想化され、隔離されます。
他のシステムリソースは、設定ファイルで明確に定義されない限りは、コンテナをまたいで共有されます。
例えば、もしネットワークが設定されていなければ、コンテナを作成する側とコンテナでネットワークを共有します。
しかし、ネットワークが指定されれば、新しいネットワークスタックがコンテナ用に作成され、コンテナは作成元の環境のネットワークを使いません。
</para>
<para>
<!--
The configuration file defines the different system resources to
be assigned for the container. At present, the utsname, the
network, the mount points, the root file system, the user namespace,
and the control groups are supported.
-->
設定ファイルは、コンテナに割り当てられる様々なシステムリソースを定義します。
現時点では、utsname、ネットワーク、マウントポイント、root ファイルシステム、ユーザ名前空間、control groups がサポートされます。
</para>
<para>
<!--
Each option in the configuration file has the form <command>key
= value</command> fitting in one line. The '#' character means
the line is a comment.
-->
設定ファイルのオプション一つを、<command>key = value</command> の形で一行で表します。
'#' は、その行はコメントであることを示します。
</para>
<refsect2>
<title><!-- Configuration -->設定</title>
<para>
<!--
In order to ease administration of multiple related containers, it
is possible to have a container configuration file cause another
file to be loaded. For instance, network configuration
can be defined in one common file which is included by multiple
containers. Then, if the containers are moved to another host,
only one file may need to be updated.
-->
複数の関係するコンテナの管理を容易にするために、コンテナの設定ファイルに別のファイルをロードすることが可能です。
例えば、ネットワークの設定を、複数のコンテナから include させるように 1 つのファイルに定義することが可能です。
その場合、コンテナが他のホストに移動すると、そのファイルだけを更新する必要があるかもしれません。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.include</option>
</term>
<listitem>
<para>
<!--
Specify the file to be included. The included file must be
in the same valid lxc configuration file format.
-->
include させたいファイルを指定します。
include するファイルは、lxc 設定ファイルのフォーマットとして有効でなければいけません。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Architecture -->アーキテクチャ</title>
<para>
<!--
Allows one to set the architecture for the container. For example,
set a 32bits architecture for a container running 32bits
binaries on a 64bits host. That fixes the container scripts
which rely on the architecture to do some work like
downloading the packages.
-->
コンテナに対してアーキテクチャを設定することが可能です。
例えば、64 ビットのホスト上で 32 ビットのバイナリを動かすために 32 ビットアーキテクチャを設定することが可能です。
この設定を行うことにより、パッケージのダウンロードを行うなどの作業のうち、アーキテクチャ名に依存するような作業を行うコンテナスクリプトの修正を行います。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.arch</option>
</term>
<listitem>
<para>
<!--
Specify the architecture for the container.
-->
コンテナに設定するアーキテクチャを指定します。
</para>
<para>
<!--
Valid options are
<option>x86</option>,
<option>i686</option>,
<option>x86_64</option>,
<option>amd64</option>
-->
有効なオプションは以下です。
<option>x86</option>,
<option>i686</option>,
<option>x86_64</option>,
<option>amd64</option>
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Hostname -->ホスト名</title>
<para>
<!--
The utsname section defines the hostname to be set for the
container. That means the container can set its own hostname
without changing the one from the system. That makes the
hostname private for the container.
-->
utsname セクションは、コンテナに設定されるホスト名を定義します。
コンテナは、システムのホスト名を変えることなく、自身のホスト名を持つ事が可能です。
このことにより、ホスト名はコンテナ専用となります。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.utsname</option>
</term>
<listitem>
<para>
<!--
specify the hostname for the container
-->
コンテナのホスト名を指定します。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Halt signal -->クリーンなシャットダウン時のシグナル</title>
<para>
<!--
Allows one to specify signal name or number, sent by lxc-stop to the
container's init process to cleanly shutdown the container. Different
init systems could use different signals to perform clean shutdown
sequence. This option allows the signal to be specified in kill(1)
fashion, e.g. SIGPWR, SIGRTMIN+14, SIGRTMAX-10 or plain number. The
default signal is SIGPWR.
-->
lxc-stop がコンテナをクリーンにシャットダウンするためにコンテナの init プロセスに送るシグナル名か番号を指定することができます。
init システムによって、クリーンなシャットダウンを行うために使うシグナルは異なります。
このオプションではシグナルとして kill(1) で使う形式を指定することができます。
例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGPWR です。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.haltsignal</option>
</term>
<listitem>
<para>
<!--
specify the signal used to halt the container
-->
コンテナをシャットダウンするのに使うシグナルを指定します
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Stop signal -->強制停止時のシグナル</title>
<para>
<!--
Allows one to specify signal name or number, sent by lxc-stop to forcibly
shutdown the container. This option allows signal to be specified in
kill(1) fashion, e.g. SIGKILL, SIGRTMIN+14, SIGRTMAX-10 or plain number.
The default signal is SIGKILL.
-->
lxc-stop がコンテナを強制的にシャットダウンするために送るシグナル名か番号を指定することができます。
このオプションではシグナルとして kill(1) で使う形式を指定することができます。
例えば SIGKILL, SIGRTMIN+14, SIGRTMAX-10 のような形式、もしくは数字を指定します。デフォルトのシグナルは SIGKILL です。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.stopsignal</option>
</term>
<listitem>
<para>
<!--
specify the signal used to stop the container
-->
コンテナを停止するのに使用するシグナルを指定します。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Network -->ネットワーク</title>
<para>
<!--
The network section defines how the network is virtualized in
the container. The network virtualization acts at layer
two. In order to use the network virtualization, parameters
must be specified to define the network interfaces of the
container. Several virtual interfaces can be assigned and used
in a container even if the system has only one physical
network interface.
-->
ネットワークセクションは、コンテナ内でどのようにネットワークを仮想化するかを定義します。
ネットワークの仮想化はレイヤー 2 で作動します。
ネットワークの仮想化を使用するためには、コンテナのネットワークインターフェースを定義しなければなりません。
いくつかの仮想インターフェースをアサインすることができます。
そして、仮に物理ネットワークインターフェースが一つしかなくても、コンテナ内でいくつもの仮想インターフェースを使うことができます。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.network.type</option>
</term>
<listitem>
<para>
<!--
specify what kind of network virtualization to be used
for the container. Each time
a <option>lxc.network.type</option> field is found a new
round of network configuration begins. In this way,
several network virtualization types can be specified
for the same container, as well as assigning several
network interfaces for one container. The different
virtualization types can sbe:
-->
コンテナがどの種類のネットワーク仮想化を使うかを指定します。
一つのネットワークの設定ごとに <option>lxc.network.type</option> フィールドを指定します。
このように、一つのコンテナに複数のネットワークインターフェースを割り当てることができるだけでなく、同じコンテナに対して複数のネットワーク仮想化の種類を指定することが出来ます。
仮想化の種類は以下の値を取る事が出来ます:
</para>
<para>
<!--
<option>none:</option> will cause the container to share
the host's network namespace. This means the host
network devices are usable in the container. It also
means that if both the container and host have upstart as
init, 'halt' in a container (for instance) will shut down the
host.
-->
<option>none:</option> ホストのネットワーク名前空間を共有します。
これにより、ホストのネットワークデバイスをコンテナ内で使うことが可能になります。
もしコンテナもホストも init として upstart を使っている場合、(例えば) コンテナ内で 'halt' を実行すると、ホストがシャットダウンしてしまうことにもなります。
</para>
<para>
<!--
<option>empty:</option> will create only the loopback
interface.
-->
<option>empty:</option> ループバックインターフェースだけを作成します。
</para>
<para>
<!--
<option>veth:</option> a peer network device is created
with one side assigned to the container and the other
side is attached to a bridge specified by
the <option>lxc.network.link</option>. If the bridge is
not specified, then the veth pair device will be created
but not attached to any bridge. Otherwise, the bridge
has to be setup before on the
system, <command>lxc</command> won't handle any
configuration outside of the container. By
default <command>lxc</command> choose a name for the
network device belonging to the outside of the
container, this name is handled
by <command>lxc</command>, but if you wish to handle
this name yourself, you can tell <command>lxc</command>
to set a specific name with
the <option>lxc.network.veth.pair</option> option (except for
unprivileged containers where this option is ignored for security
reasons).
-->
<option>veth:</option> 一方がコンテナに、もう一方が <option>lxc.network.link</option> で指定されるブリッジにアタッチされる、ピアネットワークデバイスを作成します。
もし、ブリッジが指定されていない場合、veth ペアデバイスは作成されますが、ブリッジにはアタッチされません。
ブリッジはシステムで事前に設定する必要があります。
さもなければ、<command>lxc</command> はコンテナ外のいかなる設定も扱うことはできないでしょう。
デフォルトでは、<command>lxc</command> はコンテナの外部に属するネットワークデバイスに対する名前を決定し、<command>lxc</command> はこの名前を使います。
しかし、もしこの名前を自分で指定したい場合、<option>lxc.network.veth.pair</option> オプションを使って名前を設定し、lxc に対して指定をすることができます (非特権コンテナの場合をのぞきます。セキュリティ上の理由からこのオプションは無視されます)。
</para>
<para>
<!--
<option>vlan:</option> a vlan interface is linked with
the interface specified by
the <option>lxc.network.link</option> and assigned to
the container. The vlan identifier is specified with the
option <option>lxc.network.vlan.id</option>.
-->
<option>vlan:</option> vlan インターフェースは <option>lxc.network.link</option> で指定されたインターフェースとリンクし、コンテナに割り当てられます。
vlan の指定は <option>lxc.network.vlan.id</option> オプションで指定します。
</para>
<para>
<!--
<option>macvlan:</option> a macvlan interface is linked
with the interface specified by
the <option>lxc.network.link</option> and assigned to
the container.
<option>lxc.network.macvlan.mode</option> specifies the
mode the macvlan will use to communicate between
different macvlan on the same upper device. The accepted
modes are <option>private</option>, the device never
communicates with any other device on the same upper_dev (default),
<option>vepa</option>, the new Virtual Ethernet Port
Aggregator (VEPA) mode, it assumes that the adjacent
bridge returns all frames where both source and
destination are local to the macvlan port, i.e. the
bridge is set up as a reflective relay. Broadcast
frames coming in from the upper_dev get flooded to all
macvlan interfaces in VEPA mode, local frames are not
delivered locally, or <option>bridge</option>, it
provides the behavior of a simple bridge between
different macvlan interfaces on the same port. Frames
from one interface to another one get delivered directly
and are not sent out externally. Broadcast frames get
flooded to all other bridge ports and to the external
interface, but when they come back from a reflective
relay, we don't deliver them again. Since we know all
the MAC addresses, the macvlan bridge mode does not
require learning or STP like the bridge module does.
-->
<option>macvlan:</option> macvlan インターフェースは <option>lxc.network.link</option> により指定されるインターフェースとリンクし、コンテナに割り当てられます。
<option>lxc.network.macvlan.mode</option> でモードを指定すると、その macvlan の指定を、同じ上位デバイスで異なる macvlan の間の通信をする時に使います。
受け入れられたモードが <option>private</option> であれば、デバイスは同じ上位デバイスの他のデバイスとの通信を行いません (デフォルト)。
新しい仮想イーサネットポート集約モード (Virtual Ethernet Port Aggregator (VEPA)) である <option>vepa</option> は、隣接したポートが、ソースとデスティネーションの両方が macvlan ポートに対してローカルであるフレームを全て返すと仮定します。
すなわち、ブリッジが reflective relay として設定されているということです。
上位デバイスから入ってくるブロードキャストフレームは、VEPA モードである全ての macvlan インターフェースに送りつけられます。
ローカルのフレームはローカルには配送されません。
<option>bridge</option> の指定は、同じポートの異なる macvlan インターフェースの間のシンプルなブリッジとして動作します。
あるインターフェースから他のインターフェースへのフレームは、直接配送され、外部には送出されません。
ブロードキャストフレームは、全ての他のブリッジと外部のインターフェースに対して送られます。
しかし、reflective relay からフレームが返ってきたときは、再度それを配送することはしません。
全ての MAC アドレスを知っているので、ブリッジモジュールのように、macvlan ブリッジモードは学習や STP の必要はありません。
</para>
<para>
<!--
<option>phys:</option> an already existing interface
specified by the <option>lxc.network.link</option> is
assigned to the container.
-->
<option>phys:</option> <option>lxc.network.link</option> で指定された、すでに存在しているインターフェースがコンテナに割り当てられます。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.flags</option>
</term>
<listitem>
<para>
<!--
specify an action to do for the
network.
-->
ネットワークに対して行うアクションを指定します。
</para>
<para>
<!--
<option>up:</option> activates the interface.
-->
<option>up:</option> インターフェースを起動させます。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.link</option>
</term>
<listitem>
<para>
<!--
specify the interface to be used for real network
traffic.
-->
実際のネットワークトラフィックに使うインターフェースを指定します。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.mtu</option>
</term>
<listitem>
<para>
<!--
specify the maximum transfer unit for this interface.
-->
インターフェースに対する MTU を指定します。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.name</option>
</term>
<listitem>
<para>
<!--
the interface name is dynamically allocated, but if
another name is needed because the configuration files
being used by the container use a generic name,
eg. eth0, this option will rename the interface in the
container.
-->
インターフェース名は動的に割り当てられます。
しかし、もしコンテナが使用する設定ファイルが一般的な名前を使用するために、他の特定の名前が必要であれば (例えば eth0 など)、コンテナ内のインターフェースは、このオプションで指定した名前にリネームされます。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.hwaddr</option>
</term>
<listitem>
<para>
<!--
the interface mac address is dynamically allocated by
default to the virtual interface, but in some cases,
this is needed to resolve a mac address conflict or to
always have the same link-local ipv6 address.
Any "x" in address will be replaced by random value,
this allows setting hwaddr templates.
-->
仮想インターフェースの MAC アドレスは、デフォルトでは動的に割り当てられます。
しかし、MAC アドレスの衝突や、リンクローカルIPv6 アドレスを常に同じにした場合などは、このオプションが必要です。
アドレス中の "x" という文字は、ランダムな値に置き換えられます。
これによりテンプレートに hwaddr を設定することが可能になります。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.ipv4</option>
</term>
<listitem>
<para>
<!--
specify the ipv4 address to assign to the virtualized
interface. Several lines specify several ipv4 addresses.
The address is in format x.y.z.t/m,
eg. 192.168.1.123/24.The broadcast address should be
specified on the same line, right after the ipv4
address.
-->
仮想インターフェースに割り当てる ipv4 アドレスを指定します。
複数行により複数の ipv4 アドレスを指定します。
このアドレスは x.y.z.t/m というフォーマットで指定します。
例えば、192.168.1.123/24。ブロードキャストアドレスも同じ行の ipv4 アドレスのすぐ後で指定しなくてはなりません。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.ipv4.gateway</option>
</term>
<listitem>
<para>
<!--
specify the ipv4 address to use as the gateway inside the
container. The address is in format x.y.z.t, eg.
192.168.1.123.
Can also have the special value <option>auto</option>,
which means to take the primary address from the bridge
interface (as specified by the
<option>lxc.network.link</option> option) and use that as
the gateway. <option>auto</option> is only available when
using the <option>veth</option> and
<option>macvlan</option> network types.
-->
コンテナでゲートウェイとして使う IPv4 アドレスを指定します。
アドレスは x.y.z.t というフォーマットです。
例えば、192.168.1.123。
<option>auto</option> という特別な値を記述する事も可能です。
これは (<option>lxc.network.link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し、それをゲートウェイに使うという意味になります。
<option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.ipv6</option>
</term>
<listitem>
<para>
<!--
specify the ipv6 address to assign to the virtualized
interface. Several lines specify several ipv6 addresses.
The address is in format x::y/m,
eg. 2003:db8:1:0:214:1234:fe0b:3596/64
-->
仮想インターフェースに割り当てる ipv6 アドレスを指定します。
複数行により複数の ipv6 アドレスを指定します。
このアドレスは x::y/m というフォーマットで指定します。
例えば、2003:db8:1:0:214:1234:fe0b:3596/64。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.ipv6.gateway</option>
</term>
<listitem>
<para>
<!--
specify the ipv6 address to use as the gateway inside the
container. The address is in format x::y,
eg. 2003:db8:1:0::1
Can also have the special value <option>auto</option>,
which means to take the primary address from the bridge
interface (as specified by the
<option>lxc.network.link</option> option) and use that as
the gateway. <option>auto</option> is only available when
using the <option>veth</option> and
<option>macvlan</option> network types.
-->
コンテナでゲートウェイとして使う IPv6 アドレスを指定します。
アドレスは x::y というフォーマットです。例えば、2003:db8:1:0::1。
<option>auto</option> という特別な値を記述する事も可能です。
これは (<option>lxc.network.link</option> で指定した) ブリッジインターフェースの最初のアドレスを使用し、それをゲートウェイに使うという意味になります。
<option>auto</option> はネットワークタイプとして <option>veth</option> と <option>macvlan</option> を指定している時だけ有効となります。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.script.up</option>
</term>
<listitem>
<para>
<!--
add a configuration option to specify a script to be
executed after creating and configuring the network used
from the host side. The following arguments are passed
to the script: container name and config section name
(net) Additional arguments depend on the config section
employing a script hook; the following are used by the
network system: execution context (up), network type
(empty/veth/macvlan/phys), Depending on the network
type, other arguments may be passed:
veth/macvlan/phys. And finally (host-sided) device name.
-->
ホスト側から使われる、ネットワークの作成と設定が済んだ後に実行するスクリプトを指定します。
以下の引数がスクリプトに渡されます: コンテナ名、設定セクション名(net)。
その後の引数はスクリプトのフックで使われる設定セクションに依存します。
以下がネットワークシステムによって使われます: 実行コンテキスト (up)、ネットワークのタイプ (empty/veth/macvlan/phys)
ネットワークのタイプによっては、更に別の引数が渡されるかもしれません: veth/macvlan/phys の場合 (ホスト側の) デバイス名
</para>
<para>
<!--
Standard output from the script is logged at debug level.
Standard error is not logged, but can be captured by the
hook redirecting its standard error to standard output.
-->
スクリプトからの標準出力は debug レベルでロギングされます。
標準エラー出力はロギングされません。
しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.network.script.down</option>
</term>
<listitem>
<para>
<!--
add a configuration option to specify a script to be
executed before destroying the network used from the
host side. The following arguments are passed to the
script: container name and config section name (net)
Additional arguments depend on the config section
employing a script hook; the following are used by the
network system: execution context (down), network type
(empty/veth/macvlan/phys), Depending on the network
type, other arguments may be passed:
veth/macvlan/phys. And finally (host-sided) device name.
-->
ホスト側から使われる、ネットワークを破壊する前に実行するスクリプトを指定します。
以下の引数がスクリプトに渡されます: コンテナ名、設定セクション名(net)。
その後の引数はスクリプトのフックで使われる設定セクションに依存します。
以下がネットワークシステムによって使われます: 実行コンテキスト (up)、ネットワークのタイプ (empty/veth/macvlan/phys)。
ネットワークのタイプによっては、更に別の引数が渡されるかもしれません: veth/macvlan/phys。そして最後に (ホスト側の) デバイス名が渡されます。
</para>
<para>
<!--
Standard output from the script is logged at debug level.
Standard error is not logged, but can be captured by the
hook redirecting its standard error to standard output.
-->
スクリプトからの標準出力は debug レベルでロギングされます。
標準エラー出力はロギングされません。
しかし、フックの標準エラー出力を標準出力にリダイレクトすることにより保存することは可能です。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- New pseudo tty instance (devpts) -->新しい擬似端末のインスタンス (devpts)</title>
<para>
<!--
For stricter isolation the container can have its own private
instance of the pseudo tty.
-->
さらに厳しい隔離のために、コンテナは自身のプライベートな pseudo tty (擬似端末) を持つことが可能です。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.pts</option>
</term>
<listitem>
<para>
<!--
If set, the container will have a new pseudo tty
instance, making this private to it. The value specifies
the maximum number of pseudo ttys allowed for a pts
instance (this limitation is not implemented yet).
-->
もし設定された場合、コンテナは新しい psuedo tty インスタンスを持ち、それを自身のプライベートとします。
この値は pts インスタンスに許可される pseudo tty の最大数を指定します (この制限はまだ実装されていません)。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Container system console -->コンテナのシステムコンソール</title>
<para>
<!--
If the container is configured with a root filesystem and the
inittab file is setup to use the console, you may want to specify
where the output of this console goes.
-->
コンテナでルートファイルシステムを持つように設定されており、inittab ファイルでコンソールの使用が設定されている場合、このコンソールの出力がどこになされるのかを指定したいと思うでしょう。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.console</option>
</term>
<listitem>
<para>
<!--
Specify a path to a file where the console output will
be written. The keyword 'none' will simply disable the
console. This is dangerous once if have a rootfs with a
console device file where the application can write, the
messages will fall in the host.
-->
コンソールの出力が書かれるファイルのパスを指定します。'none' というキーワードは、単純にコンソールを無効にします。
この設定は、アプリケーションが書き込む事ができるコンソールデバイスファイルが rootfs に存在する場合、メッセージがホスト側に出力されるので危険です。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Console through the ttys -->tty を通したコンソール</title>
<para>
<!--
This option is useful if the container is configured with a root
filesystem and the inittab file is setup to launch a getty on the
ttys. The option specifies the number of ttys to be available for
the container. The number of gettys in the inittab file of the
container should not be greater than the number of ttys specified
in this option, otherwise the excess getty sessions will die and
respawn indefinitely giving annoying messages on the console or in
<filename>/var/log/messages</filename>.
-->
このオプションはコンテナが root ファイルシステムを持つように設定されており、inittab ファイルで tty 上に getty の起動が設定されている場合に役に立ちます。
このオプションはコンテナで利用できる tty の数を指定します。
inittab ファイルに設定する getty の数は、このオプションの指定する tty の数より大きくしてはいけません。
さもなければ、超過した分の getty セッションはコンソールか /var/log/messages にうっとうしいメッセージを生死を表示しながら、永久に生死を繰り返すでしょう。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.tty</option>
</term>
<listitem>
<para>
<!--
Specify the number of tty to make available to the
container.
-->
コンテナに作成出来る tty の数を指定します。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Console devices location -->コンソールデバイスの位置</title>
<para>
<!--
LXC consoles are provided through Unix98 PTYs created on the
host and bind-mounted over the expected devices in the container.
By default, they are bind-mounted over <filename>/dev/console</filename>
and <filename>/dev/ttyN</filename>. This can prevent package upgrades
in the guest. Therefore you can specify a directory location (under
<filename>/dev</filename> under which LXC will create the files and
bind-mount over them. These will then be symbolically linked to
<filename>/dev/console</filename> and <filename>/dev/ttyN</filename>.
A package upgrade can then succeed as it is able to remove and replace
the symbolic links.
-->
LXC のコンソールはホストによって作られ、コンテナ内で要求されたデバイスに bind マウントされた Unix98 PTY 経由で提供されます。
デフォルトでは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> に bind マウントされます。
これはゲスト内でのパッケージのアップグレードを妨げる可能性があります。
なので <filename>/dev</filename> 以下のディレクトリを指定することができます。
LXC はこのディレクトリ以下にファイルを作成し、これらのファイルを bind マウントします。
そして、これらの (作成された) ファイルは <filename>/dev/console</filename> と <filename>/dev/ttyN</filename> にシンボリックリンクされます。
シンボリックリンクを消去したり置き換えたりすることは可能ですから、パッケージのアップグレードは成功します。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.devttydir</option>
</term>
<listitem>
<para>
<!--
Specify a directory under <filename>/dev</filename>
under which to create the container console devices.
-->
コンテナのコンソールデバイスを作成するための <filename>/dev</filename> 以下のディレクトリを指定します。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- /dev directory -->/dev ディレクトリ</title>
<para>
<!--
By default, lxc creates a few symbolic links (fd,stdin,stdout,stderr)
in the container's <filename>/dev</filename> directory but does not
automatically create device node entries. This allows the container's
<filename>/dev</filename> to be set up as needed in the container
rootfs. If lxc.autodev is set to 1, then after mounting the container's
rootfs LXC will mount a fresh tmpfs under <filename>/dev</filename>
(limited to 100k) and fill in a minimal set of initial devices.
This is generally required when starting a container containing
a "systemd" based "init" but may be optional at other times. Additional
devices in the containers /dev directory may be created through the
use of the <option>lxc.hook.autodev</option> hook.
-->
デフォルトでは、lxc はコンテナの <filename>/dev</filename> 以下に fd, stdin, stdout, stderr のシンボリックリンクを作成しますが、自動的にはデバイスノードのエントリは作成しません。
これは、コンテナの rootfs で必要な設定を行えるようにするものです。
lxc.autodev が 1 に設定されている場合、コンテナの rootfs をマウントした後、LXC は新しい tmpfs を <filename>/dev</filename> 以下にマウントします (100k 制限の)。
そして初期デバイスの最小限のセットを作成します。
これは、"systemd" ベースの "init" 環境のコンテナを起動する時に通常必要ですが、他の環境の場合はオプショナルなものです。
コンテナの /dev ディレクトリ内の追加デバイスは <option>lxc.hook.autodev</option> フックを使用して作成されます。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.autodev</option>
</term>
<listitem>
<para>
<!--
Set this to 1 to have LXC mount and populate a minimal
<filename>/dev</filename> when starting the container.
-->
コンテナの起動時に LXC が /dev をマウントして、最小限の /dev を作成しているようにするには、これを 1 に設定してください。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Enable kmsg symlink -->kmsg のシンボリックリンクの有効化</title>
<para>
<!--
Enable creating /dev/kmsg as symlink to /dev/console. This defaults to 1.
-->
/dev/kmsg の /dev/console へのシンボリックリンクとしての作成を有効にします。デフォルトは 1 です。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.kmsg</option>
</term>
<listitem>
<para>
<!--
Set this to 0 to disable /dev/kmsg symlinking.
-->
/dev/kmsg のシンボリックリンクを無効にするには 0 を設定してください。
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect2>
<refsect2>
<title><!-- Mount points -->マウントポイント</title>
<para>
<!--
The mount points section specifies the different places to be
mounted. These mount points will be private to the container
and won't be visible by the processes running outside of the
container. This is useful to mount /etc, /var or /home for
examples.
-->
マウントポイントセクションは、マウントするための区別された場所を指定します。
これらのマウントポイントは、コンテナだけに見え、コンテナ外で実行されるプロセスから見えることはありません。
例えば、/etc や /var や /home をマウントするときに役に立つでしょう。
</para>
<variablelist>
<varlistentry>
<term>
<option>lxc.mount</option>
</term>
<listitem>
<para>
<!--
specify a file location in
the <filename>fstab</filename> format, containing the
mount information. The mount target location can and in
most cases should be a relative path, which will become
relative to the mounted container root. For instance,
-->
マウント情報の書かれた <filename>fstab</filename> フォーマットで書かれたファイルの場所を指定します。
マウントする場所は相対バスで書くことができます。そして、ほとんどの場合にコンテナの root からの相対パスとなるはずです。例えば、以下のように書きます。
</para>
<screen>
proc proc proc nodev,noexec,nosuid 0 0
</screen>
<para>
<!--
Will mount a proc filesystem under the container's /proc,
regardless of where the root filesystem comes from. This
is resilient to block device backed filesystems as well as
container cloning.
-->
この例は、root ファイルシステムがどこにあっても、コンテナの /proc 以下に proc ファイルシステムをマウントします。
これは、ブロックデバイスがバックエンドのファイルシステムだけでなく、コンテナのクローンにも柔軟に対応できます。
</para>
<para>
<!--
Note that when mounting a filesystem from an
image file or block device the third field (fs_vfstype)
cannot be auto as with
<citerefentry>
<refentrytitle>mount</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>
but must be explicitly specified.
-->
ファイルシステムがイメージファイルやブロックデバイスからマウントされている場合、3 つ目のフィールド (fs_vfstype) は
<citerefentry>
<refentrytitle>mount</refentrytitle>
<manvolnum>8</manvolnum>
</citerefentry>
のように auto を指定することはできず、明確に指定しなければいけません。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.mount.entry</option>
</term>
<listitem>
<para>
<!--
specify a mount point corresponding to a line in the
fstab format.
-->
fstab フォーマットの一行と同じフォーマットのマウントポイントの指定をします。
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>lxc.mount.auto</option>
</term>
<listitem>
<para>
<!--
specify which standard kernel file systems should be
automatically mounted. This may dramatically simplify
the configuration. The file systems are:
-->
標準のカーネルファイルシステムで自動的にマウントするものを指定します。