lxc-create.sgml.in revision eb7829c1c6ae93e695e55a43eedf655750ba7b60
70N/A<!--
70N/A
286N/Alxc: linux Container library
70N/A
70N/A(C) Copyright IBM Corp. 2007, 2008
70N/A
70N/AAuthors:
70N/ADaniel Lezcano <daniel.lezcano at free.fr>
70N/A
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/A
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/A
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
70N/A-->
70N/A
70N/A<!DOCTYPE refentry PUBLIC @docdtd@ [
70N/A
70N/A<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
70N/A<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
70N/A]>
542N/A
70N/A<refentry>
70N/A
70N/A <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
359N/A
359N/A <refmeta>
359N/A <refentrytitle>lxc-create</refentrytitle>
98N/A <manvolnum>1</manvolnum>
321N/A </refmeta>
493N/A
321N/A <refnamediv>
213N/A <refname>lxc-create</refname>
304N/A
530N/A <refpurpose>
425N/A creates a container
425N/A </refpurpose>
325N/A </refnamediv>
493N/A
536N/A <refsynopsisdiv>
456N/A <cmdsynopsis>
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>
347N/A </cmdsynopsis>
532N/A </refsynopsisdiv>
525N/A
463N/A <refsect1>
493N/A <title>Description</title>
425N/A
493N/A <para>
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
316N/A lxc commands.
474N/A </para>
290N/A <para>
332N/A The object is a directory created in <filename>@LXCPATH@</filename>
464N/A and identified by its name.
332N/A </para>
509N/A
332N/A <para>
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.
484N/A </para>
326N/A
493N/A <para>
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.
425N/A </para>
370N/A </refsect1>
70N/A
400N/A <refsect1>
294N/A <title>Options</title>
435N/A <variablelist>
98N/A
434N/A <varlistentry>
505N/A <term>
277N/A <option>-f <replaceable>config_file</replaceable></option>
433N/A </term>
356N/A <listitem>
289N/A <para>
326N/A Specify the configuration file to configure the virtualization
439N/A and isolation functionalities for the container.
501N/A </para>
469N/A </listitem>
290N/A </varlistentry>
542N/A
424N/A <varlistentry>
286N/A <term>
90N/A <option>-t <replaceable>template</replaceable></option>
475N/A </term>
535N/A <listitem>
535N/A <para>
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.
332N/A </para>
332N/A </listitem>
493N/A </varlistentry>
70N/A
70N/A <varlistentry>
319N/A <term>
280N/A <option>-B <replaceable>backingstore</replaceable></option>
319N/A </term>
359N/A <listitem>
493N/A <para>
70N/A 'backingstore' is one of 'none', 'dir', 'lvm', 'loop', or 'btrfs'. The
98N/A default is 'none', meaning that the container root filesystem
98N/A will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
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
493N/A separate filesystem.
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.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term>
<option>-- <replaceable>template-options</replaceable></option>
</term>
<listitem>
<para>
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>.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
&commonoptions;
<refsect1>
<title>Diagnostic</title>
<variablelist>
<varlistentry>
<term>The container already exists</term>
<listitem>
<para>
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>
</listitem>
</varlistentry>
</variablelist>
</refsect1>
&seealso;
<refsect1>
<title>Author</title>
<para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:2
sgml-indent-data:t
sgml-parent-document:nil
sgml-default-dtd-file:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->