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