1356N/Alxc: linux Container library 1451N/A(C) Copyright IBM Corp. 2007, 2008 1075N/AThis library is free software; you can redistribute it and/or 1075N/Amodify it under the terms of the GNU Lesser General Public 1075N/ALicense as published by the Free Software Foundation; either 1075N/Aversion 2.1 of the License, or (at your option) any later version. 1075N/AThis library is distributed in the hope that it will be useful, 1075N/Abut WITHOUT ANY WARRANTY; without even the implied warranty of 1075N/AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 1075N/ALesser General Public License for more details. 1075N/AYou should have received a copy of the GNU Lesser General Public 1075N/ALicense along with this library; if not, write to the Free Software 1075N/AFoundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA 1029N/A<!
DOCTYPE refentry PUBLIC @
docdtd@ [
1029N/A<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
1029N/A<!
ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
1408N/A <
docinfo><
date>@LXC_GENERATE_DATE@</
date></
docinfo>
1029N/A <
refentrytitle>lxc-create</
refentrytitle>
1356N/A <
refname>lxc-create</
refname>
1132N/A <
command>lxc-create</
command>
1132N/A <
arg choice="req">-n <
replaceable>name</
replaceable></
arg>
1029N/A <
arg choice="opt">-f <
replaceable>config_file</
replaceable></
arg>
1029N/A <
arg choice="opt">-t <
replaceable>template</
replaceable></
arg>
1029N/A <
arg choice="opt">-B <
replaceable>backingstore</
replaceable></
arg>
1029N/A <
arg choice="opt">-- <
replaceable>template-options</
replaceable></
arg>
1029N/A <
command>lxc-create</
command> creates a system object where is
1029N/A stored the configuration information and where can be stored
1029N/A user information. The identifier <
replaceable>name</
replaceable>
1029N/A is used to specify the container to be used with the different
1029N/A The object is a directory created in <
filename>@LXCPATH@</
filename>
1029N/A and identified by its name.
1029N/A The object is the definition of the different resources an
1029N/A application can use or can see. The more the configuration file
1029N/A contains information, the more the container is isolated and
1029N/A the more the application is jailed.
1029N/A If the configuration file <
replaceable>config_file</
replaceable>
1029N/A is not specified, the container will be created with the default
1029N/A isolation: processes, sysv ipc and mount points.
1029N/A <
option>-f <
replaceable>config_file</
replaceable></
option>
1029N/A Specify the configuration file to configure the virtualization
1029N/A and isolation functionalities for the container.
1374N/A <
option>-t <
replaceable>template</
replaceable></
option>
1374N/A 'template' is the short name of an existing 'lxc-template'
1451N/A script that is called by lxc-create,
1466N/A eg. busybox, debian, fedora, ubuntu or sshd.
1374N/A Refer to the examples in <
filename>@LXCTEMPLATEDIR@</
filename>
1451N/A for details of the expected script structure.
1451N/A Alternatively, the full path to an executable template script
1451N/A can also be passed as a parameter.
<
option>-B <
replaceable>backingstore</
replaceable></
option>
'backingstore' is one of 'none', 'dir', 'lvm', 'loop', or 'btrfs'. The
default is 'none', meaning that the container root filesystem
'dir' has the same meaning as 'none', but also allows the optional
<
replaceable>--dir ROOTFS</
replaceable> to be specified, meaning
that the container rootfs should be placed under the specified path,
rather than the default. If 'btrfs' is specified, then the
target filesystem must be btrfs, and the container rootfs will be
created as a new subvolume. This allows snapshotted clones to be
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>.
<
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 -l</
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