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