lxc-create.sgml.in revision 4ff8fb6cae48bc4cd376fffa70c69a7cd72425bc
bb2b38cd44b032118359afbc743efbea12f48e61bnicholeslxc: linux Container library
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes(C) Copyright IBM Corp. 2007, 2008
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesDaniel Lezcano <daniel.lezcano at free.fr>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesThis library is free software; you can redistribute it and/or
0662ed52e814f8f08ef0e09956413a792584eddffuankgmodify it under the terms of the GNU Lesser General Public
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLicense as published by the Free Software Foundation; either
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesversion 2.1 of the License, or (at your option) any later version.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesThis library is distributed in the hope that it will be useful,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesbut WITHOUT ANY WARRANTY; without even the implied warranty of
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesLesser General Public License for more details.
70953fb44a7140fe206c3a5f011e24209c8c5c6abnicholesYou should have received a copy of the GNU Lesser General Public
16b55a35cff91315d261d1baa776138af465c4e4fuankgLicense along with this library; if not, write to the Free Software
16b55a35cff91315d261d1baa776138af465c4e4fuankgFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesTranslated into Korean
bb2b38cd44b032118359afbc743efbea12f48e61bnicholesby Sungbae Yoo <sungbae.yoo at samsung.com>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <refnamediv>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <refpurpose>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes creates a container
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </refpurpose>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </refnamediv>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <refsynopsisdiv>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <cmdsynopsis>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <arg choice="req">-n <replaceable>name</replaceable></arg>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <arg choice="opt">-f <replaceable>config_file</replaceable></arg>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <arg choice="req">-t <replaceable>template</replaceable></arg>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <arg choice="opt">-B <replaceable>backingstore</replaceable></arg>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <arg choice="opt">-- <replaceable>template-options</replaceable></arg>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </cmdsynopsis>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </refsynopsisdiv>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <command>lxc-create</command> creates a system object where is
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg stored the configuration information and where can be stored
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes user information. The identifier <replaceable>name</replaceable>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes is used to specify the container to be used with the different
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes lxc commands.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <command>lxc-create</command>는 설정정보와 사용자 정보가 저장되는 시스템 객체를 생성한다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>name</replaceable>은 다른 lxc 명령어들에서 특정 컨테이너를 지정하는데 사용된다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes The object is a directory created in <filename>@LXCPATH@</filename>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes and identified by its name.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 객체는 <filename>@LXCPATH@</filename>에 작성되는 디렉토리이며, 자신의 <replaceable>name</replaceable>으로 구분되어 진다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes The object is the definition of the different resources an
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes application can use or can see. The more the configuration file
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes contains information, the more the container is isolated and
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes the more the application is jailed.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 객체는 응용 프로그램이 사용할 수 있고 볼 수 있는 여러 자원들의 정의이다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 설정파일이 많은 정보를 담고 있을수록 컨테이너는 더욱더 고립될 수 있고, 응용 프로그램은 더욱더 격리될 수 있다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes If the configuration file <replaceable>config_file</replaceable>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes is not specified, the container will be created with the default
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes isolation: processes, sysv ipc and mount points.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 만약 설정파일 <replaceable>config_file</replaceable>가 지정되지 않았다면, 컨테이너는 프로세스, sysv ipc, 마운트 포인트에 대한 기본적인 고립 상태로 만들어진다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <variablelist>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <option>-f <replaceable>config_file</replaceable></option>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Specify the configuration file to configure the virtualization
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes and isolation functionalities for the container.
0662ed52e814f8f08ef0e09956413a792584eddffuankg 컨테이너 가상화 및 고립 기능을 설정하는 설정파일을 지정한다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </varlistentry>
0662ed52e814f8f08ef0e09956413a792584eddffuankg <varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <option>-t <replaceable>template</replaceable></option>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'template' is the short name of an existing 'lxc-template'
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes script that is called by lxc-create,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes eg. busybox, debian, fedora, ubuntu or sshd.
0662ed52e814f8f08ef0e09956413a792584eddffuankg Refer to the examples in <filename>@LXCTEMPLATEDIR@</filename>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes for details of the expected script structure.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes Alternatively, the full path to an executable template script
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg can also be passed as a parameter.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes "none" can be used to force lxc-create to skip rootfs creation.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes lxc-create 명령어는 'lxc-template' 스크립트를 호출한다. <replaceable>template</replaceable>은 'lxc-template' 스크립트의 짧은 이름으로, busybox, debian, fedora, ubuntu, sshd 등이 있다. 스크립트의 구조에 대해 궁금할 때는 <filename>@LXCTEMPLATEDIR@</filename>에 있는 예제들을 참고하면 된다.
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <replaceable>template</replaceable> 대신 스크립트의 전체 경로를 지정할 수도 있다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes "none"으로 지정하면 루트파일시스템 생성을 강제로 건너뛸 수 있다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <option>-B <replaceable>backingstore</replaceable></option>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'backingstore' is one of 'dir', 'lvm', 'loop', 'btrfs', 'zfs', or 'best'. The
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes default is 'dir', meaning that the container root filesystem
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes This backing store type allows the optional
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--dir ROOTFS</replaceable> to be specified, meaning
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes that the container rootfs should be placed under the specified path,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes rather than the default. (The 'none' backingstore type is an alias for
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'dir'.) If 'btrfs' is specified, then the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes target filesystem must be btrfs, and the container rootfs will be
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes created as a new subvolume. This allows snapshotted clones to be
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes created, but also causes rsync --one-filesystem to treat it as a
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes separate filesystem.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes If backingstore is 'lvm', then an lvm block device will be
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes used and the following further options are available:
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--lvname lvname1</replaceable> will create an LV
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes named <filename>lvname1</filename> rather than the default, which
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg is the container name. <replaceable>--vgname vgname1</replaceable>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes will create the LV in volume group <filename>vgname1</filename>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes rather than the default, <filename>lxc</filename>.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--thinpool thinpool1</replaceable> will create the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes LV as a thin-provisioned volume in the pool named
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <filename>thinpool1</filename> rather than the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes default, <filename>lxc</filename>.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--fstype FSTYPE</replaceable> will create an FSTYPE
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes filesystem on the LV, rather than the default, which is ext4.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--fssize SIZE</replaceable> will create a LV (and
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes filesystem) of size SIZE rather than the default, which is 1G.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'backingstore'는 'dir', 'lvm', 'loop', 'btrfs', 'zfs', 'best'를 지정할 수 있다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 기본 값은 'dir'로 컨테이너 루트 파일시스템을 의미하며 <filename>@LXCPATH@/container/rootfs</filename>이하 디렉토리를 가리킨다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'dir'은 옵션으로 컨테이너 루트 파일시스템이 어느 경로에 위치할지 지정할 수 있으며, <replaceable>--dir ROOTFS</replaceable>로 가능하다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes ('none'은 'dir'과 동일하다)
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg 'btrfs'가 지정되어 있다면, 타겍 파일시스템은 반드시 btrfs여야 한다. 그리고 컨테이너 루트 파일시스템은 새로운 서브볼륨으로 생성된다. 이는 스냅샷된 복제물을 만들지만, rsync --one-filesystem는 분리된 파일시스템으로 취급하게 된다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'lvm'으로 지정되있다면, lvm 블록 디바이스가 사용되며, 이때 사용가능한 옵션은 다음과 같다 : <replaceable>--lvname lvname1</replaceable>는 이름이 <filename>lvname1</filename>인 LV를 만든다(기본값은 컨테이너 이름).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes<replaceable>--vgname vgname1</replaceable>는 이름이 <filename>vgname1</filename>인 볼륨그룹 안에 LV를 만든다(기본값은 <filename>lxc</filename>).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--thinpool thinpool1</replaceable>는 <filename>thinpool1</filename>라는 풀 안에 있는 thin-provisioned 볼륨으로 LV를 만든다(기본값은 <filename>lxc</filename>).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--fstype FSTYPE</replaceable>는 LV의 파일시스템을 FSTYPE으로 지정한다(기본값은 ext4).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <replaceable>--fssize SIZE</replaceable>는 LV의 크기를 지정한다(기본값은 1G).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes If backingstore is 'loop', you can use <replaceable>--fstype FSTYPE</replaceable> and <replaceable>--fssize SIZE</replaceable> as 'lvm'. The default values for these options are the same as 'lvm'.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'loop'로 지정되어 있다면, 'lvm'과 비슷하게 <replaceable>--fstype FSTYPE</replaceable>과 <replaceable>--fssize SIZE</replaceable>를 사용할 수 있다(기본값은 'lvm'과 동일).
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes If backingstore is 'best', then lxc will try, in order, btrfs,
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes zfs, lvm, and finally a directory backing store.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 'best'로 지정되어 있다면, lxc는 btrfs, zfs, lvm, dir의 순서대로 시도해본다.
609ef720afd62ca63391c9fdb415cd2faf29aa46bnicholes </varlistentry>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <varlistentry>
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <option>-- <replaceable>template-options</replaceable></option>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes This will pass <replaceable>template-options</replaceable> to the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes template as arguments. To see the list of options supported by
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg the template, you can run
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <command>lxc-create -t TEMPLATE -h</command>.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 이것은 <replaceable>template-options</replaceable>를 템플릿에게 인수로 넘긴다. 만약 어떤 인수를 템플릿에서 지원하는지 보고 싶다면, <command>lxc-create -t TEMPLATE -h</command>를 사용하면 된다.
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg </varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </variablelist>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes &commonoptions;
ac7985784d08a3655291f24f711812b4d8b1cbcffuankg <variablelist>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes <varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes As the message mention it, you try to create a container
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes but there is a container with the same name. You can use
8410c53aaf5e0372a19d5f4d2bc696b9c609ce3cbnicholes the <command>lxc-ls</command> command to list the
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes available containers on the system.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes 메시지에 나와있는 대로, 이미 같은 이름의 컨테이너가 존재하는 경우이다. <command>lxc-ls</command> 명령어를 사용하여 시스템에 이미 존재하는 컨테이너를 확인해볼 수 있다.
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </varlistentry>
bb2b38cd44b032118359afbc743efbea12f48e61bnicholes </variablelist>