lxc-create.sgml.in revision 1881820ae4ff9004beef1bf7f04553580840441d
52N/A<!--
52N/A
292N/Alxc: linux Container library
52N/A
52N/A(C) Copyright IBM Corp. 2007, 2008
416N/A
52N/AAuthors:
52N/ADaniel Lezcano <dlezcano at fr.ibm.com>
52N/A
52N/AThis library is free software; you can redistribute it and/or
292N/Amodify it under the terms of the GNU Lesser General Public
292N/ALicense as published by the Free Software Foundation; either
292N/Aversion 2.1 of the License, or (at your option) any later version.
292N/A
52N/AThis library is distributed in the hope that it will be useful,
52N/Abut WITHOUT ANY WARRANTY; without even the implied warranty of
52N/AMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
292N/ALesser General Public License for more details.
292N/A
292N/AYou should have received a copy of the GNU Lesser General Public
292N/ALicense along with this library; if not, write to the Free Software
292N/AFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
292N/A
292N/A-->
292N/A
292N/A<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
292N/A
292N/A<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
52N/A<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
52N/A]>
52N/A
52N/A<refentry>
52N/A
52N/A <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
52N/A
52N/A <refmeta>
52N/A <refentrytitle>lxc-create</refentrytitle>
52N/A <manvolnum>1</manvolnum>
52N/A </refmeta>
52N/A
292N/A <refnamediv>
52N/A <refname>lxc-create</refname>
52N/A
6N/A <refpurpose>
6N/A creates a container
6N/A </refpurpose>
6N/A </refnamediv>
377N/A
377N/A <refsynopsisdiv>
377N/A <cmdsynopsis>
377N/A <command>lxc-create</command>
377N/A <arg choice="req">-n <replaceable>name</replaceable></arg>
6N/A <arg choice="opt">-f <replaceable>config_file</replaceable></arg>
15N/A <arg choice="opt">-t <replaceable>template</replaceable></arg>
6N/A <arg choice="opt">-B <replaceable>backingstore</replaceable></arg>
6N/A <arg choice="opt">-- <replaceable>template-options</replaceable></arg>
487N/A </cmdsynopsis>
6N/A </refsynopsisdiv>
15N/A
302N/A <refsect1>
6N/A <title>Description</title>
377N/A
377N/A <para>
377N/A <command>lxc-create</command> creates a system object where is
377N/A stored the configuration informations and where can be stored
377N/A user information. The identifier <replaceable>name</replaceable>
377N/A is used to specify the container to be used with the different
377N/A lxc commands.
377N/A </para>
377N/A <para>
377N/A The object is a directory created in <filename>@LXCPATH@</filename>
377N/A and identified by its name.
6N/A </para>
6N/A
467N/A <para>
467N/A The object is the definition of the different resources an
467N/A application can use or can see. The more the configuration file
467N/A contains informations, the more the container is isolated and
6N/A the more the application is jailed.
6N/A </para>
467N/A
467N/A <para>
467N/A If the configuration file <replaceable>config_file</replaceable>
467N/A is not specified, the container will be created with the default
6N/A isolation: processes, sysv ipc and mount points.
6N/A </para>
6N/A </refsect1>
6N/A
302N/A <refsect1>
302N/A <title>Options</title>
6N/A <variablelist>
6N/A
6N/A <varlistentry>
487N/A <term>
121N/A <option>-f <replaceable>config_file</replaceable></option>
487N/A </term>
6N/A <listitem>
6N/A <para>
15N/A Specify the configuration file to configure the virtualization
15N/A and isolation functionalities for the container.
15N/A </para>
15N/A </listitem>
15N/A </varlistentry>
15N/A
15N/A <varlistentry>
15N/A <term>
15N/A <option>-t <replaceable>template</replaceable></option>
15N/A </term>
302N/A <listitem>
302N/A <para>
302N/A 'template' is the short name of an existing 'lxc-template'
44N/A script that is called by lxc-create,
44N/A eg. busybox, debian, fedora, ubuntu or sshd.
44N/A Refer to the examples in <filename>@LXCTEMPLATEDIR@</filename>
191N/A for details of the expected script structure.
191N/A </para>
191N/A </listitem>
191N/A </varlistentry>
191N/A
44N/A <varlistentry>
44N/A <term>
44N/A <option>-B <replaceable>backingstore</replaceable></option>
190N/A </term>
194N/A <listitem>
439N/A <para>
220N/A 'backingstore' is one of 'none', 'dir', 'lvm', or 'btrfs'. The
221N/A default is 'none', meaning that the container root filesystem
349N/A will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
349N/A 'dir' has the same meaning as 'none', but also allows the optional
349N/A <replaceable>--dir ROOTFS</replaceable> to be specified, meaning
367N/A that the container rootfs should be placed under the specified path,
441N/A rather than the default.
367N/A The option 'btrfs' need not be specified as it will be used
367N/A automatically if the <filename>@LXCPATH@</filename> filesystem is found to
367N/A be btrfs. If backingstore is 'lvm', then an lvm block device will be
367N/A used and the following further options are available:
367N/A <replaceable>--lvname lvname1</replaceable> will create an LV
6N/A named <filename>lvname1</filename> rather than the default, which
6N/A is the container name. <replaceable>--vgname vgname1</replaceable>
6N/A will create the LV in volume group <filename>vgname1</filename>
467N/A rather than the default, <filename>lxc</filename>.
467N/A <replaceable>--fstype FSTYPE</replaceable> will create an FSTYPE
467N/A filesystem on the LV, rather than the default, which is ext4.
451N/A <replaceable>--fssize SIZE</replaceable> will create a LV (and
467N/A filesystem) of size SIZE rather than the default, which is 1G.
467N/A </para>
467N/A </listitem>
467N/A
467N/A <varlistentry>
6N/A <term>
6N/A <option>-- <replaceable>template-options</replaceable></option>
6N/A </term>
6N/A <listitem>
6N/A <para>
302N/A This will pass <replaceable>template-options</replaceable> to the
6N/A template as arguments. To see the list of options supported by
6N/A the template, you can run
459N/A <command>lxc-create -t TEMPLATE -h</command>.
6N/A </para>
6N/A </listitem>
302N/A </varlistentry>
6N/A
6N/A </variablelist>
63N/A
63N/A </refsect1>
63N/A
63N/A <refsect1>
63N/A <title>Diagnostic</title>
63N/A
63N/A <variablelist>
63N/A
63N/A <varlistentry>
63N/A <term>The container already exists</term>
63N/A <listitem>
63N/A <para>
63N/A As the message mention it, you try to create a container
63N/A but there is a container with the same name. You can use
168N/A the <command>lxc-ls -l</command> command to list the
275N/A available containers on the system.
63N/A </para>
63N/A </listitem>
63N/A </varlistentry>
63N/A
63N/A </variablelist>
63N/A
63N/A </refsect1>
63N/A
377N/A &seealso;
377N/A
63N/A <refsect1>
63N/A <title>Author</title>
63N/A <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
63N/A </refsect1>
63N/A
63N/A</refentry>
63N/A
377N/A<!-- Keep this comment at the end of the file
288N/ALocal variables:
288N/Amode: sgml
288N/Asgml-omittag:t
327N/Asgml-shorttag:t
327N/Asgml-minimize-attributes:nil
327N/Asgml-always-quote-attributes:t
327N/Asgml-indent-step:2
327N/Asgml-indent-data:t
327N/Asgml-parent-document:nil
327N/Asgml-default-dtd-file:nil
327N/Asgml-exposed-tags:nil
327N/Asgml-local-catalogs:nil
377N/Asgml-local-ecat-files:nil
377N/AEnd:
377N/A-->
377N/A