286N/Alxc: linux Container library 70N/A(C) Copyright IBM Corp. 2007, 2008 70N/AThis library is free software; you can redistribute it and/or 70N/Amodify it under the terms of the GNU Lesser General Public 70N/ALicense as published by the Free Software Foundation; either 70N/Aversion 2.1 of the License, or (at your option) any later version. 70N/AThis library is distributed in the hope that it will be useful, 70N/Abut WITHOUT ANY WARRANTY; without even the implied warranty of 70N/AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 70N/ALesser General Public License for more details. 70N/AYou should have received a copy of the GNU Lesser General Public 70N/ALicense along with this library; if not, write to the Free Software 70N/AFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 70N/A<!
DOCTYPE refentry PUBLIC @
docdtd@ [
70N/A<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
70N/A<!
ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
70N/A <
docinfo><
date>@LXC_GENERATE_DATE@</
date></
docinfo>
359N/A <
refentrytitle>lxc-create</
refentrytitle>
98N/A <
manvolnum>1</
manvolnum>
213N/A <
refname>lxc-create</
refname>
320N/A <
command>lxc-create</
command>
332N/A <
arg choice="req">-n <
replaceable>name</
replaceable></
arg>
501N/A <
arg choice="opt">-f <
replaceable>config_file</
replaceable></
arg>
231N/A <
arg choice="opt">-t <
replaceable>template</
replaceable></
arg>
523N/A <
arg choice="opt">-B <
replaceable>backingstore</
replaceable></
arg>
98N/A <
arg choice="opt">-- <
replaceable>template-options</
replaceable></
arg>
493N/A <
title>Description</
title>
472N/A <
command>lxc-create</
command> creates a system object where is
324N/A stored the configuration information and where can be stored
347N/A user information. The identifier <
replaceable>name</
replaceable>
310N/A is used to specify the container to be used with the different
332N/A The object is a directory created in <
filename>@LXCPATH@</
filename>
464N/A and identified by its name.
210N/A The object is the definition of the different resources an
493N/A application can use or can see. The more the configuration file
128N/A contains information, the more the container is isolated and
414N/A the more the application is jailed.
335N/A If the configuration file <
replaceable>config_file</
replaceable>
493N/A is not specified, the container will be created with the default
493N/A isolation: processes, sysv ipc and mount points.
277N/A <
option>-f <
replaceable>config_file</
replaceable></
option>
326N/A Specify the configuration file to configure the virtualization
439N/A and isolation functionalities for the container.
90N/A <
option>-t <
replaceable>template</
replaceable></
option>
295N/A 'template' is the short name of an existing 'lxc-template'
70N/A script that is called by lxc-create,
299N/A eg. busybox, debian, fedora, ubuntu or sshd.
262N/A Refer to the examples in <
filename>@LXCTEMPLATEDIR@</
filename>
455N/A for details of the expected script structure.
539N/A Alternatively, the full path to an executable template script
277N/A can also be passed as a parameter.
280N/A <
option>-B <
replaceable>backingstore</
replaceable></
option>
70N/A 'backingstore' is one of 'none', 'dir', 'lvm', 'loop', or 'btrfs'. The
98N/A default is 'none', meaning that the container root filesystem
414N/A 'dir' has the same meaning as 'none', but also allows the optional
98N/A <
replaceable>--dir ROOTFS</
replaceable> to be specified, meaning
493N/A that the container rootfs should be placed under the specified path,
493N/A rather than the default. If 'btrfs' is specified, then the
70N/A target filesystem must be btrfs, and the container rootfs will be
493N/A created as a new subvolume. This allows snapshotted clones to be
493N/A created, but also causes rsync --one-filesystem to treat it as a
If backingstore is 'lvm', then an lvm block device will be
used and the following further options are available:
<
replaceable>--lvname lvname1</
replaceable> will create an LV
named <
filename>lvname1</
filename> rather than the default, which
is the container name. <
replaceable>--vgname vgname1</
replaceable>
will create the LV in volume group <
filename>vgname1</
filename>
rather than the default, <
filename>lxc</
filename>.
<
replaceable>--thinpool thinpool1</
replaceable> will create the
LV as a thin-provisioned volume in the pool named
<
filename>thinpool1</
filename> rather than the
default, <
filename>lxc</
filename>.
<
replaceable>--fstype FSTYPE</
replaceable> will create an FSTYPE
filesystem on the LV, rather than the default, which is ext4.
<
replaceable>--fssize SIZE</
replaceable> will create a LV (and
filesystem) of size SIZE rather than the default, which is 1G.
<
option>-- <
replaceable>template-options</
replaceable></
option>
This will pass <
replaceable>template-options</
replaceable> to the
template as arguments. To see the list of options supported by
the template, you can run
<
command>lxc-create -t TEMPLATE -h</
command>.
<
title>Diagnostic</
title>
<
term>The container already exists</
term>
As the message mention it, you try to create a container
but there is a container with the same name. You can use
the <
command>lxc-ls</
command> command to list the
available containers on the system.
<
para>Daniel Lezcano <
email>daniel.lezcano@free.fr</
email></
para>
<!-- Keep this comment at the end of the file sgml-minimize-attributes:nil sgml-always-quote-attributes:t sgml-default-dtd-file:nil sgml-local-ecat-files:nil