Debian Codegraph @

doc/ko/lxc.container.conf.sgml.in

raw
1 <!-- SPDX-License-Identifier: LGPL-2.1+ -->
2
3 <!DOCTYPE refentry PUBLIC @docdtd@ [
4
5 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
6 ]>
7
8 <refentry>
9
10 <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
11
12 <refmeta>
13 <refentrytitle>lxc.container.conf</refentrytitle>
14 <manvolnum>5</manvolnum>
15 </refmeta>
16
17 <refnamediv>
18 <refname>lxc.container.conf</refname>
19
20 <refpurpose>
21 <!--
22 LXC container configuration file
23 -->
24 LXC 컨테이너 설정파일
25 </refpurpose>
26 </refnamediv>
27
28 <refsect1>
29 <title><!-- Description -->설명</title>
30
31 <para>
32 <!--
33 The linux containers (<command>lxc</command>) are always created
34 before being used. This creation defines a set of system
35 resources to be virtualized / isolated when a process is using
36 the container. By default, the pids, sysv ipc and mount points
37 are virtualized and isolated. The other system resources are
38 shared across containers, until they are explicitly defined in
39 the configuration file. For example, if there is no network
40 configuration, the network will be shared between the creator of
41 the container and the container itself, but if the network is
42 specified, a new network stack is created for the container and
43 the container can no longer use the network of its ancestor.
44 -->
45 linux 컨테이너(<command>lxc</command>)는 항상 사용하기 전에 생성된다.
46 생성 작업은 가상화할 자원 및 컨테이너 내에서 실행되는 프로세스로부터 고립할 시스템 자원들을 정의하는 것이다.
47 기본적으로 pid, sysv ipc, 마운트 포인트가 가상화되고 고립된다. 명시적으로 설정파일에서 정의되기 전까지, 다른 시스템 자원들은 컨테이너 간에 공유된다. 예를 들어, 네트워크 설정이 되어 있지 않다면, 컨테이너 생성한 쪽과 컨테이너 간에 네트워크를 서로 공유할 것이다. 그러나 네트워크가 지정이되었다면, 컨테이너를 위해 새로운 네트워크 스택이 생성된다. 그리고 컨테이너는 더이상 그를 생성한 쪽과 네트워크를 공유하지 않는다.
48 </para>
49
50 <para>
51 <!--
52 The configuration file defines the different system resources to
53 be assigned for the container. At present, the utsname, the
54 network, the mount points, the root file system, the user namespace,
55 and the control groups are supported.
56 -->
57 설정파일은 컨테이너에 할당될 시스템 자원들을 정의한다. 현재는 utsname, 네트워크, 마운트포인트, 루트 파일시스템, 사용자 네임스페이스 그리고 컨트롤 그룹이 지원된다.
58 </para>
59
60 <para>
61 <!--
62 Each option in the configuration file has the form <command>key
63 = value</command> fitting in one line. The '#' character means
64 the line is a comment. List options, like capabilities and cgroups
65 options, can be used with no value to clear any previously
66 defined values of that option.
67 -->
68 설정파일의 옵션은 <command>key = value</command>의 한 줄로 이루어져 있다.
69 '#' 문자를 앞에 붙여 주석임을 나타낼 수 있다. capability와 cgroup 옵션과 같은 리스트 옵션들은, 값을 지정하지 않고 사용할 수 있다. 값이 지정되지 않은 경우 이전에 설정했던 모든 값들을 지운다.
70 </para>
71
72 <refsect2>
73 <title><!-- Configuration -->설정</title>
74 <para>
75 <!--
76 In order to ease administration of multiple related containers, it
77 is possible to have a container configuration file cause another
78 file to be loaded. For instance, network configuration
79 can be defined in one common file which is included by multiple
80 containers. Then, if the containers are moved to another host,
81 only one file may need to be updated.
82 -->
83 연관된 컨테이너들을 쉽게 관리하기 위해서, 컨테이너 설정파일은 다른 파일을 불러올 수 있다. 예를 들어서, 네트워크 설정은 여러 컨테이너들을 위해 공통된 하나의 파일로 정의될 수 있다. 그리고 만약 컨테이너들이 다른 호스트로 이동된다면, 해당 파일 하나만 수정하면 된다.
84 </para>
85
86 <variablelist>
87 <varlistentry>
88 <term>
89 <option>lxc.include</option>
90 </term>
91 <listitem>
92 <para>
93 <!--
94 Specify the file to be included. The included file must be
95 in the same valid lxc configuration file format.
96 -->
97 include할 파일을 지정한다.
98 include할 파일은 lxc 설정파일의 형식에 부합하여야 한다.
99 </para>
100 </listitem>
101 </varlistentry>
102 </variablelist>
103 </refsect2>
104
105 <refsect2>
106 <title><!-- Architecture -->아키텍처</title>
107 <para>
108 <!--
109 Allows one to set the architecture for the container. For example,
110 set a 32bits architecture for a container running 32bits
111 binaries on a 64bits host. That fixes the container scripts
112 which rely on the architecture to do some work like
113 downloading the packages.
114 -->
115 컨테이너에 아키텍처를 지정할 수 있다. 예를 들어, 64비트 호스트에서 32비트 바이너리를 실행하는 컨테이너라면 32비트 아키텍처로 지정할 수 있다. 패키지를 다운로드 받는 등의 작업을 수행하는 아키텍처에 의존적인 컨테이너 스크립트가 잘 동작할 수 있도록 해준다.
116 </para>
117
118 <variablelist>
119 <varlistentry>
120 <term>
121 <option>lxc.arch</option>
122 </term>
123 <listitem>
124 <para>
125 <!--
126 Specify the architecture for the container.
127 -->
128 컨테이너의 아키텍처를 지정한다.
129 </para>
130 <para>
131 <!--
132 Valid options are
133 <option>x86</option>,
134 <option>i686</option>,
135 <option>x86_64</option>,
136 <option>amd64</option>
137 -->
138 가능한 옵션은 아래와 같다.
139 <option>x86</option>,
140 <option>i686</option>,
141 <option>x86_64</option>,
142 <option>amd64</option>
143 </para>
144 </listitem>
145 </varlistentry>
146 </variablelist>
147
148 </refsect2>
149
150 <refsect2>
151 <title><!-- Hostname -->호스트 이름</title>
152 <para>
153 <!--
154 The utsname section defines the hostname to be set for the
155 container. That means the container can set its own hostname
156 without changing the one from the system. That makes the
157 hostname private for the container.
158 -->
159 utsname 섹션은 컨테이너 내에서 설정할 호스트 이름을 정의한다. 컨테이너는 시스템의 호스트 이름을 변경하지 않고도 자신의 호스트 이름을 변경할 수 있다. 즉, 컨테이너마다 호스트 이름을 설정할 수 있다.
160 </para>
161 <variablelist>
162 <varlistentry>
163 <term>
164 <option>lxc.uts.name</option>
165 </term>
166 <listitem>
167 <para>
168 <!--
169 specify the hostname for the container
170 -->
171 컨테이너의 호스트 이름을 지정한다.
172 </para>
173 </listitem>
174 </varlistentry>
175 </variablelist>
176 </refsect2>
177
178 <refsect2>
179 <title><!-- Halt signal -->종료 시그널</title>
180 <para>
181 <!--
182 Allows one to specify signal name or number, sent by lxc-stop to the
183 container's init process to cleanly shutdown the container. Different
184 init systems could use different signals to perform clean shutdown
185 sequence. This option allows the signal to be specified in kill(1)
186 fashion, e.g. SIGPWR, SIGRTMIN+14, SIGRTMAX-10 or plain number. The
187 default signal is SIGPWR.
188 -->
189 lxc-stop이 컨테이너를 깨끗이 종료를 시키기 위해서 보낼 시그널의 이름이나 숫자를 지정할 수 있다.
190 init 시스템마다 깨끗한 종료를 위해 각기 다른 시그널을 사용할 수 있다.
191 이 옵션은 kill(1)에서 사용하는 것 처럼 시그널을 지정할 수 있다. 예를 들어 SIGPWR, SIGRTMIN+14, SIGRTMAX-10 또는 숫자를 지정할 수 있다. 기본 시그널은 SIGPWR이다.
192 </para>
193 <variablelist>
194 <varlistentry>
195 <term>
196 <option>lxc.signal.halt</option>
197 </term>
198 <listitem>
199 <para>
200 <!--
201 specify the signal used to halt the container
202 -->
203 컨테이너를 종료할 때 사용할 시그널을 지정한다.
204 </para>
205 </listitem>
206 </varlistentry>
207 </variablelist>
208 </refsect2>
209
210 <refsect2>
211 <title><!-- Reboot signal -->재부팅 시그널</title>
212 <para>
213 <!--
214 Allows one to specify signal name or number, sent by lxc-stop to
215 reboot the container. This option allows signal to be specified in
216 kill(1) fashion, e.g. SIGTERM, SIGRTMIN+14, SIGRTMAX-10 or plain number.
217 The default signal is SIGINT.
218 -->
219 lxc-stop이 컨테이너를 재부팅하기 위해 보낼 시그널의 이름이나 숫자를 지정할 수 있다.
220 이 옵션은 kill(1)에서 사용하는 것 처럼 시그널을 지정할 수 있다. 예를 들어 SIGINT, SIGRTMIN+14, SIGRTMAX-10 또는 숫자를 지정할 수 있다. 기본 시그널은 SIGINT이다.
221 </para>
222 <variablelist>
223 <varlistentry>
224 <term>
225 <option>lxc.signal.reboot</option>
226 </term>
227 <listitem>
228 <para>
229 <!--
230 specify the signal used to reboot the container
231 -->
232 컨테이너를 재부팅할 때 사용할 시그널을 지정한다.
233 </para>
234 </listitem>
235 </varlistentry>
236 </variablelist>
237 </refsect2>
238
239 <refsect2>
240 <title><!-- Stop signal -->강제종료 시그널</title>
241 <para>
242 <!--
243 Allows one to specify signal name or number, sent by lxc-stop to forcibly
244 shutdown the container. This option allows signal to be specified in
245 kill(1) fashion, e.g. SIGKILL, SIGRTMIN+14, SIGRTMAX-10 or plain number.
246 The default signal is SIGKILL.
247 -->
248 lxc-stop이 컨테이너를 강제종료하기 위해 보낼 시그널의 이름이나 숫자를 지정할 수 있다.
249 이 옵션은 kill(1)에서 사용하는 것 처럼 시그널을 지정할 수 있다. 예를 들>어 SIGKILL, SIGRTMIN+14, SIGRTMAX-10 또는 숫자를 지정할 수 있다. 기본 시그널은 SIGKILL이다.
250 </para>
251 <variablelist>
252 <varlistentry>
253 <term>
254 <option>lxc.signal.stop</option>
255 </term>
256 <listitem>
257 <para>
258 <!--
259 specify the signal used to stop the container
260 -->
261 컨테이너를 강제종료할 때 사용할 시그널을 지정한다.
262 </para>
263 </listitem>
264 </varlistentry>
265 </variablelist>
266 </refsect2>
267
268 <refsect2>
269 <title><!-- Init command -->Init 명령어</title>
270 <para>
271 <!--
272 Sets the command to use as the init system for the containers.
273
274 This option is ignored when using lxc-execute.
275
276 Defaults to: /sbin/init
277 -->
278 컨테이너의 init으로 사용할 명령어를 설정한다.
279 이 옵션은 lxc-execute을 사용할 때는 무시된다.
280 기본값은 /sbin/init이다.
281 </para>
282 <variablelist>
283 <varlistentry>
284 <term>
285 <option>lxc.init.cmd</option>
286 </term>
287 <listitem>
288 <para>
289 <!--
290 Absolute path from container rootfs to the binary to use as init.
291 -->
292 init으로 사용할 바이저리의 컨테이너 루트 파일시스템에서의 절대 경로.
293 </para>
294 </listitem>
295 </varlistentry>
296 </variablelist>
297 </refsect2>
298
299 <refsect2>
300 <title><!-- Init ID -->Init이 사용할 ID</title>
301 <para>
302 <!--
303 Sets the UID/GID to use for the init system, and subsequent command, executed by lxc-execute.
304 -->
305 lxc-execute가 실행하는 컨테이너의 init 및 명령어가 사용할 UID/GID를 지정한다.
306
307 <!--
308 These options are only used when lxc-execute is started in a private user namespace.
309 -->
310 이 옵션들은 lxc-execute가 사용자 네임스페이스 안에서 실행될 때만 적용된다.
311
312 <!--
313 Defaults to: UID(0), GID(0)
314 -->
315 기본 값: UID(0), GID(0)
316 </para>
317 <variablelist>
318 <varlistentry>
319 <term>
320 <option>lxc.init.uid</option>
321 </term>
322 <listitem>
323 <para>
324 <!--
325 UID to use within a private user namespace for init.
326 -->
327 init이 사용자 네임스페이스 안에서 사용할 UID.
328 </para>
329 </listitem>
330 </varlistentry>
331 <varlistentry>
332 <term>
333 <option>lxc.init.gid</option>
334 </term>
335 <listitem>
336 <para>
337 <!--
338 GID to use within a private user namespace for init.
339 -->
340 init이 사용자 네임스페이스 안에서 사용할 GID.
341 </para>
342 </listitem>
343 </varlistentry>
344 </variablelist>
345 </refsect2>
346
347 <refsect2>
348 <title><!-- Ephemeral -->임시 컨테이너</title>
349 <para>
350 <!--
351 Allows one to specify whether a container will be destroyed on shutdown.
352 -->
353 컨테이너가 종료될 때, 해당 컨테이너를 제거할지 여부를 지정할 수 있다.
354 </para>
355 <variablelist>
356 <varlistentry>
357 <term>
358 <option>lxc.ephemeral</option>
359 </term>
360 <listitem>
361 <para>
362 <!--
363 The only allowed values are 0 and 1. Set this to 1 to destroy a
364 container on shutdown.
365 -->
366 지정 가능한 값은 0 또는 1이다. 1로 설정하면, 컨테이너를 종료할 때 해당 컨테이너를 제거한다.
367 </para>
368 </listitem>
369 </varlistentry>
370 </variablelist>
371 </refsect2>
372
373 <refsect2>
374 <title><!-- Network -->네트워크</title>
375 <para>
376 <!--
377 The network section defines how the network is virtualized in
378 the container. The network virtualization acts at layer
379 two. In order to use the network virtualization, parameters
380 must be specified to define the network interfaces of the
381 container. Several virtual interfaces can be assigned and used
382 in a container even if the system has only one physical
383 network interface.
384 -->
385 네트워크 섹션은 어떻게 네트워크를 컨테이너 내에서 가상화할지를 정의한다.
386 네트워크 가상화는 2개의 계층으로 동작한다.
387 네트워크 가상화를 위해서, 컨테이너의 네트워크 인터페이스가 인수로 지정되어야 한다. 시스템이 하나의 물리적인 네트워크 인터페이스를 갖고 있어도, 컨테이너 내에서 여러개의 가상화 인터페이스들을 사용할 수 있다.
388 </para>
389 <variablelist>
390 <varlistentry>
391 <term>
392 <option>lxc.net</option>
393 </term>
394 <listitem>
395 <para>
396 <!--
397 may be used without a value to clear all previous network options.
398 -->
399 값을 지정하지 않고 사용하여 이전에 설정했던 모든 네트워크 옵션들을 초기화할 수 있다.
400 </para>
401 </listitem>
402 </varlistentry>
403 <varlistentry>
404 <term>
405 <option>lxc.net.[i].type</option>
406 </term>
407 <listitem>
408 <para>
409 <!--
410 specify what kind of network virtualization to be used
411 for the container. Each time
412 a <option>lxc.net.[i].type</option> field is found a new
413 round of network configuration begins. In this way,
414 several network virtualization types can be specified
415 for the same container, as well as assigning several
416 network interfaces for one container. The different
417 virtualization types can be:
418 -->
419 컨테이너가 어떤 종류의 네트워크 가상화를 사용할지 지정한다.
420 <option>lxc.net.[i].type</option> 필드부터 새로운 네트워크 설정이 시작된다. 이 방법으로 여러개의 네트워크 가상화 형태를 같은 컨테이너에 지정할 수 있다. 그리고 여러개의 네트워크 인터페이스를 하나의 컨테이너에 지정할 수도 있다.
421 지정 가능한 형태는 아래와 같다.
422 </para>
423
424 <para>
425 <!--
426 <option>empty:</option> will create only the loopback
427 interface.
428 -->
429 <option>empty:</option>는 루프백 인터페이스만 생성한다.
430 </para>
431
432 <para>
433 <!--
434 <option>veth:</option> a virtual ethernet pair
435 device is created with one side assigned to the container
436 and the other side attached to a bridge specified by
437 the <option>lxc.net.[i].link</option> option.
438 If the bridge is not specified, then the veth pair device
439 will be created but not attached to any bridge.
440 Otherwise, the bridge has to be created on the system
441 before starting the container.
442 <command>lxc</command> won't handle any
443 configuration outside of the container.
444 By default, <command>lxc</command> chooses a name for the
445 network device belonging to the outside of the
446 container, but if you wish to handle
447 this name yourselves, you can tell <command>lxc</command>
448 to set a specific name with
449 the <option>lxc.net.[i].veth.pair</option> option (except for
450 unprivileged containers where this option is ignored for security
451 reasons).
452 -->
453 <option>veth:</option> 한 쪽은 컨테이너로, 다른 한쪽은 <option>lxc.net.[i].link</option> 옵션으로 지정한 브리지로 붙은 가상 이더넷(veth) 장치 쌍을 생성한다.
454 만약 브리지가 지정되지 않았다면, 어떤 브리지에도 붙지 않은 veth 장치 쌍을 만든다. 브리지는 컨테이너 시작전에 시스템에서 생성해야 한다.
455 <command>lxc</command>는 컨테이너 이외의 설정에 대해서는 다루지 않는다. 기본값으로 <command>lxc</command>는 컨테이너 바깥에 속할 네트워크 디바이스의 이름을 정해준다. 이름을 변경하기 원한다면, <command>lxc</command>가 지정한 이름으로 설정하도록 <option>lxc.net.[i].veth.pair</option> 옵션을 사용하여야 한다. (비특권 컨테이너는 불가능하다. 이 옵션은 보안상의 이유로 무시될 것이다)
456 </para>
457
458 <para>
459 <!--
460 <option>vlan:</option> a vlan interface is linked with
461 the interface specified by
462 the <option>lxc.net.[i].link</option> and assigned to
463 the container. The vlan identifier is specified with the
464 option <option>lxc.net.[i].vlan.id</option>.
465 -->
466 <option>vlan:</option> vlan 인터페이스는 <option>lxc.net.[i].link</option>로 지정한 인터페이스에 연결되고, 컨테이너로 할당된다. vlan의 식별자는 <option>lxc.net.[i].vlan.id</option> 옵션으로 지정한다.
467 </para>
468
469 <para>
470 <!--
471 <option>macvlan:</option> a macvlan interface is linked
472 with the interface specified by
473 the <option>lxc.net.[i].link</option> and assigned to
474 the container.
475 <option>lxc.net.[i].macvlan.mode</option> specifies the
476 mode the macvlan will use to communicate between
477 different macvlan on the same upper device. The accepted
478 modes are <option>private</option>, <option>vepa</option>,
479 <option>bridge</option> and <option>passthru</option>.
480 In <option>private</option> mode, the device never
481 communicates with any other device on the same upper_dev (default).
482 In <option>vepa</option> mode, the new Virtual Ethernet Port
483 Aggregator (VEPA) mode, it assumes that the adjacent
484 bridge returns all frames where both source and
485 destination are local to the macvlan port, i.e. the
486 bridge is set up as a reflective relay. Broadcast
487 frames coming in from the upper_dev get flooded to all
488 macvlan interfaces in VEPA mode, local frames are not
489 delivered locally. In <option>bridge</option> mode, it
490 provides the behavior of a simple bridge between
491 different macvlan interfaces on the same port. Frames
492 from one interface to another one get delivered directly
493 and are not sent out externally. Broadcast frames get
494 flooded to all other bridge ports and to the external
495 interface, but when they come back from a reflective
496 relay, we don't deliver them again. Since we know all
497 the MAC addresses, the macvlan bridge mode does not
498 require learning or STP like the bridge module does. In
499 <option>passthru</option> mode, all frames received by
500 the physical interface are forwarded to the macvlan
501 interface. Only one macvlan interface in <option>passthru</option>
502 mode is possible for one physical interface.
503 -->
504 <option>macvlan:</option> macvlan 인터페이스는 <option>lxc.net.[i].link</option>로 지정한 인터페이스에 연결되고, 컨테이너로 할당된다.
505 <option>lxc.net.[i].macvlan.mode</option>은 같은 상위 디바이스에 있는 다른 macvlan과 통신할 때 사용하는 모드를 지정한다.
506 지정할 수 있는 모드는 <option>private</option>、<option>vepa</option>、<option>bridge</option>、<option>passthru</option>이다.
507 <option>private</option>모드는 디바이스가 같은 상위디바이스의 어떤 장치와도 통신하지 않는다. (기본값)
508 새로운 가상 이더넷 포트 통합모드(Virtual Ethernet Port Aggregator), 즉 <option>vepa</option> 모드는 인접한 브리지가 소스와 목적지가 로컬인 모든 프레임들을 macvlan 포트로 반환한다고 가정한다. 즉, 브리지가 reflective relay로 설정되어 있다는 것이다.
509 상위장치에서 들어오는 브로드캐스트 프레임들은 모든 macvlan 인터페이스에게 보내져버린다. 로컬 프레임들은 로컬로 보내지지 않는다.
510 <option>bridge</option> 모드는 같은 포트의 다른 macvlan 인터페이스 사이에 간단한 브리지를 제공한다.
511 어떤 인터페이스에서 다른 인터페이스로 프레임은 직접 전달된다. 하지만 외부로는 보내지지 않는다.
512 브로드캐스트 프레임들은 모든 다른 브리지 포트들과 외부 인터페이스에 전달된다.
513 그러나 reflective relay로 다시 돌아왔을 때는, 그것들을 다시 전송하지 않는다.
514 모든 MAC 주소를 알기 때문에, macvlan 브리지모드는 브리지 모듈처럼 학습이나 STP를 요구하지 않는다.
515 <option>passthru</option>모드는 물리 인터페이스로 부터 받은 모든 프레임들을 macvlan 인터페이스로 포워딩한다.
516 <option>passthru</option>모드만이 하나의 물리 인터페이스를 설정하는게 가능하다.
517 </para>
518
519 <para>
520 <!--
521 <option>phys:</option> an already existing interface
522 specified by the <option>lxc.net.[i].link</option> is
523 assigned to the container.
524 -->
525 <option>phys:</option> <option>lxc.net.[i].link</option>로 지정한 이미 존재하는 인터페이스를 컨테이너로 할당된다.
526 </para>
527 </listitem>
528 </varlistentry>
529
530 <varlistentry>
531 <term>
532 <option>lxc.net.[i].flags</option>
533 </term>
534 <listitem>
535 <para>
536 <!--
537 specify an action to do for the
538 network.
539 -->
540 네트워크에 수행할 작업을 지정한다.
541 </para>
542
543 <para>
544 <!--
545 <option>up:</option> activates the interface.
546 -->
547 <option>up:</option> 인터페이스를 활성화시킨다.
548 </para>
549 </listitem>
550 </varlistentry>
551
552 <varlistentry>
553 <term>
554 <option>lxc.net.[i].link</option>
555 </term>
556 <listitem>
557 <para>
558 <!--
559 specify the interface to be used for real network
560 traffic.
561 -->
562 실제 네트워크 트래픽에 사용할 인터페이스를 지정한다.
563 </para>
564 </listitem>
565 </varlistentry>
566
567 <varlistentry>
568 <term>
569 <option>lxc.net.[i].mtu</option>
570 </term>
571 <listitem>
572 <para>
573 <!--
574 specify the maximum transfer unit for this interface.
575 -->
576 해당 인터페이스의 최대 전송 단위(MTU)를 지정한다.
577 </para>
578 </listitem>
579 </varlistentry>
580
581 <varlistentry>
582 <term>
583 <option>lxc.net.[i].name</option>
584 </term>
585 <listitem>
586 <para>
587 <!--
588 the interface name is dynamically allocated, but if
589 another name is needed because the configuration files
590 being used by the container use a generic name,
591 eg. eth0, this option will rename the interface in the
592 container.
593 -->
594 인터페이스 이름은 동적으로 할당된다.
595 그러나, 컨테이너가 일반적으로 사용하는 이름과 다른 이름이 필요하다면, (예: eth0) 이 옵션은 컨테이너 내에 있는 인터페이스의 이름을 지정한 것으로 변경할 수 있다.
596 </para>
597 </listitem>
598 </varlistentry>
599
600 <varlistentry>
601 <term>
602 <option>lxc.net.[i].hwaddr</option>
603 </term>
604 <listitem>
605 <para>
606 <!--
607 the interface mac address is dynamically allocated by
608 default to the virtual interface, but in some cases,
609 this is needed to resolve a mac address conflict or to
610 always have the same link-local ipv6 address.
611 Any "x" in address will be replaced by random value,
612 this allows setting hwaddr templates.
613 -->
614 가상 인터페이스의 MAC 주소는 기본적으로 동적 할당된다. 그러나 몇몇가지 이유로 MAC 주소 충돌 문제를 해결하거나, 언제나 같은 링크 로컬 IPv6 주소가 필요하다면, 이 옵션이 필요하다.
615 주소의 "x"는 무작위한 값으로 바뀐다. 템플릿에서 하드웨어 주소를 설정하는데 유용하다.
616 </para>
617 </listitem>
618 </varlistentry>
619
620 <varlistentry>
621 <term>
622 <option>lxc.net.[i].ipv4.address</option>
623 </term>
624 <listitem>
625 <para>
626 <!--
627 specify the ipv4 address to assign to the virtualized
628 interface. Several lines specify several ipv4 addresses.
629 The address is in format x.y.z.t/m,
630 eg. 192.168.1.123/24.The broadcast address should be
631 specified on the same line, right after the ipv4
632 address.
633 -->
634 가상 인터페이스에서 사용할 IPv4 주소를 지정한다.
635 여러 행으로 여러개의 IPv4 주소를 지정할 수 있다.
636 주소의 형식은 x.y.z.t/m으로, 예를 들어 192.168.1.123/24이다. 브로드 캐스트 주소는 같은 행의 주소 바로 오른쪽에 지정하면 된다.
637 </para>
638 </listitem>
639 </varlistentry>
640
641 <varlistentry>
642 <term>
643 <option>lxc.net.[i].ipv4.gateway</option>
644 </term>
645 <listitem>
646 <para>
647 <!--
648 specify the ipv4 address to use as the gateway inside the
649 container. The address is in format x.y.z.t, eg.
650 192.168.1.123.
651
652 Can also have the special value <option>auto</option>,
653 which means to take the primary address from the bridge
654 interface (as specified by the
655 <option>lxc.net.[i].link</option> option) and use that as
656 the gateway. <option>auto</option> is only available when
657 using the <option>veth</option> and
658 <option>macvlan</option> network types.
659 -->
660 컨테이너 내부에서 게이트웨이로 사용할 IPv4 주소를 지정한다.
661 주소 형식은 x.y.z.t로, 예를 들면 192.168.1.123이다.
662
663 <option>auto</option>라는 특별한 값을 지정할 수있다.
664 이것은 (<option>lxc.net.[i].link</option> 에서 지정된) 브리지 인터페이스의 첫번째 주소를 가져와 게이트 주소로 사용한다.
665 <option>auto</option>는 네트워크 형태가 <option>veth</option>나 <option>macvlan</option>일 때만 지정 가능하다.
666 </para>
667 </listitem>
668 </varlistentry>
669
670
671 <varlistentry>
672 <term>
673 <option>lxc.net.[i].ipv6.address</option>
674 </term>
675 <listitem>
676 <para>
677 <!--
678 specify the ipv6 address to assign to the virtualized
679 interface. Several lines specify several ipv6 addresses.
680 The address is in format x::y/m,
681 eg. 2003:db8:1:0:214:1234:fe0b:3596/64
682 -->
683 가상 인터페이스에서 사용할 IPv6 주소를 지정한다.
684 여러 행으로 여러개의 IPv6 주소를 지정할 수 있다.
685 주소의 형식은 x::y/m으로, 예를 들어 2003:db8:1:0:214:1234:fe0b:3596/64이다.
686 </para>
687 </listitem>
688 </varlistentry>
689
690 <varlistentry>
691 <term>
692 <option>lxc.net.[i].ipv6.gateway</option>
693 </term>
694 <listitem>
695 <para>
696 <!--
697 specify the ipv6 address to use as the gateway inside the
698 container. The address is in format x::y,
699 eg. 2003:db8:1:0::1
700
701 Can also have the special value <option>auto</option>,
702 which means to take the primary address from the bridge
703 interface (as specified by the
704 <option>lxc.net.[i].link</option> option) and use that as
705 the gateway. <option>auto</option> is only available when
706 using the <option>veth</option> and
707 <option>macvlan</option> network types.
708 -->
709 컨테이너 내부에서 게이트웨이로 사용할 IPv4 주소를 지정한다.
710 주소 형식은 x::y로, 예를 들면 2003:db8:1:0::1이다.
711
712 <option>auto</option>라는 특별한 값을 지정할 수있다.
713 이것은 (<option>lxc.net.[i].link</option> 에서 지정된) 브리지 인터페이스의 첫번째 주소를 가져와 게이트 주소로 사용한다.
714 <option>auto</option>는 네트워크 형태가 <option>veth</option>나 <option>macvlan</option>일 때만 지정 가능하다.
715 </para>
716 </listitem>
717 </varlistentry>
718
719 <varlistentry>
720 <term>
721 <option>lxc.net.[i].script.up</option>
722 </term>
723 <listitem>
724 <para>
725 <!--
726 add a configuration option to specify a script to be
727 executed after creating and configuring the network used
728 from the host side. The following arguments are passed
729 to the script: container name and config section name
730 (net) Additional arguments depend on the config section
731 employing a script hook; the following are used by the
732 network system: execution context (up), network type
733 (empty/veth/macvlan/phys), Depending on the network
734 type, other arguments may be passed:
735 veth/macvlan/phys. And finally (host-sided) device name.
736 -->
737 네트워크를 설정하고 생성한 후에 호스트 쪽에서 실행되는 스크립트를 지정한다.
738 다음 인수들이 스크립트에 넘겨진다 : 컨테이너 이름, 설정 섹션 이름(net). 그 후 인수는 훅 스크립트을 사용하는 설정 섹션에 달려있다. 다음 인수들은 네트워크 시스템에 의해 사용되어진다 : 실행 컨텍스트(up), 네트워크 형태(empty/veth/macvlan/phys). 네트워크 형태에 따라서 다음 인수들이 넘겨진다 : veth/macvlan/phys의 경우, (호스트 쪽의) 장치 이름.
739 </para>
740 <para>
741 <!--
742 Standard output from the script is logged at debug level.
743 Standard error is not logged, but can be captured by the
744 hook redirecting its standard error to standard output.
745 -->
746 스크립트의 표준출력은 debug 수준 로그로 납겨진다.
747 표준 에러는 로그로 남겨지지는 않지만, 표준 에러를 표준 출력으로 리다이렉션하여 로그로 남길 수 있다.
748 </para>
749 </listitem>
750 </varlistentry>
751
752 <varlistentry>
753 <term>
754 <option>lxc.net.[i].script.down</option>
755 </term>
756 <listitem>
757 <para>
758 <!--
759 add a configuration option to specify a script to be
760 executed before destroying the network used from the
761 host side. The following arguments are passed to the
762 script: container name and config section name (net)
763 Additional arguments depend on the config section
764 employing a script hook; the following are used by the
765 network system: execution context (down), network type
766 (empty/veth/macvlan/phys), Depending on the network
767 type, other arguments may be passed:
768 veth/macvlan/phys. And finally (host-sided) device name.
769 -->
770 네트워크를 제거한 후에 호스트 쪽에서 실행되는 스크립트를 지정한다.
771 다음 인수들이 스크립트에 넘겨진다 : 컨테이너 이름, 설정 섹션 이름(net). 그 후 인수는 훅 스크립트을 사용하는 설정 섹션에 달려있다.
772 다음 인수들은 네트워크 시스템에 의해 사용되어진다 : 실행 컨텍스트(down), 네트워크 형태(empty/veth/macvlan/phys). 네트워크 형태에 따라서 다음 인수들이 넘겨진다 : veth/macvlan/phys의 경우, (호스트 쪽의) 장치 이름.
773 </para>
774 <para>
775 <!--
776 Standard output from the script is logged at debug level.
777 Standard error is not logged, but can be captured by the
778 hook redirecting its standard error to standard output.
779 -->
780 스크립트의 표준출력은 debug 수준 로그로 납겨진다.
781 표준 에러는 로그로 남겨지지는 않지만, 표준 에러를 표준 출력으로 리다이렉션하여 로그로 남길 수 있다.
782 </para>
783 </listitem>
784 </varlistentry>
785 </variablelist>
786
787 </refsect2>
788
789 <refsect2>
790 <title><!-- New pseudo tty instance (devpts) -->새로운 pseudo tty 인스턴스(devpts)</title>
791 <para>
792 <!--
793 For stricter isolation the container can have its own private
794 instance of the pseudo tty.
795 -->
796 강한 고립을 위해 컨테이너는 자기자신만의 pseudo tty를 가질 수 있다.
797 </para>
798 <variablelist>
799 <varlistentry>
800 <term>
801 <option>lxc.pty.max</option>
802 </term>
803 <listitem>
804 <para>
805 <!--
806 If set, the container will have a new pseudo tty
807 instance, making this private to it. The value specifies
808 the maximum number of pseudo ttys allowed for a pty
809 instance (this limitation is not implemented yet).
810 -->
811 만약 지정되었다면, 컨테이너는 새 pseudo tty 인스턴스를 갖는다. 그리고 이것을 자기자신 전용으로 만든다. 지정하는 값은 pseudo tty의 최대 개수를 지정한다. (이 제한은 아직 구현되지 않았다)
812 </para>
813 </listitem>
814 </varlistentry>
815 </variablelist>
816 </refsect2>
817
818 <refsect2>
819 <title><!-- Container system console -->컨테이너 시스템 콘솔</title>
820 <para>
821 <!--
822 If the container is configured with a root filesystem and the
823 inittab file is setup to use the console, you may want to specify
824 where the output of this console goes.
825 -->
826 컨테이너에 루트 파일시스템이 설정되어 있고 inittab 파일에 콘솔을 사용하는 것이 설정되어 있다면, 콘솔의 출력을 어디로 할지 지정할 수 있다.
827 </para>
828 <variablelist>
829 <varlistentry>
830 <term>
831 <option>lxc.console.logfile</option>
832 </term>
833 <listitem>
834 <para>
835 <!--
836 Specify a path to a file where the console output will
837 be written.
838 -->
839 콘솔의 출력을 쓸 파일의 경로를 지정한다.
840 </para>
841 </listitem>
842 </varlistentry>
843 <varlistentry>
844 <term>
845 <option>lxc.console.path</option>
846 </term>
847 <listitem>
848 <para>
849 <!--
850 Specify a path to a device to which the console will be
851 attached. The keyword 'none' will simply disable the
852 console. This is dangerous once if have a rootfs with a
853 console device file where the application can write, the
854 messages will fall in the host.
855 -->
856 콘솔을 붙일 장치의 경로를 지정한다.
857 'none'이라는 값은 단순히 콘솔을 비활성화 시킨다. 만약 응용 프로그램이 쓸 수 있는 콘솔 장치 파일이 루트 파일시스템에 있으면, 메시지가 호스트 쪽에 출력되므로 이 설정은 위험할 수 있다.
858 </para>
859 </listitem>
860 </varlistentry>
861 </variablelist>
862 </refsect2>
863
864 <refsect2>
865 <title><!-- Console through the ttys -->tty를 통한 콘솔</title>
866 <para>
867 <!--
868 This option is useful if the container is configured with a root
869 filesystem and the inittab file is setup to launch a getty on the
870 ttys. The option specifies the number of ttys to be available for
871 the container. The number of gettys in the inittab file of the
872 container should not be greater than the number of ttys specified
873 in this option, otherwise the excess getty sessions will die and
874 respawn indefinitely giving annoying messages on the console or in
875 <filename>/var/log/messages</filename>.
876 -->
877 컨테이너에 루트 파일시스템이 설정되어 있고 inittab 파일에 tty에서 getty를 실행하는 것이 설정되어 있다면, 이 옵션은 유용하다.
878 이 옵션은 컨테이너에서 사용가능한 tty의 개수를 지정한다.
879 컨테이너의 inittab 파일에 설정된 getty의 개수는 이 옵션에서 정한 tty의 개수보다 크면 안된다. 그렇지 않으면 초과된 getty 세션은 무한히 죽고 다시 살아나기를 반복하며 콘솔이나 <filename>/var/log/messages</filename>에 계속 메시지를 띄울 것이다.
880 </para>
881 <variablelist>
882 <varlistentry>
883 <term>
884 <option>lxc.tty.max</option>
885 </term>
886 <listitem>
887 <para>
888 <!--
889 Specify the number of tty to make available to the
890 container.
891 -->
892 컨테이너가 만들 수 있는 tty의 개수를 지정한다.
893 </para>
894 </listitem>
895 </varlistentry>
896 </variablelist>
897 </refsect2>
898
899 <refsect2>
900 <title><!-- Console devices location -->콘솔 장치 위치</title>
901 <para>
902 <!--
903 LXC consoles are provided through Unix98 PTYs created on the
904 host and bind-mounted over the expected devices in the container.
905 By default, they are bind-mounted over <filename>/dev/console</filename>
906 and <filename>/dev/ttyN</filename>. This can prevent package upgrades
907 in the guest. Therefore you can specify a directory location (under
908 <filename>/dev</filename> under which LXC will create the files and
909 bind-mount over them. These will then be symbolically linked to
910 <filename>/dev/console</filename> and <filename>/dev/ttyN</filename>.
911 A package upgrade can then succeed as it is able to remove and replace
912 the symbolic links.
913 -->
914 LXC 콘솔은 호스트에서 생성된 Unix98 PTY와 컨테이너 내에 바인드 마운트될 장치들을 통해 제공된다. 기본적으로 <filename>/dev/console</filename>와 <filename>/dev/ttyN</filename>를 바인드 마운트 한다. 이것은 게스트에서 패키지 업그레이드를 방해하는 요인이 된다. 그래서 <filename>/dev</filename> 밑에 LXC가 파일을 생성하고 바인드 마운트할 디렉토리의 위치를 따로 지정해 줄 수 있다.
915 그리고 만들어진 파일들은 <filename>/dev/console</filename>와 <filename>/dev/ttyN</filename>에 심볼릭 링크된다.
916 심볼릭 링크들은 삭제하거나 대체하는 것이 가능하므로 패키지 업그레이드는 성공적으로 이루어질 수 있다.
917 </para>
918 <variablelist>
919 <varlistentry>
920 <term>
921 <option>lxc.tty.dir</option>
922 </term>
923 <listitem>
924 <para>
925 <!--
926 Specify a directory under <filename>/dev</filename>
927 under which to create the container console devices.
928 -->
929 컨테이너 콘솔 장치를 생성할 <filename>/dev</filename> 밑의 디렉토리를 지정한다.
930 </para>
931 </listitem>
932 </varlistentry>
933 </variablelist>
934 </refsect2>
935
936 <refsect2>
937 <title><!-- /dev directory -->/dev 디렉토리</title>
938 <para>
939 <!--
940 By default, lxc creates a few symbolic links (fd,stdin,stdout,stderr)
941 in the container's <filename>/dev</filename> directory but does not
942 automatically create device node entries. This allows the container's
943 <filename>/dev</filename> to be set up as needed in the container
944 rootfs. If lxc.autodev is set to 1, then after mounting the container's
945 rootfs LXC will mount a fresh tmpfs under <filename>/dev</filename>
946 (limited to 500k) and fill in a minimal set of initial devices.
947 This is generally required when starting a container containing
948 a "systemd" based "init" but may be optional at other times. Additional
949 devices in the containers /dev directory may be created through the
950 use of the <option>lxc.hook.autodev</option> hook.
951 -->
952 기본적으로 lxc는 약간의 심볼릭 링크(fd, stdin, stdout, stderr)를 컨테이너의 <filename>/dev</filename> 디렉토리에 생성한다. 그러나 자동으로 장치 노드 항목들을 생성해주지 않는다. 컨테이너의 루트 파일시스템에서 필요로하는 <filename>/dev</filename>를 생성할 수 있게 하는 것이다. lxc.autodev가 1로 지정되었다면, 컨테이너 루트 파일시스템을 마운트 한 후, LXC가 <filename>/dev</filename> 밑에 새로운 tmpfs(최대 500k)를 마운트 해준다. 그리고 최소한의 장치만을 채워준다.
953 이것은 "systemd" 기반의 "init" 환경의 컨테이너를 시작할 때 일반적으로 필요하지만, 다른 환경의 경우는 선택적인 요소이다.
954 컨테이너의 부가적인 장치들은 <option>lxc.hook.autodev</option> 훅 스크립트를 사용하여 /dev 디렉토리에 생성할 수 있다.
955 </para>
956 <variablelist>
957 <varlistentry>
958 <term>
959 <option>lxc.autodev</option>
960 </term>
961 <listitem>
962 <para>
963 <!--
964 Set this to 0 to stop LXC from mounting and populating a minimal
965 <filename>/dev</filename> when starting the container.
966 -->
967 컨테이너 시작시 <filename>/dev</filename>을 마운트하고 최소한으로 <filename>/dev</filename>를 구성할지 지정한다. 0이면 해당 동작을 수행하지 않는다.
968 </para>
969 </listitem>
970 </varlistentry>
971 </variablelist>
972 </refsect2>
973
974 <refsect2>
975 <title><!-- Enable kmsg symlink -->kmsg 심볼릭링크 사용</title>
976 <para>
977 <!--
978 Enable creating /dev/kmsg as symlink to /dev/console. This defaults to 0.
979 -->
980 /dev/console에 대한 심볼릭 링크로 /dev/kmsg를 생성한다.
981 </para>
982 <variablelist>
983 <varlistentry>
984 <term>
985 <option>lxc.kmsg</option>
986 </term>
987 <listitem>
988 <para>
989 <!--
990 Set this to 1 to enable /dev/kmsg symlinking.
991 -->
992 이것을 1로 지정하면 /dev/kmsg 심볼릭링크를 사용한다.
993 </para>
994 </listitem>
995 </varlistentry>
996 </variablelist>
997 </refsect2>
998
999 <refsect2>
1000 <title><!-- Mount points -->마운트 포인트</title>
1001 <para>
1002 <!--
1003 The mount points section specifies the different places to be
1004 mounted. These mount points will be private to the container
1005 and won't be visible by the processes running outside of the
1006 container. This is useful to mount /etc, /var or /home for
1007 examples.
1008 -->
1009 마운트 포인트 섹션은 마운트가 될 각각의 장소를 지정한다.
1010 이 마운트 포인트들은 컨테이너에서만 보이고 외부에서 실행하는 프로세스들에겐 보이지 않는다.
1011 이는 예를 들어 /etc, /var, /home을 마운트할 때 유용하다.
1012 </para>
1013 <para>
1014 <!--
1015 NOTE - LXC will generally ensure that mount targets and relative
1016 bind-mount sources are properly confined under the container
1017 root, to avoid attacks involving over-mounting host directories
1018 and files. (Symbolic links in absolute mount sources are ignored)
1019 However, if the container configuration first mounts a directory which
1020 is under the control of the container user, such as /home/joe, into
1021 the container at some <filename>path</filename>, and then mounts
1022 under <filename>path</filename>, then a TOCTTOU attack would be
1023 possible where the container user modifies a symbolic link under
1024 their home directory at just the right time.
1025 -->
1026 주의 - 보통 LXC는 마운트 대상과 상대 경로로 된 바인드 마운트 소스들이 컨테이너의 루트 아래에 있도록 보장할 것이다. 이는 호스트 디렉토리와 파일들을 겹쳐서 마운트하는 유형의 공격을 피하기 위한 것이다. (절대 경로로 된 마운트 소스 내에 존재하는 심볼릭 링크들은 무시될 것이다.)
1027 하지만, 만약 컨테이너 설정에서 컨테이너 사용자가 제어할 수 있는, 예를 들어 /home/joe와 같은 디렉토리를 컨테이너 내의 <filename>path</filename>에 먼저 마운트 하고 나서, <filename>path</filename> 내에 또 마운트를 하는 경우가 있다면,
1028 컨테이너 사용자가 자신의 home 디렉토리에 있는 심볼릭링크를 정확한 시간에 조작하여, TOCTTOU (역주 : Time of check to time of use) 공격이 가능할 것이다.
1029 </para>
1030 <variablelist>
1031 <varlistentry>
1032 <term>
1033 <option>lxc.mount.fstab</option>
1034 </term>
1035 <listitem>
1036 <para>
1037 <!--
1038 specify a file location in
1039 the <filename>fstab</filename> format, containing the
1040 mount information. The mount target location can and in
1041 most cases should be a relative path, which will become
1042 relative to the mounted container root. For instance,
1043 -->
1044 마운트 정보를 담은 <filename>fstab</filename> 형식으로 된 파일의 위치를 지정한다.
1045 이 마운트 대상 위치들은 대부분 상대경로로 되어 있으며, 이는 마운트된 컨테이너 루트에서의 상대경로를 의미한다.
1046 </para>
1047 <screen>
1048 proc proc proc nodev,noexec,nosuid 0 0
1049 </screen>
1050 <para>
1051 <!--
1052 Will mount a proc filesystem under the container's /proc,
1053 regardless of where the root filesystem comes from. This
1054 is resilient to block device backed filesystems as well as
1055 container cloning.
1056 -->
1057 위의 예는 proc 파일시스템을 컨테이너 루트 파일시스템의 위치와 상관없이 컨테이너의 /proc에 마운트시키는 예제이다. 이는 백엔드 파일시스템 블록 장치뿐만 아니라 컨테이너의 복제에도 유연하게 대처할 수 있다.
1058 </para>
1059 <para>
1060 <!--
1061 Note that when mounting a filesystem from an
1062 image file or block device the third field (fs_vfstype)
1063 cannot be auto as with
1064 <citerefentry>
1065 <refentrytitle>mount</refentrytitle>
1066 <manvolnum>8</manvolnum>
1067 </citerefentry>
1068 but must be explicitly specified.
1069 -->
1070 이미지 파일이나 블록 장치에서 마운트된 파일시스템의 경우, 3번째 필드 (fs_vfstype)는
1071 <citerefentry>
1072 <refentrytitle>mount</refentrytitle>
1073 <manvolnum>8</manvolnum>
1074 </citerefentry>
1075 와 같이 auto를 지정할수 없으며, 명시적으로 지정해야 한다.
1076 </para>
1077 </listitem>
1078 </varlistentry>
1079
1080 <varlistentry>
1081 <term>
1082 <option>lxc.mount.entry</option>
1083 </term>
1084 <listitem>
1085 <para>
1086 <!--
1087 specify a mount point corresponding to a line in the
1088 fstab format.
1089 -->
1090 fstab의 형식으로, 한 줄당 마운트 포인트 하나를 지정한다.
1091
1092 <!--
1093 Moreover lxc add two options to mount.
1094 <option>optional</option> don't fail if mount does not work.
1095 <option>create=dir</option> or <option>create=file</option>
1096 to create dir (or file) when the point will be mounted.
1097 -->
1098 또한 마운트 옵션에 아래 2가지 옵션을 추가적으로 사용할 수 있다. 이는 LXC 자체적으로 사용하는 옵션이다.
1099 <option>optional</option>은 마운트를 못하더라도, 실패로 처리하지 않게 한다.
1100 <option>create=dir</option>와 <option>create=file</option>는 마운트할 때, 디렉토리(dir) 또는 파일(file)을 생성한다.
1101 </para>
1102 </listitem>
1103 </varlistentry>
1104
1105 <varlistentry>
1106 <term>
1107 <option>lxc.mount.auto</option>
1108 </term>
1109 <listitem>
1110 <para>
1111 <!--
1112 specify which standard kernel file systems should be
1113 automatically mounted. This may dramatically simplify
1114 the configuration. The file systems are:
1115 -->
1116 일반적인 커널의 파일시스템을 자동으로 마운트할지 지정한다.
1117 이 옵션을 사용하면 설정을 매우 편하게 할 수 있다.
1118 사용할 수 있는 파일시스템들은 아래와 같다.
1119 </para>
1120 <itemizedlist>
1121 <listitem>
1122 <!--
1123 <para>
1124 <option>proc:mixed</option> (or <option>proc</option>):
1125 mount <filename>/proc</filename> as read-write, but
1126 remount <filename>/proc/sys</filename> and
1127 <filename>/proc/sysrq-trigger</filename> read-only
1128 for security / container isolation purposes.
1129 </para>
1130 -->
1131 <para>
1132 <option>proc:mixed</option> (or <option>proc</option>):
1133 <filename>/proc</filename> 을 읽기/쓰기 가능으로 마운트, 그러나 <filename>/proc/sys</filename>과 <filename>/proc/sysrq-trigger</filename>는 읽기 전용으로 다시 마운트 (보안상의 이유 및 컨테이너 고립을 위해)
1134 </para>
1135 </listitem>
1136 <listitem>
1137 <!--
1138 <para>
1139 <option>proc:rw</option>: mount
1140 <filename>/proc</filename> as read-write
1141 </para>
1142 -->
1143 <para>
1144 <option>proc:rw</option>:
1145 <filename>/proc</filename> 전체를 읽기/쓰기 가능으로 마운트
1146 </para>
1147 </listitem>
1148 <listitem>
1149 <!--
1150 <para>
1151 <option>sys:mixed</option> (or <option>sys</option>):
1152 mount <filename>/sys</filename> as read-only but with
1153 /sys/devices/virtual/net writable.
1154 </para>
1155 -->
1156 <para>
1157 <option>sys:mixed</option> (or <option>sys</option>):
1158 /sys/devices/virtual/net는 쓰기 가능으로, <filename>/sys</filename>는 읽기 전용으로 마운트.
1159 </para>
1160 </listitem>
1161 <listitem>
1162 <!--
1163 <para>
1164 <option>sys:ro</option>
1165 mount <filename>/sys</filename> as read-only
1166 for security / container isolation purposes.
1167 </para>
1168 -->
1169 <para>
1170 <option>sys:ro</option>:
1171 <filename>/sys</filename>를 읽기 전용으로 마운트 (보안상의 이유 및 컨테이너 고립을 위해)
1172 </para>
1173 </listitem>
1174 <listitem>
1175 <!--
1176 <para>
1177 <option>sys:rw</option>: mount
1178 <filename>/sys</filename> as read-write
1179 </para>
1180 -->
1181 <para>
1182 <option>sys:rw</option>:
1183 <filename>/sys</filename>를 읽기/쓰기 가능으로 마운트
1184 </para>
1185 </listitem>
1186 <listitem>
1187 <!--
1188 <para>
1189 <option>cgroup:mixed</option>:
1190 mount a tmpfs to <filename>/sys/fs/cgroup</filename>,
1191 create directories for all hierarchies to which
1192 the container is added, create subdirectories
1193 there with the name of the cgroup, and bind-mount
1194 the container's own cgroup into that directory.
1195 The container will be able to write to its own
1196 cgroup directory, but not the parents, since they
1197 will be remounted read-only.
1198 </para>
1199 -->
1200 <para>
1201 <option>cgroup:mixed</option>:
1202 <filename>/sys/fs/cgroup</filename>를 tmpfs로 마운트.
1203 컨테이너가 추가될 모든 계층의 디렉토리 생성.
1204 cgroup 이름의 하위 디렉토리 생성.
1205 컨테이너 자신의 cgroup을 해당 디렉토리에 마운트.
1206 컨테이너는 자신의 cgroup 디렉토리에는 쓰기가 가능하지만 부모의 디렉토리는 읽기전용으로 마운트 하므로 쓰기가 불가능하다.
1207 </para>
1208 </listitem>
1209 <listitem>
1210 <!--
1211 <para>
1212 <option>cgroup:ro</option>: similar to
1213 <option>cgroup:mixed</option>, but everything will
1214 be mounted read-only.
1215 </para>
1216 -->
1217 <para>
1218 <option>cgroup:ro</option>:
1219 <option>cgroup:mixed</option>와 유사, 단, 전부 읽기 전용으로 마운트
1220 </para>
1221 </listitem>
1222 <listitem>
1223 <!--
1224 <para>
1225 <option>cgroup:rw</option>: similar to
1226 <option>cgroup:mixed</option>, but everything will
1227 be mounted read-write. Note that the paths leading
1228 up to the container's own cgroup will be writable,
1229 but will not be a cgroup filesystem but just part
1230 of the tmpfs of <filename>/sys/fs/cgroup</filename>
1231 </para>
1232 -->
1233 <para>
1234 <option>cgroup:rw</option>:
1235 <option>cgroup:mixed</option>와 유사, 단, 전부 읽기/쓰기 가능으로 마운트.
1236 컨테이너 자신의 cgroup에 이르기까지의 경로가 모두 쓰기 가능이 되지만, cgroup 파일시스템이 아닌 <filename>/sys/fs/cgroup</filename>의 tmpfs의 일부로써 존재하게 되는 것에 주의해야 한다.
1237 </para>
1238 </listitem>
1239 <listitem>
1240 <para>
1241 <!--
1242 <option>cgroup</option> (without specifier):
1243 defaults to <option>cgroup:rw</option> if the
1244 container retains the CAP_SYS_ADMIN capability,
1245 <option>cgroup:mixed</option> otherwise.
1246 -->
1247 <option>cgroup</option> (별다른 옵션 없이):
1248 컨테이너가 CAP_SYS_ADMIN capability를 유지하고 있는 경우 <option>cgroup:rw</option>을 기본으로 사용한다. 그렇지 않다면 <option>cgroup:mixed</option>를 사용한다.
1249 </para>
1250 </listitem>
1251 <listitem>
1252 <!--
1253 <para>
1254 <option>cgroup-full:mixed</option>:
1255 mount a tmpfs to <filename>/sys/fs/cgroup</filename>,
1256 create directories for all hierarchies to which
1257 the container is added, bind-mount the hierarchies
1258 from the host to the container and make everything
1259 read-only except the container's own cgroup. Note
1260 that compared to <option>cgroup</option>, where
1261 all paths leading up to the container's own cgroup
1262 are just simple directories in the underlying
1263 tmpfs, here
1264 <filename>/sys/fs/cgroup/$hierarchy</filename>
1265 will contain the host's full cgroup hierarchy,
1266 albeit read-only outside the container's own cgroup.
1267 This may leak quite a bit of information into the
1268 container.
1269 </para>
1270 -->
1271 <para>
1272 <option>cgroup-full:mixed</option>:
1273 <filename>/sys/fs/cgroup</filename>을 tmpfs로 마운트.
1274 컨테이너가 추가될 모든 계층의 디렉토리 생성.
1275 호스트의 디렉토리들을 컨테이너로 바인드 마운트하고 컨테이너 자신의 cgroup을 제외한 모든 디렉토리는 읽기 전용으로 변경.
1276 비교하자면, <option>cgroup</option>의 경우에는 컨테이너 자신의 cgroup에 이르기까지 모든 경로는 단순하게 tmpfs 아래에 있는 디렉토리에 불과하다. 하지만, 여기서는 비록 컨테이너 자신의 cgroup 이외에는 모두 읽기 전용이긴 하나 <filename>/sys/fs/cgroup/$hierarchy</filename>이 호스트의 모든 cgroup 계층구조를 포함하고 있다.
1277 이는 컨테이너에게 너무 많은 정보를 노출시킬 수 있다.
1278 </para>
1279 </listitem>
1280 <listitem>
1281 <!--
1282 <para>
1283 <option>cgroup-full:ro</option>: similar to
1284 <option>cgroup-full:mixed</option>, but everything
1285 will be mounted read-only.
1286 </para>
1287 -->
1288 <para>
1289 <option>cgroup-full:ro</option>:
1290 <option>cgroup-full:mixed</option>와 유사, 단, 전부 읽기 전용으로 마운트
1291 </para>
1292 </listitem>
1293 <listitem>
1294 <!--
1295 <para>
1296 <option>cgroup-full:rw</option>: similar to
1297 <option>cgroup-full:mixed</option>, but everything
1298 will be mounted read-write. Note that in this case,
1299 the container may escape its own cgroup. (Note also
1300 that if the container has CAP_SYS_ADMIN support
1301 and can mount the cgroup filesystem itself, it may
1302 do so anyway.)
1303 </para>
1304 -->
1305 <para>
1306 <option>cgroup-full:rw</option>:
1307 <option>cgroup-full:mixed</option>와 유사, 단, 전부 읽기/쓰기 가능으로 마운트.
1308 이 경우는 컨테이너가 자기자신의 cgroup을 벗어날 수 있다. (만약 컨테이너가 CAP_SYS_ADMIN을 갖고 있다면, cgroup 파일시스템 자체를 마운트할 수 있음을 주의해야 한다. 이렇게 하면 같은 결과를 가져올 수 있다)
1309 </para>
1310 </listitem>
1311 <listitem>
1312 <para>
1313 <!--
1314 <option>cgroup-full</option> (without specifier):
1315 defaults to <option>cgroup-full:rw</option> if the
1316 container retains the CAP_SYS_ADMIN capability,
1317 <option>cgroup-full:mixed</option> otherwise.
1318 -->
1319 <option>cgroup-full</option> (별다른 옵션 없이):
1320 컨테이너가 CAP_SYS_ADMIN capability를 유지하고 있는 경우 <option>cgroup-full:rw</option>을 기본으로 사용한다. 그렇지 않다면 <option>cgroup-full:mixed</option>를 사용한다.
1321 </para>
1322 </listitem>
1323 </itemizedlist>
1324 <para>
1325 <!--
1326 If cgroup namespaces are enabled, then any <option>cgroup</option>
1327 auto-mounting request will be ignored, since the container can
1328 mount the filesystems itself, and automounting can confuse the
1329 container init.
1330 -->
1331 cgroup 네임스페이스가 사용 가능한 경우, <option>cgroup</option> 마운트 옵션들은 전부 무시될 것이다. 컨테이너가 직접 파일시스템을 마운트하기 때문이며, 컨테이너 초기화시 해당 옵션이 혼란을 줄 수 있기 때문이다.
1332 </para>
1333 <para>
1334 <!--
1335 Note that if automatic mounting of the cgroup filesystem
1336 is enabled, the tmpfs under
1337 <filename>/sys/fs/cgroup</filename> will always be
1338 mounted read-write (but for the <option>:mixed</option>
1339 and <option>:ro</option> cases, the individual
1340 hierarchies,
1341 <filename>/sys/fs/cgroup/$hierarchy</filename>, will be
1342 read-only). This is in order to work around a quirk in
1343 Ubuntu's
1344 <citerefentry>
1345 <refentrytitle>mountall</refentrytitle>
1346 <manvolnum>8</manvolnum>
1347 </citerefentry>
1348 command that will cause containers to wait for user
1349 input at boot if
1350 <filename>/sys/fs/cgroup</filename> is mounted read-only
1351 and the container can't remount it read-write due to a
1352 lack of CAP_SYS_ADMIN.
1353 -->
1354 cgroup 파일시스템이 자동으로 마운트되는게 활성화되어 있다면, <filename>/sys/fs/cgroup</filename> 밑의 tmpfs는 언제나 읽기/쓰기 가능으로 마운트 된다.(단, <option>:mixed</option>과 <option>:ro</option>의 경우에는 각각 계층 <filename>/sys/fs/cgroup/$hierarchy</filename>이 읽기전용이 될 수는 있다)
1355 아래의 Ubuntu 명령어에 대응하기 위함이다.
1356 <citerefentry>
1357 <refentrytitle>mountall</refentrytitle>
1358 <manvolnum>8</manvolnum>
1359 </citerefentry>
1360 해당 명령어는 컨테이너 부팅시에 <filename>/sys/fs/cgroup</filename>가 읽기전용으로 마운트되어 있고, 컨테이너가 CAP_SYS_ADMIN을 갖고 있지 않아 이를 읽기/쓰기 전용으로 다시 마운트 못할 경우, 부팅시에 사용자의 입력을 기다리게 만들기 때문이다.
1361 </para>
1362 <para>
1363 <!--
1364 Examples:
1365 -->
1366 예제:
1367 </para>
1368 <programlisting>
1369 lxc.mount.auto = proc sys cgroup
1370 lxc.mount.auto = proc:rw sys:rw cgroup-full:rw
1371 </programlisting>
1372 </listitem>
1373 </varlistentry>
1374
1375 </variablelist>
1376 </refsect2>
1377
1378 <refsect2>
1379 <title><!-- Root file system -->루트 파일시스템</title>
1380 <para>
1381 <!--
1382 The root file system of the container can be different than that
1383 of the host system.
1384 -->
1385 컨테이너의 루트 파일시스템은 호스트 시스템과 다르게 구성할 수 있다.
1386 </para>
1387 <variablelist>
1388 <varlistentry>
1389 <term>
1390 <option>lxc.rootfs.path</option>
1391 </term>
1392 <listitem>
1393 <para>
1394 <!--
1395 specify the root file system for the container. It can
1396 be an image file, a directory or a block device. If not
1397 specified, the container shares its root file system
1398 with the host.
1399 -->
1400 컨테이너의 루트 파일시스템을 지정한다. 이미지 파일 또는 블록 장치의 디렉토리가 될 수도 있다. 만약 지정되지 않으면 컨테이너는 자신의 루트 파일시스템을 호스트와 공유한다.
1401 </para>
1402 <para>
1403 <!--
1404 For directory or simple block-device backed containers,
1405 a pathname can be used. If the rootfs is backed by a nbd
1406 device, then <filename>nbd:file:1</filename> specifies that
1407 <filename>file</filename> should be attached to a nbd device,
1408 and partition 1 should be mounted as the rootfs.
1409 <filename>nbd:file</filename> specifies that the nbd device
1410 itself should be mounted. <filename>overlayfs:/lower:/upper</filename>
1411 specifies that the rootfs should be an overlay with <filename>/upper</filename>
1412 being mounted read-write over a read-only mount of <filename>/lower</filename>.
1413 <filename>aufs:/lower:/upper</filename> does the same using aufs in place
1414 of overlayfs. For both <filename>overlayfs</filename> and
1415 <filename>aufs</filename> multiple <filename>/lower</filename>
1416 directories can be specified. <filename>loop:/file</filename> tells lxc to attach
1417 <filename>/file</filename> to a loop device and mount the loop device.
1418 -->
1419 디렉토리 또는 간단한 블록 장치로 구성된 컨테이너를 위해서 경로이름이 사용될 수 있다. 만약 루트 파일시스템이 nbd 장치의 경우, <filename>nbd:file:1</filename>는 <filename>file</filename>을 nbd 장치로 사용하고 1번 파티션이 루트 파일시스템으로 마운트되도록 지정한다.
1420 <filename>nbd:file</filename>는 nbd 장치 자체가 마운트되어야 한다고 지정한다.
1421 <filename>overlayfs:/lower:/upper</filename>는 루트 파일시스템이 읽기전용으로 마운트된 <filename>/lower</filename>를 <filename>/upper</filename>가 읽기/쓰기 가능으로 오버레이 마운트되도록 지정한다.
1422 <filename>aufs:/lower:/upper</filename>는 aufs에서 위와같이 지정한다. <filename>overlayfs</filename>와 <filename>aufs</filename>는 여러개의 <filename>/lower</filename> 디렉토리를 지정할 수 있다.
1423 <filename>loop:/file</filename>는 lxc가 <filename>/file</filename>을 loop 장치로 사용하고 loop 장치를 마운트하도록 지정한다.
1424 </para>
1425 </listitem>
1426 </varlistentry>
1427
1428 <varlistentry>
1429 <term>
1430 <option>lxc.rootfs.mount</option>
1431 </term>
1432 <listitem>
1433 <para>
1434 <!--
1435 where to recursively bind <option>lxc.rootfs.path</option>
1436 before pivoting. This is to ensure success of the
1437 <citerefentry>
1438 <refentrytitle><command>pivot_root</command></refentrytitle>
1439 <manvolnum>8</manvolnum>
1440 </citerefentry>
1441 syscall. Any directory suffices, the default should
1442 generally work.
1443 -->
1444 루트 파일시스템을 변경하기 전에, <option>lxc.rootfs.path</option>을 어디에 재귀적으로 바인드할지 정한다. 이는
1445 <citerefentry>
1446 <refentrytitle><command>pivot_root</command></refentrytitle>
1447 <manvolnum>8</manvolnum>
1448 </citerefentry>
1449 시스템 콜의 성공을 보장한다.
1450 어떤 디렉토리도 좋으며, 기본값으로도 보통 동작할 것이다.
1451 </para>
1452 </listitem>
1453 </varlistentry>
1454
1455 <varlistentry>
1456 <term>
1457 <option>lxc.rootfs.options</option>
1458 </term>
1459 <listitem>
1460 <para>
1461 <!--
1462 extra mount options to use when mounting the rootfs.
1463 -->
1464 루트 파일시스템을 마운트 할때 사용할 부가적인 마운트 옵션.
1465 </para>
1466 </listitem>
1467 </varlistentry>
1468
1469 </variablelist>
1470 </refsect2>
1471
1472 <refsect2>
1473 <title><!-- Control group -->컨트롤 그룹</title>
1474 <para>
1475 <!--
1476 The control group section contains the configuration for the
1477 different subsystem. <command>lxc</command> does not check the
1478 correctness of the subsystem name. This has the disadvantage
1479 of not detecting configuration errors until the container is
1480 started, but has the advantage of permitting any future
1481 subsystem.
1482 -->
1483 컨트롤 그룹 섹션은 (lxc와는) 다른 서브시스템의 설정을 포함한다.
1484 <command>lxc</command>는 서브시스템의 이름을 정확히 체크하지 않는다.
1485 이는 컨테이너를 시작할 때까지는 설정 상의 에러를 잡아내기 힘들게 한다.
1486 그러나 다른 차후에 들어올 수 있는 서브시스템을 지원할 수 있는 장점도 있다.
1487 </para>
1488 <variablelist>
1489 <varlistentry>
1490 <term>
1491 <option>lxc.cgroup.[subsystem name]</option>
1492 </term>
1493 <listitem>
1494 <para>
1495 <!--
1496 specify the control group value to be set. The
1497 subsystem name is the literal name of the control group
1498 subsystem. The permitted names and the syntax of their
1499 values is not dictated by LXC, instead it depends on the
1500 features of the Linux kernel running at the time the
1501 container is started,
1502 eg. <option>lxc.cgroup.cpuset.cpus</option>
1503 -->
1504 지정한 컨트롤 그룹의 값을 지정한다.
1505 서브시스템의 이름은 컨트롤 그룹에서의 이름이다.
1506 사용가능한 이름이나 값의 문법에 대해서는 LXC에서 따로 신경쓰지 않으며, 컨테이너가 시작하는 시점에 리눅스 커널이 해당 기능을 지원하는지에 달려있다.
1507 예를 들면 <option>lxc.cgroup.cpuset.cpus</option>이다.
1508 </para>
1509 </listitem>
1510 </varlistentry>
1511 </variablelist>
1512 </refsect2>
1513
1514 <refsect2>
1515 <title>Capabilities</title>
1516 <para>
1517 <!--
1518 The capabilities can be dropped in the container if this one
1519 is run as root.
1520 -->
1521 컨테이너가 root로 실행된다면, 컨테이너 내에서 capability를 제거할 수 있다.
1522 </para>
1523 <variablelist>
1524 <varlistentry>
1525 <term>
1526 <option>lxc.cap.drop</option>
1527 </term>
1528 <listitem>
1529 <para>
1530 <!--
1531 Specify the capability to be dropped in the container. A
1532 single line defining several capabilities with a space
1533 separation is allowed. The format is the lower case of
1534 the capability definition without the "CAP_" prefix,
1535 eg. CAP_SYS_MODULE should be specified as
1536 sys_module. See
1537 <citerefentry>
1538 <refentrytitle><command>capabilities</command></refentrytitle>
1539 <manvolnum>7</manvolnum>
1540 </citerefentry>.
1541 If used with no value, lxc will clear any drop capabilities
1542 specified up to this point.
1543 -->
1544 컨테이너에서 제거할 capability를 지정한다.
1545 한 줄에 여러개의 capability를 공백(space)으로 구분하여 정의할 수 있다.
1546 형식은 capability 정의에서 "CAP_" 접두사를 빼고 소문자로 작성하는 것이다. 예를들어 CAP_SYS_MODULE의 경우는 sys_module이다.
1547 아래를 참조할 수 있다.
1548 <citerefentry>
1549 <refentrytitle><command>capabilities</command></refentrytitle>
1550 <manvolnum>7</manvolnum>
1551 </citerefentry>
1552 값을 공백으로 지정하면, 해당 설정 이전에 지정했던 capability를 모두 취소한다. (lxc.cap.drop에 아무 것도 지정하지 않은 상태가 된다.)
1553 </para>
1554 </listitem>
1555 </varlistentry>
1556 <varlistentry>
1557 <term>
1558 <option>lxc.cap.keep</option>
1559 </term>
1560 <listitem>
1561 <para>
1562 <!--
1563 Specify the capability to be kept in the container. All other
1564 capabilities will be dropped. When a special value of "none" is
1565 encountered, lxc will clear any keep capabilities specified up
1566 to this point. A value of "none" alone can be used to drop all
1567 capabilities.
1568 -->
1569 컨테이너에서 유지할 capability를 지정한다.
1570 다른 capability는 모두 제거될 것이다. "none"이라는 값을 지정하면, lxc는 해당 시점에서 갖고 있던 모든 capability를 제거한다.
1571 모든 capability를 제거하기 위해서는 "none" 하나만 사용하면 된다.
1572 </para>
1573 </listitem>
1574 </varlistentry>
1575 </variablelist>
1576 </refsect2>
1577
1578 <refsect2>
1579 <title><!-- Apparmor profile -->Apparmor 프로파일</title>
1580 <para>
1581 <!--
1582 If lxc was compiled and installed with apparmor support, and the host
1583 system has apparmor enabled, then the apparmor profile under which the
1584 container should be run can be specified in the container
1585 configuration. The default is <command>lxc-container-default-cgns</command>
1586 if the host kernel is cgroup namespace aware, or
1587 <command>lxc-container-default</command> otherwise.
1588 -->
1589 lxc가 apparmor를 지원하도록 컴파일된 후 설치되었고, 호스트 시스템에서 apparmor가 활성화되었다면, 컨테이너에서 따라야할 apparmor 프로파일을 컨테이너 설정에서 지정할 수 있다. 기본값은 호스트 커널이 cgroup 네임스페이스를 지원하면 <command>lxc-container-default-cgns</command>이고, 그렇지 않다면 <command>lxc-container-default</command>이다.
1590 </para>
1591 <variablelist>
1592 <varlistentry>
1593 <term>
1594 <option>lxc.apparmor.profile</option>
1595 </term>
1596 <listitem>
1597 <para>
1598 <!--
1599 Specify the apparmor profile under which the container should
1600 be run. To specify that the container should be unconfined,
1601 use
1602 -->
1603 컨테이너가 따라야할 apparmor 프로파일을 지정한다.
1604 컨테이너가 apparmor로 인한 제한을 받지 않도록 하려면, 아래와 같이 지정하면 된다.
1605 </para>
1606 <programlisting>lxc.apparmor.profile = unconfined</programlisting>
1607 <para>
1608 <!--
1609 If the apparmor profile should remain unchanged (i.e. if you
1610 are nesting containers and are already confined), then use
1611 -->
1612 apparmor 프로파일이 변경되지 않아야 한다면(중첩 컨테이너 안에 있고, 이미 confined된 경우), 아래와 같이 지정하면 된다.
1613 </para>
1614 <programlisting>lxc.apparmor.profile = unchanged</programlisting>
1615 </listitem>
1616 </varlistentry>
1617 <varlistentry>
1618 <term>
1619 <option>lxc.apparmor.allow_incomplete</option>
1620 </term>
1621 <listitem>
1622 <para>
1623 <!--
1624 Apparmor profiles are pathname based. Therefore many file
1625 restrictions require mount restrictions to be effective against
1626 a determined attacker. However, these mount restrictions are not
1627 yet implemented in the upstream kernel. Without the mount
1628 restrictions, the apparmor profiles still protect against accidental
1629 damager.
1630 -->
1631 apparmor 프로파일은 경로이름 기반이므로, 공격자로부터 효과적으로 파일 제한을 하기위해서는 마운트 제한이 요구된다.
1632 하지만 이 마운트 제한들은 upstream 커널에서는 구현되어 있지 않다.
1633 마운트 제한 없이도, apparmor 프로파일은 우연한 손상에 대해서 보호가 가능하다.
1634 </para>
1635 <para>
1636 <!--
1637 If this flag is 0 (default), then the container will not be
1638 started if the kernel lacks the apparmor mount features, so that a
1639 regression after a kernel upgrade will be detected. To start the
1640 container under partial apparmor protection, set this flag to 1.
1641 -->
1642 만약 이 플래그가 0(기본값)이라면, 커널에 apparmor의 마운트 기능이 부족했을때 컨테이너가 시작되지 않는다. 커널을 업그레이드한 후에 해당 기능이 빠졌는지 여부를 검사하기 위함이다. 부분적인 apparmor 보호 하에서도 컨테이너를 시작하려면, 플래그를 1로 지정하면 된다.
1643 </para>
1644 </listitem>
1645 </varlistentry>
1646 </variablelist>
1647 </refsect2>
1648
1649 <refsect2>
1650 <title><!-- SELinux context -->SELinux 컨텍스트</title>
1651 <para>
1652 <!--
1653 If lxc was compiled and installed with SELinux support, and the host
1654 system has SELinux enabled, then the SELinux context under which the
1655 container should be run can be specified in the container
1656 configuration. The default is <command>unconfined_t</command>,
1657 which means that lxc will not attempt to change contexts.
1658 See @DATADIR@/lxc/selinux/lxc.te for an example policy and more
1659 information.
1660 -->
1661 lxc가 SELinux를 지원하도록 컴파일된 후 설치되었고, 호스트 시스템에서 SELinux 컨텍스트가 활성화되었다면, 컨테이너에서 따라야할 SELinux 컨텍스트를 컨테이너 설정에서 지정할 수 있다.
1662 기본값은 <command>unconfined_t</command>이다. 이는 lxc는 컨텍스트를 변경하지않음을 의미한다.
1663 정책 예제와 추가적인 정보를 원한다면 @DATADIR@/lxc/selinux/lxc.te를 참고하면 된다.
1664 </para>
1665 <variablelist>
1666 <varlistentry>
1667 <term>
1668 <option>lxc.selinux.context</option>
1669 </term>
1670 <listitem>
1671 <para>
1672 <!--
1673 Specify the SELinux context under which the container should
1674 be run or <command>unconfined_t</command>. For example
1675 -->
1676 컨테이너가 따라야할 SELinux 컨텍스트를 지정하거나, <command>unconfined_t</command>를 지정할 수 있다. 예를 들어 아래와 같이 지정 가능하다.
1677 </para>
1678 <programlisting>lxc.selinux.context = system_u:system_r:lxc_t:s0:c22</programlisting>
1679 </listitem>
1680 </varlistentry>
1681 </variablelist>
1682 </refsect2>
1683
1684 <refsect2>
1685 <title><!-- Seccomp configuration -->Seccomp 설정</title>
1686 <para>
1687 <!--
1688 A container can be started with a reduced set of available
1689 system calls by loading a seccomp profile at startup. The
1690 seccomp configuration file must begin with a version number
1691 on the first line, a policy type on the second line, followed
1692 by the configuration.
1693 -->
1694 컨테이너는 seccomp 프로파일을 로드하여 사용가능한 시스템콜의 수를 줄인 체로 실행할 수 있다.
1695 seccomp 설정파일은 첫번째 행이 버전번호, 두번째 행이 정책 타입, 시작하며 그 이후에 설정 사항들이 포함되어야 한다.
1696 </para>
1697 <para>
1698 <!--
1699 Versions 1 and 2 are currently supported. In version 1, the
1700 policy is a simple allowlist. The second line therefore must
1701 read "allowlist", with the rest of the file containing one (numeric)
1702 syscall number per line. Each syscall number is allowlisted,
1703 while every unlisted number is denylisted for use in the container
1704 -->
1705 현재는 버전1과 2만 지원된다. 버전 1에서는 정책은 단순한 화이트리스트이다. 그러므로 두번째 라인은 반드시 "allowlist"여야 한다. 파일의 나머지 내용은 한 줄에 하나의 시스템콜 번호로 채워진다. 화이트리스트에 없는 번호는 컨테이너에서 블랙리스트로 들어간다.
1706 </para>
1707
1708 <para>
1709 <!--
1710 In version 2, the policy may be denylist or allowlist,
1711 supports per-rule and per-policy default actions, and supports
1712 per-architecture system call resolution from textual names.
1713 -->
1714 버전 2에서는 폴리시는 블랙리스트 또는 화이트리스트가 될 수 있다. 그리고 각 규칙와 각 정책의 기본 동작, 아키텍쳐별 시스템콜 설정, 텍스트로된 이름을 지원한다.
1715 </para>
1716 <para>
1717 <!--
1718 An example denylist policy, in which all system calls are
1719 allowed except for mknod, which will simply do nothing and
1720 return 0 (success), looks like:
1721 -->
1722 아래는 블랙리스트 정책 예제이다. 아래 정책에서는 mknod를 제외한 모든 시스템콜이 허용된다. mknod시에는 아무것도 수행하지 않고 0(성공)을 반환한다.
1723 </para>
1724 <screen>
1725 2
1726 denylist
1727 mknod errno 0
1728 </screen>
1729 <variablelist>
1730 <varlistentry>
1731 <term>
1732 <option>lxc.seccomp.profile</option>
1733 </term>
1734 <listitem>
1735 <para>
1736 <!--
1737 Specify a file containing the seccomp configuration to
1738 load before the container starts.
1739 -->
1740 컨테이너가 시작되기전에 읽어올 seccomp 설정이 담긴 파일을 지정한다.
1741 </para>
1742 </listitem>
1743 </varlistentry>
1744 </variablelist>
1745 </refsect2>
1746
1747 <refsect2>
1748 <title>PR_SET_NO_NEW_PRIVS</title>
1749 <para>
1750 <!--
1751 With PR_SET_NO_NEW_PRIVS active execve() promises not to grant
1752 privileges to do anything that could not have been done without
1753 the execve() call (for example, rendering the set-user-ID and
1754 set-group-ID mode bits, and file capabilities non-functional).
1755 Once set, this bit cannot be unset. The setting of this bit is
1756 inherited by children created by fork() and clone(), and preserved
1757 across execve().
1758 Note that PR_SET_NO_NEW_PRIVS is applied after the container has
1759 changed into its intended AppArmor profile or SElinux context.
1760 -->
1761 PR_SET_NO_NEW_PRIVS가 적용되면, execve()는, execve()를 호출되기 전에는 실행하지 못했던 것을 수행하기 위해 권한을 부여하는 류의 동작을 하지 않게 된다. (예를 들어, set-user-ID와 set-group-ID 모드, 파일 캐퍼빌리티가 동작하지 않는 것이다.)
1762 일단 적용되면 이 비트는 해제할 수 없다. 이 비트는 fork()와 clone()으로 생성된 자식에게도 상속되며, execve() 이후에도 그대로 적용된다.
1763 PR_SET_NO_NEW_PRIVS는 컨테이너의 AppArmor 프로필 또는 SELinux 문맥이 변경된 이후에 적용된다.
1764 </para>
1765 <variablelist>
1766 <varlistentry>
1767 <term>
1768 <option>lxc.no_new_privs</option>
1769 </term>
1770 <listitem>
1771 <para>
1772 <!--
1773 Specify whether the PR_SET_NO_NEW_PRIVS flag should be set for the
1774 container. Set to 1 to activate.
1775 -->
1776 PR_SET_NO_NEW_PRIVS가 컨테이너에 적용되어야 하는지 여부를 지정한다. 1을 지정하면 적용된다.
1777 </para>
1778 </listitem>
1779 </varlistentry>
1780 </variablelist>
1781 </refsect2>
1782
1783 <refsect2>
1784 <title><!-- UID mappings -->UID 매핑</title>
1785 <para>
1786 <!--
1787 A container can be started in a private user namespace with
1788 user and group id mappings. For instance, you can map userid
1789 0 in the container to userid 200000 on the host. The root
1790 user in the container will be privileged in the container,
1791 but unprivileged on the host. Normally a system container
1792 will want a range of ids, so you would map, for instance,
1793 user and group ids 0 through 20,000 in the container to the
1794 ids 200,000 through 220,000.
1795 -->
1796 컨테이너는 사용자와 그룹 ID 매핑을 통해 자신만의 사용자 네임스페이스 내에서 실행될수 있다.
1797 예를 들어서 컨테이너의 UID 0번을 호스트의 UID 200000으로 매핑할 수 있다. 컨테이너의 루트 사용자는 컨테이너에서는 특권을 가지고 있지만, 호스트에서는 특권을 가지고 있지 않게 된다.
1798 보통 시스템 컨테이너는 ID들의 범위를 지정하려 할텐데 그 역시도 지정 가능하다. 예를 들어서, 컨테이너의 UID와 GID를 0 ~ 20,000를 호스트의 200,000 ~ 220,000로 설정 가능하다.
1799 </para>
1800 <variablelist>
1801 <varlistentry>
1802 <term>
1803 <option>lxc.idmap</option>
1804 </term>
1805 <listitem>
1806 <para>
1807 <!--
1808 Four values must be provided. First a character, either
1809 'u', or 'g', to specify whether user or group ids are
1810 being mapped. Next is the first userid as seen in the
1811 user namespace of the container. Next is the userid as
1812 seen on the host. Finally, a range indicating the number
1813 of consecutive ids to map.
1814 -->
1815 4개의 값이 제공되어야 한다. 첫 번째는 'u', 'g', 'b' 문자로 각각 UID, GID, 또는 UID 및 GID 를 가리킨다. 그 다음은 사용자 네임스페이스내에서의 UID, 그다음은 호스트의 UID, 그리고 마지막으로 매핑할 ID의 범위를 지정한다.
1816 </para>
1817 </listitem>
1818 </varlistentry>
1819 </variablelist>
1820 </refsect2>
1821
1822 <refsect2>
1823 <title><!-- Container hooks -->컨테이너 훅</title>
1824 <para>
1825 <!--
1826 Container hooks are programs or scripts which can be executed
1827 at various times in a container's lifetime.
1828 -->
1829 컨테이너 훅은 컨테이너의 생명주기 내에서 다양한 상황에 실행되는 프로그램 또는 스크립트이다.
1830 </para>
1831 <para>
1832 <!--
1833 When a container hook is executed, information is passed both
1834 as command line arguments and through environment variables.
1835 The arguments are:
1836 <itemizedlist>
1837 <listitem><para> Container name. </para></listitem>
1838 <listitem><para> Section (always 'lxc'). </para></listitem>
1839 <listitem><para> The hook type (i.e. 'clone' or 'pre-mount'). </para></listitem>
1840 <listitem><para> Additional arguments. In the
1841 case of the clone hook, any extra arguments passed to
1842 lxc-clone will appear as further arguments to the hook.
1843 In the case of the stop hook, paths to filedescriptors
1844 for each of the container's namespaces along with their types
1845 are passed. </para></listitem>
1846 </itemizedlist>
1847 The following environment variables are set:
1848 <itemizedlist>
1849 <listitem><para> LXC_NAME: is the container's name. </para></listitem>
1850 <listitem><para> LXC_ROOTFS_MOUNT: the path to the mounted root filesystem. </para></listitem>
1851 <listitem><para> LXC_CONFIG_FILE: the path to the container configuration file. </para></listitem>
1852 <listitem><para> LXC_SRC_NAME: in the case of the clone hook, this is the original container's name. </para></listitem>
1853 <listitem><para> LXC_ROOTFS_PATH: this is the lxc.rootfs.path entry for the container. Note this is likely not where the mounted rootfs is to be found, use LXC_ROOTFS_MOUNT for that. </para></listitem>
1854 </itemizedlist>
1855 -->
1856 컨테이너 훅이 실행될 때, 정보는 명령어 인수나 환경 변수를 통해 넘겨진다.
1857 인수 :
1858 <itemizedlist>
1859 <listitem><para>컨테이너 이름</para></listitem>
1860 <listitem><para>섹션 (보통 'lxc')</para></listitem>
1861 <listitem><para>훅 종류 ('clone', 'pre-mount' 등)</para></listitem>
1862 <listitem><para>추가 인수. clone 훅일 경우, lxc-clone에게 넘였던 추가 인수들이 넘어온다. stop 훅일 경우, 컨테이너의 네임스페이스 각각에 대한 이름과 파일 디스크립터의 경로가 넘어온다.</para></listitem>
1863 </itemizedlist>
1864 환경 변수 :
1865 <itemizedlist>
1866 <listitem><para> LXC_NAME: 컨테이너 이름</para></listitem>
1867 <listitem><para> LXC_ROOTFS_MOUNT: 마운트될 루트 파일시스템의 경로</para></listitem>
1868 <listitem><para> LXC_CONFIG_FILE: 컨테이너 설정파일의 경로</para></listitem>
1869 <listitem><para> LXC_SRC_NAME: clone 훅의 경우, 원본 컨테이너의 이름</para></listitem>
1870 <listitem><para> LXC_ROOTFS_PATH: 컨테이너의 lxc.rootfs.path 항목. 이 것은 마운트된 루트 파일시스템을 가리키는 것이 아님에 주의해야한다. 그 목적을 위해서는 LXC_ROOTFS_MOUNT를 사용해야 한다.</para></listitem>
1871 </itemizedlist>
1872 </para>
1873 <para>
1874 <!--
1875 Standard output from the hooks is logged at debug level.
1876 Standard error is not logged, but can be captured by the
1877 hook redirecting its standard error to standard output.
1878 -->
1879 훅의 표준출력은 debug 수준 로그로 납겨진다.
1880 표준 에러는 로그로 남겨지지는 않지만, 표준 에러를 표준 출력으로 리
1881 다이렉션하여 로그로 남길 수 있다.
1882 </para>
1883 <variablelist>
1884 <varlistentry>
1885 <term>
1886 <option>lxc.hook.pre-start</option>
1887 </term>
1888 <listitem>
1889 <para>
1890 <!--
1891 A hook to be run in the host's namespace before the
1892 container ttys, consoles, or mounts are up.
1893 -->
1894 컨테이너의 tty, 콘솔의 생성 및 마운트가 되기 전에, 호스트의 네임스페이스에서 실행되는 훅.
1895 </para>
1896 </listitem>
1897 </varlistentry>
1898 </variablelist>
1899 <variablelist>
1900 <varlistentry>
1901 <term>
1902 <option>lxc.hook.pre-mount</option>
1903 </term>
1904 <listitem>
1905 <para>
1906 <!--
1907 A hook to be run in the container's fs namespace but before
1908 the rootfs has been set up. This allows for manipulation
1909 of the rootfs, i.e. to mount an encrypted filesystem. Mounts
1910 done in this hook will not be reflected on the host (apart from
1911 mounts propagation), so they will be automatically cleaned up
1912 when the container shuts down.
1913 -->
1914 컨테이너의 마운트 네임스페이스 안에서 루트 파일시스템이 세팅되기 전에 실행되는 훅.
1915 예를 들어 암호화 파일시스템을 마운트 하는 등의 루트 파일시스템을 조작할 수 있게 해준다. 이 훅에서 마운트를 하더라도 호스트에는 반영되지 않는다. (mounts propagation은 제외) 그래서 컨테이너가 종료되면 자동적으로 정리된다.
1916 </para>
1917 </listitem>
1918 </varlistentry>
1919 </variablelist>
1920 <variablelist>
1921 <varlistentry>
1922 <term>
1923 <option>lxc.hook.mount</option>
1924 </term>
1925 <listitem>
1926 <para>
1927 <!--
1928 A hook to be run in the container's namespace after
1929 mounting has been done, but before the pivot_root.
1930 -->
1931 마운트가 완료된 후 pivot_root 전에, 컨테이너의 마운트 네임스페이스에서 실행되는 훅.
1932 </para>
1933 </listitem>
1934 </varlistentry>
1935 </variablelist>
1936 <variablelist>
1937 <varlistentry>
1938 <term>
1939 <option>lxc.hook.autodev</option>
1940 </term>
1941 <listitem>
1942 <para>
1943 <!--
1944 A hook to be run in the container's namespace after
1945 mounting has been done and after any mount hooks have
1946 run, but before the pivot_root, if
1947 <option>lxc.autodev</option> == 1.
1948 The purpose of this hook is to assist in populating the
1949 /dev directory of the container when using the autodev
1950 option for systemd based containers. The container's /dev
1951 directory is relative to the
1952 ${<option>LXC_ROOTFS_MOUNT</option>} environment
1953 variable available when the hook is run.
1954 -->
1955 <option>lxc.autodev</option> == 1가 지정되어 있는 경우에 마운트 완료시 마운트 훅도 실행 된 후 pivot_root전에, 컨테이너의 마운트 네임스페이스에서 실행되는 훅.
1956 이 훅의 목적은 systemd 기반의 컨테이너에서 autodev 옵션을 사용하는 경우 /dev 디렉토리를 구성할 때 도움을 주기위한 것이다.
1957 훅이 실행될 때, 컨테이너의 /dev 경로는 ${<option>LXC_ROOTFS_MOUNT</option>} 환경변수에 대한 경로이다.
1958 </para>
1959 </listitem>
1960 </varlistentry>
1961 </variablelist>
1962 <variablelist>
1963 <varlistentry>
1964 <term>
1965 <option>lxc.hook.start</option>
1966 </term>
1967 <listitem>
1968 <para>
1969 <!--
1970 A hook to be run in the container's namespace immediately
1971 before executing the container's init. This requires the
1972 program to be available in the container.
1973 -->
1974 컨테이너의 init이 실행되기 직전에 컨테이너의 네임스페이스에서 실행되는 훅. 컨테이너 내에서 해당 프로그램이 실행될 수 있는 상태여야 한다.
1975 </para>
1976 </listitem>
1977 </varlistentry>
1978 </variablelist>
1979 <variablelist>
1980 <varlistentry>
1981 <term>
1982 <option>lxc.hook.stop</option>
1983 </term>
1984 <listitem>
1985 <para>
1986 <!--
1987 A hook to be run in the host's namespace with references
1988 to the container's namespaces after the container has been shut
1989 down. For each namespace an extra argument is passed to the hook
1990 containing the namespace's type and a filename that can be used to
1991 obtain a file descriptor to the corresponding namespace, separated
1992 by a colon. The type is the name as it would appear in the
1993 <filename>/proc/PID/ns</filename> directory.
1994 For instance for the mount namespace the argument usually looks
1995 like <filename>mnt:/proc/PID/fd/12</filename>.
1996 -->
1997 컨테이너가 종료된 후 컨테이너 네임스페이스에 대한 참조를 넘겨받는 호스트의 네임스페이스에서 실행되는 훅.
1998 각각의 네임스페이스들은 훅에 추가인수로 넘겨진다. 해당 인수는 네임스페이스의 이름과 네임스페이스의 파일 디스크립터를 얻어올 수 있는 파일이름을 가지고 있으며, 콜론으로 구분된다.
1999 네임스페이스 이름은 <filename>/proc/PID/ns</filename> 디렉토리 내의 파일 이름이다. 예를 들어 마운트 네임스페이스에 대응하는 인수는 일반적으로 <filename>mnt:/proc/PID/fd/12</filename>와 같이 된다.
2000 </para>
2001 </listitem>
2002 </varlistentry>
2003 </variablelist>
2004 <variablelist>
2005 <varlistentry>
2006 <term>
2007 <option>lxc.hook.post-stop</option>
2008 </term>
2009 <listitem>
2010 <para>
2011 <!--
2012 A hook to be run in the host's namespace after the
2013 container has been shut down.
2014 -->
2015 컨테이너가 종료된 후 호스트의 네임스페이스에서 실행되는 훅.
2016 </para>
2017 </listitem>
2018 </varlistentry>
2019 </variablelist>
2020 <variablelist>
2021 <varlistentry>
2022 <term>
2023 <option>lxc.hook.clone</option>
2024 </term>
2025 <listitem>
2026 <para>
2027 <!--
2028 A hook to be run when the container is cloned to a new one.
2029 See <citerefentry><refentrytitle><command>lxc-clone</command></refentrytitle>
2030 <manvolnum>1</manvolnum></citerefentry> for more information.
2031 -->
2032 컨테이너가 새로운 컨테이너로 복제되었을 경우 실행되는 훅. 아래를 참조하면 더 자세한 정보를 얻을 수 있다.
2033 <citerefentry><refentrytitle><command>lxc-clone</command></refentrytitle>
2034 <manvolnum>1</manvolnum></citerefentry>
2035 </para>
2036 </listitem>
2037 </varlistentry>
2038 </variablelist>
2039 <variablelist>
2040 <varlistentry>
2041 <term>
2042 <option>lxc.hook.destroy</option>
2043 </term>
2044 <listitem>
2045 <para>
2046 <!--
2047 A hook to be run when the container is destroyed.
2048 -->
2049 컨테이너가 제거될 때 실행되는 훅.
2050 </para>
2051 </listitem>
2052 </varlistentry>
2053 </variablelist>
2054 </refsect2>
2055
2056 <refsect2>
2057 <title><!-- Container hooks Environment Variables -->컨테이너 훅 환경 변수</title>
2058 <para>
2059 <!--
2060 A number of environment variables are made available to the startup
2061 hooks to provide configuration information and assist in the
2062 functioning of the hooks. Not all variables are valid in all
2063 contexts. In particular, all paths are relative to the host system
2064 and, as such, not valid during the <option>lxc.hook.start</option> hook.
2065 -->
2066 훅이 시작될때 설정 정보를 제공하고 훅의 기능을 돕기 위해 몇가지 환경 변수가 사용 가능하다.
2067 모든 컨텍스트에서 모든 변수가 사용 가능하진 않다. 특히, 모든 경로는 호스트 시스템에서의 경로이며, <option>lxc.hook.start</option> 훅에서는 유효하지 않다.
2068 </para>
2069 <variablelist>
2070 <varlistentry>
2071 <term>
2072 <option>LXC_NAME</option>
2073 </term>
2074 <listitem>
2075 <para>
2076 <!--
2077 The LXC name of the container. Useful for logging messages
2078 in common log environments. [<option>-n</option>]
2079 -->
2080 LXC 컨테이너의 이름. 일반적인 로그 환경에서 로그메시지에 유용하게 사용할 수 있다. [<option>-n</option>]
2081 </para>
2082 </listitem>
2083 </varlistentry>
2084 </variablelist>
2085 <variablelist>
2086 <varlistentry>
2087 <term>
2088 <option>LXC_CONFIG_FILE</option>
2089 </term>
2090 <listitem>
2091 <para>
2092 <!--
2093 Host relative path to the container configuration file. This
2094 gives the container to reference the original, top level,
2095 configuration file for the container in order to locate any
2096 additional configuration information not otherwise made
2097 available. [<option>-f</option>]
2098 -->
2099 컨테이너 설정파일의 호스트에서의 경로.
2100 이것은 다른 방법으로는 얻을 수 없는 추가적인 정보룰 찾을 수 있도록, 컨테이너가 참조하는 원래의 최상위 설정파일의 경로를 제공한다. [<option>-f</option>]
2101 </para>
2102 </listitem>
2103 </varlistentry>
2104 </variablelist>
2105 <variablelist>
2106 <varlistentry>
2107 <term>
2108 <option>LXC_CONSOLE</option>
2109 </term>
2110 <listitem>
2111 <para>
2112 <!--
2113 The path to the console output of the container if not NULL.
2114 [<option>-c</option>] [<option>lxc.console.path</option>]
2115 -->
2116 NULL이 아니라면, 컨테이너의 콘솔의 출력이 저장될 경로.
2117 [<option>-c</option>] [<option>lxc.console.path</option>]
2118 </para>
2119 </listitem>
2120 </varlistentry>
2121 </variablelist>
2122 <variablelist>
2123 <varlistentry>
2124 <term>
2125 <option>LXC_CONSOLE_LOGPATH</option>
2126 </term>
2127 <listitem>
2128 <para>
2129 <!--
2130 The path to the console log output of the container if not NULL.
2131 [<option>-L</option>]
2132 -->
2133 NULL이 아니라면, 컨테이너의 콘솔의 로그 출력이 저장될 경로.
2134 [<option>-L</option>]
2135 </para>
2136 </listitem>
2137 </varlistentry>
2138 </variablelist>
2139 <variablelist>
2140 <varlistentry>
2141 <term>
2142 <option>LXC_ROOTFS_MOUNT</option>
2143 </term>
2144 <listitem>
2145 <para>
2146 <!--
2147 The mount location to which the container is initially bound.
2148 This will be the host relative path to the container rootfs
2149 for the container instance being started and is where changes
2150 should be made for that instance.
2151 [<option>lxc.rootfs.mount</option>]
2152 -->
2153 처음에 컨테이너가 마운트 되는 장소.
2154 이것은 시작되는 컨테이너 인스턴스를 위한 루트 파일시스템의 호스트에서의 경로이다. 해당 인스턴스에 대한 변경이 이루어져야 하는 장소이다.
2155 [<option>lxc.rootfs.mount</option>]
2156 </para>
2157 </listitem>
2158 </varlistentry>
2159 </variablelist>
2160 <variablelist>
2161 <varlistentry>
2162 <term>
2163 <option>LXC_ROOTFS_PATH</option>
2164 </term>
2165 <listitem>
2166 <para>
2167 <!--
2168 The host relative path to the container root which has been
2169 mounted to the rootfs.mount location.
2170 [<option>lxc.rootfs.path</option>]
2171 -->
2172 rootfs.mount에 마운트된 컨테이너 루트의 호스트에서의 경로이다.
2173 [<option>lxc.rootfs.path</option>]
2174 </para>
2175 </listitem>
2176 </varlistentry>
2177 </variablelist>
2178 <variablelist>
2179 <varlistentry>
2180 <term>
2181 <option>LXC_SRC_NAME</option>
2182 </term>
2183 <listitem>
2184 <para>
2185 <!--
2186 Only for the clone hook. Is set to the original container name.
2187 -->
2188 clone 훅에서만 사용된다. 원본 컨테이너의 이름을 지정한다.
2189 </para>
2190 </listitem>
2191 </varlistentry>
2192 </variablelist>
2193 <variablelist>
2194 <varlistentry>
2195 <term>
2196 <option>LXC_TARGET</option>
2197 </term>
2198 <listitem>
2199 <para>
2200 <!--
2201 Only for the stop hook. Is set to "stop" for a container
2202 shutdown or "reboot" for a container reboot.
2203 -->
2204 stop 훅에서만 사용된다. 값이 "stop"이면 컨테이너가 종료되는 것을, "reboot"이면 컨테이너가 재부팅되는 것을 의미한다.
2205 </para>
2206 </listitem>
2207 </varlistentry>
2208 </variablelist>
2209 <variablelist>
2210 <varlistentry>
2211 <term>
2212 <option>LXC_CGNS_AWARE</option>
2213 </term>
2214 <listitem>
2215 <para>
2216 <!--
2217 If unset, then this version of lxc is not aware of cgroup
2218 namespaces. If set, it will be set to 1, and lxc is aware
2219 of cgroup namespaces. Note this does not guarantee that
2220 cgroup namespaces are enabled in the kernel. This is used
2221 by the lxcfs mount hook.
2222 -->
2223 이 변수가 지정되지 않았다면, 현재 버전의 lxc는 cgroup 네임스페이스를 지원하지 않는다. 만약 지정되었고 값이 1이라면, lxc는 cgroup 네임스페이스를 지원하는 것이다. 단, kernel에서의 cgroup 네임스페이스 지원을 보장하는 것이 아님에 주의해야 한다. lxcfs 마운트 훅에서 사용된다.
2224 </para>
2225 </listitem>
2226 </varlistentry>
2227 </variablelist>
2228 </refsect2>
2229
2230 <refsect2>
2231 <title><!-- Logging -->로그</title>
2232 <para>
2233 <!--
2234 Logging can be configured on a per-container basis. By default,
2235 depending upon how the lxc package was compiled, container startup
2236 is logged only at the ERROR level, and logged to a file named after
2237 the container (with '.log' appended) either under the container path,
2238 or under @LOGPATH@.
2239 -->
2240 로그는 각 컨테이너마다 설정할 수 있다.
2241 기본적으로 lxc 패키지가 어떻게 컴파일되었는지에 달려있지만, 컨테이너 시작시에는 error 수준 로그만 기록된다. 컨테이너 경로나 @LOGPATH@ 밑에 컨테이너의 이름을 따서(뒤에 '.log'를 붙여서) 로그 파일을 생성한다.
2242 </para>
2243 <para>
2244 <!--
2245 Both the default log level and the log file can be specified in the
2246 container configuration file, overriding the default behavior. Note
2247 that the configuration file entries can in turn be overridden by the
2248 command line options to <command>lxc-start</command>.
2249 -->
2250 기본 로그 수준과 로그파일은 컨테이너 설정파일로 지정 가능하며, 기본 동작을 덮어버린다. 마찬가지로 설 정파일 항목들은 <command>lxc-start</command> 명령어의 옵션으로 덮어쓸 수 있다.
2251 </para>
2252 <variablelist>
2253 <varlistentry>
2254 <term>
2255 <option>lxc.log.level</option>
2256 </term>
2257 <listitem>
2258 <para>
2259 <!--
2260 The level at which to log. The log level is an integer in
2261 the range of 0..8 inclusive, where a lower number means more
2262 verbose debugging. In particular 0 = trace, 1 = debug, 2 =
2263 info, 3 = notice, 4 = warn, 5 = error, 6 = critical, 7 =
2264 alert, and 8 = fatal. If unspecified, the level defaults
2265 to 5 (error), so that only errors and above are logged.
2266 -->
2267 기록할 로그 수준.
2268 로그 수준은 0 ~ 8 사이의 정수이다.
2269 숫자가 작을수록 더 자세히 로그를 기록한다.
2270 구체적으로는 0 = trace, 1 = debug, 2 = info, 3 = notice, 4 = warn, 5 = error, 6 = critical, 7 = alert, 8 = fatal이다.
2271 지정하지 않은 경우, 기본값은 5 (error)로, 에러 이거나 그보다 심각한 상황의 로그를 기록한다.
2272 </para>
2273 <para>
2274 <!--
2275 Note that when a script (such as either a hook script or a
2276 network interface up or down script) is called, the script's
2277 standard output is logged at level 1, debug.
2278 -->
2279 (훅 스크립트 및 네트워크 인터페이스 up/down 스크립트 같은) 스크립트가 호출이되면, 스크립트의 표준 입출력은 1 번, debug 수준으로 기록된다.
2280 </para>
2281 </listitem>
2282 </varlistentry>
2283 <varlistentry>
2284 <term>
2285 <option>lxc.log</option>
2286 </term>
2287 <listitem>
2288 <para>
2289 <!--
2290 The file to which logging info should be written.
2291 -->
2292 로그 정보를 쓸 파일.
2293 </para>
2294 </listitem>
2295 </varlistentry>
2296 <varlistentry>
2297 <term>
2298 <option>lxc.log.syslog</option>
2299 </term>
2300 <listitem>
2301 <para>
2302 <!--
2303 Send logging info to syslog. It respects the log level defined in
2304 <command>lxc.log.level</command>. The argument should be the syslog
2305 facility to use, valid ones are: daemon, local0, local1, local2,
2306 local3, local4, local5, local5, local7.
2307 -->
2308 로그정보를 syslog에 보낸다. 로그 수준은 <command>lxc.log.level</command>로 지정할 수 있다. 인자는 syslog에 정의된 값으로만 지정할 수 있다. 사용 가능한 값은 다음과 같다 : daemon, local0, local1, local2, local3, local4, local5, local5, local7
2309 </para>
2310 </listitem>
2311 </varlistentry>
2312 </variablelist>
2313 </refsect2>
2314
2315 <refsect2>
2316 <title><!-- Autostart -->자동시작</title>
2317 <para>
2318 <!--
2319 The autostart options support marking which containers should be
2320 auto-started and in what order. These options may be used by LXC tools
2321 directly or by external tooling provided by the distributions.
2322 -->
2323 자동시작 옵션들은 자동시작할 컨테이너 지정 및 순서 설정이 가능하다.
2324 이 옵션들은 LXC 도구로 직접 사용하거나 배포판들이 제공하는 외부 도구에 의해 사용될 수도 있다.
2325 </para>
2326
2327 <variablelist>
2328 <varlistentry>
2329 <term>
2330 <option>lxc.start.auto</option>
2331 </term>
2332 <listitem>
2333 <para>
2334 <!--
2335 Whether the container should be auto-started.
2336 Valid values are 0 (off) and 1 (on).
2337 -->
2338 컨테이너가 자동으로 시작될지 여부.
2339 유효한 값은 0 (off) 또는 1 (on)이다.
2340 </para>
2341 </listitem>
2342 </varlistentry>
2343 <varlistentry>
2344 <term>
2345 <option>lxc.start.delay</option>
2346 </term>
2347 <listitem>
2348 <para>
2349 <!--
2350 How long to wait (in seconds) after the container is
2351 started before starting the next one.
2352 -->
2353 컨테이너가 시작된 후 다음 컨테이너가 시작되기 전까지 기다릴 시간(초).
2354 </para>
2355 </listitem>
2356 </varlistentry>
2357 <varlistentry>
2358 <term>
2359 <option>lxc.start.order</option>
2360 </term>
2361 <listitem>
2362 <para>
2363 <!--
2364 An integer used to sort the containers when auto-starting
2365 a series of containers at once.
2366 -->
2367 다수의 컨테이너를 한번에 자동시작할 때, 컨테이너의 부팅 순서를 결정할 때 사용하는 정수를 지정한다.
2368 </para>
2369 </listitem>
2370 </varlistentry>
2371 <varlistentry>
2372 <term>
2373 <option>lxc.monitor.unshare</option>
2374 </term>
2375 <listitem>
2376 <para>
2377 <!--
2378 If not zero the mount namespace will be unshared from the host
2379 before initializing the container (before running any pre-start
2380 hooks). This requires the CAP_SYS_ADMIN capability at startup.
2381 Default is 0.
2382 -->
2383 값이 0이 아니라면, 컨테이너가 초기화되기 전 (pre-start 훅이 실행 되기 전) 호스트로부터 마운트 네임스페이스를 unshare 한다. 시작시에 CAP_SYS_ADMIN 캐퍼빌리티가 요구된다. 기본값은 0이다.
2384 </para>
2385 </listitem>
2386 </varlistentry>
2387 <varlistentry>
2388 <term>
2389 <option>lxc.group</option>
2390 </term>
2391 <listitem>
2392 <para>
2393 <!--
2394 A multi-value key (can be used multiple times) to put the
2395 container in a container group. Those groups can then be
2396 used (amongst other things) to start a series of related
2397 containers.
2398 -->
2399 컨테이너를 추가할 컨테이너 그룹을 지정한다. 여러값을 설정할 수 있으며, 여러번 지정 가능하다.
2400 설정된 그룹은 연관된 컨테이너들을 시작할 때 사용된다.
2401 </para>
2402 </listitem>
2403 </varlistentry>
2404 </variablelist>
2405 </refsect2>
2406
2407 <refsect2>
2408 <title><!-- Autostart and System Boot -->자동시작과 시스템 부팅</title>
2409 <para>
2410 <!--
2411 Each container can be part of any number of groups or no group at all.
2412 Two groups are special. One is the NULL group, i.e. the container does
2413 not belong to any group. The other group is the "onboot" group.
2414 -->
2415 각각의 컨테이너는 여러 그룹에 속할수도 있고 아무그룹에도 속하지 않을 수 있다. 두개의 그룹은 특수한데, 하나는 NULL 그룹이고 컨테이너가 아무그룹에도 속하지 않을때 사용된다. 그리고 나머지 하나는 "onboot" 그룹이다.
2416 </para>
2417
2418 <para>
2419 <!--
2420 When the system boots with the LXC service enabled, it will first
2421 attempt to boot any containers with lxc.start.auto == 1 that is a member
2422 of the "onboot" group. The startup will be in order of lxc.start.order.
2423 If an lxc.start.delay has been specified, that delay will be honored
2424 before attempting to start the next container to give the current
2425 container time to begin initialization and reduce overloading the host
2426 system. After starting the members of the "onboot" group, the LXC system
2427 will proceed to boot containers with lxc.start.auto == 1 which are not
2428 members of any group (the NULL group) and proceed as with the onboot
2429 group.
2430 -->
2431 LXC 서비스가 활성화된 상태로 시스템이 부팅될 때, 먼저 lxc.start.auto == 1이고 "onboot" 그룹인 컨테이너들을 시작하려고 시도한다. 시작과정은 lxc.start.order의 순서대로 이루어진다.
2432 만약 lxc.start.delay가 지정 되었다면, 다음 컨테이너를 시작하려고 시도>하기 전, 현재 컨테이너의 초기화 및 호스트 시스템의 부하를 줄이기 위해서 지연시간을 준다.
2433 "onboot" 그룹의 멤버들을 시작시킨 후, LXC 시스템은 lxc.start.auto == 1이고 어떤 그룹에도 속하지 않은(NULL 그룹) 컨테이너들을 시작한다.
2434 </para>
2435
2436 </refsect2>
2437
2438 <refsect2>
2439 <title><!-- Container Environment -->컨테이너 환경변수</title>
2440 <para>
2441 <!--
2442 If you want to pass environment variables into the container (that
2443 is, environment variables which will be available to init and all of
2444 its descendents), you can use <command>lxc.environment</command>
2445 parameters to do so. Be careful that you do not pass in anything
2446 sensitive; any process in the container which doesn't have its
2447 environment scrubbed will have these variables available to it, and
2448 environment variables are always available via
2449 <command>/proc/PID/environ</command>.
2450 -->
2451 컨테이너에 환경변수를 념겨주고 싶다면(환경변수를 컨테이너의 init과 그 자손 전체가 사용할 수 있다), <command>lxc.environment</command>를 사용할 수 있다.
2452 민감한 정보를 넘기지 않도록 주의해야 한다. 왜냐면 컨테이너의 모든 프로세스가 이 환경변수를 획득할 수 있기 때문이다. 환경변수는 항상 <command>/proc/PID/environ</command>를 통해 획득할 수 있다.
2453 </para>
2454
2455 <para>
2456 <!--
2457 This configuration parameter can be specified multiple times; once
2458 for each environment variable you wish to configure.
2459 -->
2460 이 설정항목은 여러번을 지정할 수 있으며, 설정하려는 환경변수마다 한번씩 지정한다.
2461 </para>
2462
2463 <variablelist>
2464 <varlistentry>
2465 <term>
2466 <option>lxc.environment</option>
2467 </term>
2468 <listitem>
2469 <para>
2470 <!--
2471 Specify an environment variable to pass into the container.
2472 Example:
2473 -->
2474 컨테이너로 전달될 환경변수를 지정한다.
2475 예제:
2476 </para>
2477 <programlisting>
2478 lxc.environment = APP_ENV=production
2479 lxc.environment = SYSLOG_SERVER=192.0.2.42
2480 </programlisting>
2481 </listitem>
2482 </varlistentry>
2483 </variablelist>
2484 </refsect2>
2485
2486 </refsect1>
2487
2488 <refsect1>
2489 <title><!-- Examples -->예제</title>
2490 <para>
2491 <!--
2492 In addition to the few examples given below, you will find
2493 some other examples of configuration file in @DOCDIR@/examples
2494 -->
2495 아래에 소개하는 몇가지 예제말고도 다른 예제들이 @DOCDIR@/examples에 위치하고 있다.
2496 </para>
2497 <refsect2>
2498 <title><!-- Network -->네트워크</title>
2499 <para>
2500 <!--
2501 This configuration sets up a container to use a veth pair
2502 device with one side plugged to a bridge br0 (which has been
2503 configured before on the system by the administrator). The
2504 virtual network device visible in the container is renamed to
2505 eth0.
2506 -->
2507 이 설정은 컨테이너가 한 쪽은 (이전에 시스템에 이미 생성된) br0 브리지에 연결되어 있는 veth 장치 쌍을 사용하도록 세팅한다. 가상 네트워크 장치는 컨테이너 내에서 eth0라는 이름을 갖는다.
2508 </para>
2509 <programlisting>
2510 lxc.uts.name = myhostname
2511 lxc.net.0.type = veth
2512 lxc.net.0.flags = up
2513 lxc.net.0.link = br0
2514 lxc.net.0.name = eth0
2515 lxc.net.0.hwaddr = 4a:49:43:49:79:bf
2516 lxc.net.0.ipv4.address = 1.2.3.5/24 1.2.3.255
2517 lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3597
2518 </programlisting>
2519 </refsect2>
2520
2521 <refsect2>
2522 <title><!-- UID/GID mapping -->UID/GID 매핑</title>
2523 <para><!-- This configuration will map both user and group ids in the
2524 range 0-9999 in the container to the ids 100000-109999 on the host. -->
2525 이 설정은 UID와 GID 둘다를 컨테이너의 0 ~ 9999를 호스트의 100000 ~ 109999로 매핑한다.
2526 </para>
2527 <programlisting>
2528 lxc.idmap = u 0 100000 10000
2529 lxc.idmap = g 0 100000 10000
2530 </programlisting>
2531 </refsect2>
2532
2533 <refsect2>
2534 <title><!-- Control group -->컨트롤 그룹</title>
2535 <para>
2536 <!-- This configuration will setup several control groups for
2537 the application, cpuset.cpus restricts usage of the defined cpu,
2538 cpus.share prioritize the control group, devices.allow makes
2539 usable the specified devices.-->
2540 이 설정은 어플리케이션을 위해 몇가지 컨트롤 그룹을 설정한다. cpuset.cpus는 정의된 cpu만 사용하도록 제한한다. cpus.share은 컨트롤 그룹(cpu) 우선순위를 지정한다. devices.allow는 특정 장치를 사용 가능하게 한다.
2541 </para>
2542 <programlisting>
2543 lxc.cgroup.cpuset.cpus = 0,1
2544 lxc.cgroup.cpu.shares = 1234
2545 lxc.cgroup.devices.deny = a
2546 lxc.cgroup.devices.allow = c 1:3 rw
2547 lxc.cgroup.devices.allow = b 8:0 rw
2548 </programlisting>
2549 </refsect2>
2550
2551 <refsect2>
2552 <title><!-- Complex configuration -->복잡한 설정</title>
2553 <para>
2554 <!-- This example show a complex configuration making a complex
2555 network stack, using the control groups, setting a new hostname,
2556 mounting some locations and a changing root file system. -->
2557 아래의 예제는 복잡한 네트워크 스택, 컨트롤 그룹 사용, 호스트 이름 설정, 몇몇 장소 마운트, 루트 파일시스템 변경 등의 복잡한 설정을 보여준다.
2558 </para>
2559 <programlisting>
2560 lxc.uts.name = complex
2561 lxc.net.0.type = veth
2562 lxc.net.0.flags = up
2563 lxc.net.0.link = br0
2564 lxc.net.0.hwaddr = 4a:49:43:49:79:bf
2565 lxc.net.0.ipv4.address = 10.2.3.5/24 10.2.3.255
2566 lxc.net.0.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3597
2567 lxc.net.0.ipv6.address = 2003:db8:1:0:214:5432:feab:3588
2568 lxc.net.1.type = macvlan
2569 lxc.net.1.flags = up
2570 lxc.net.1.link = eth0
2571 lxc.net.1.hwaddr = 4a:49:43:49:79:bd
2572 lxc.net.1.ipv4.address = 10.2.3.4/24
2573 lxc.net.1.ipv4.address = 192.168.10.125/24
2574 lxc.net.1.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3596
2575 lxc.net.2.type = phys
2576 lxc.net.2.flags = up
2577 lxc.net.2.link = random0
2578 lxc.net.2.hwaddr = 4a:49:43:49:79:ff
2579 lxc.net.2.ipv4.address = 10.2.3.6/24
2580 lxc.net.2.ipv6.address = 2003:db8:1:0:214:1234:fe0b:3297
2581 lxc.cgroup.cpuset.cpus = 0,1
2582 lxc.cgroup.cpu.shares = 1234
2583 lxc.cgroup.devices.deny = a
2584 lxc.cgroup.devices.allow = c 1:3 rw
2585 lxc.cgroup.devices.allow = b 8:0 rw
2586 lxc.mount.fstab = /etc/fstab.complex
2587 lxc.mount.entry = /lib /root/myrootfs/lib none ro,bind 0 0
2588 lxc.rootfs.path = dir:/mnt/rootfs.complex
2589 lxc.cap.drop = sys_module mknod setuid net_raw
2590 lxc.cap.drop = mac_override
2591 </programlisting>
2592 </refsect2>
2593
2594 </refsect1>
2595
2596 <refsect1>
2597 <title><!-- See Also -->참조</title>
2598 <simpara>
2599 <citerefentry>
2600 <refentrytitle><command>chroot</command></refentrytitle>
2601 <manvolnum>1</manvolnum>
2602 </citerefentry>,
2603
2604 <citerefentry>
2605 <refentrytitle><command>pivot_root</command></refentrytitle>
2606 <manvolnum>8</manvolnum>
2607 </citerefentry>,
2608
2609 <citerefentry>
2610 <refentrytitle><filename>fstab</filename></refentrytitle>
2611 <manvolnum>5</manvolnum>
2612 </citerefentry>
2613
2614 <citerefentry>
2615 <refentrytitle><filename>capabilities</filename></refentrytitle>
2616 <manvolnum>7</manvolnum>
2617 </citerefentry>
2618
2619 </simpara>
2620 </refsect1>
2621
2622 &seealso;
2623
2624 </refentry>
2625
2626 <!-- Keep this comment at the end of the file
2627 Local variables:
2628 mode: sgml
2629 sgml-omittag:t
2630 sgml-shorttag:t
2631 sgml-minimize-attributes:nil
2632 sgml-always-quote-attributes:t
2633 sgml-indent-step:2
2634 sgml-indent-data:t
2635 sgml-parent-document:nil
2636 sgml-default-dtd-file:nil
2637 sgml-exposed-tags:nil
2638 sgml-local-catalogs:nil
2639 sgml-local-ecat-files:nil
2640 End:
2641 -->