]> git.proxmox.com Git - mirror_lxc.git/blobdiff - doc/lxc-create.sgml.in
af_unix: add lxc_abstract_unix_send_fds_iov
[mirror_lxc.git] / doc / lxc-create.sgml.in
index 99bdb7199bb7aec32b01baeed3abe8e605f258f8..1e97c40b15dcde396b793aff0d2c51bf37483c67 100644 (file)
@@ -5,7 +5,7 @@ lxc: linux Container library
 (C) Copyright IBM Corp. 2007, 2008
 
 Authors:
-Daniel Lezcano <dlezcano at fr.ibm.com>
+Daniel Lezcano <daniel.lezcano at free.fr>
 
 This library is free software; you can redistribute it and/or
 modify it under the terms of the GNU Lesser General Public
@@ -19,11 +19,11 @@ Lesser General Public License for more details.
 
 You should have received a copy of the GNU Lesser General Public
 License along with this library; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
 -->
 
-<!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN" "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
+<!DOCTYPE refentry PUBLIC @docdtd@ [
 
 <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
 <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
@@ -51,7 +51,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
       <command>lxc-create</command>
       <arg choice="req">-n <replaceable>name</replaceable></arg>
       <arg choice="opt">-f <replaceable>config_file</replaceable></arg>
-      <arg choice="opt">-t <replaceable>template</replaceable></arg>
+      <arg choice="req">-t <replaceable>template</replaceable></arg>
       <arg choice="opt">-B <replaceable>backingstore</replaceable></arg>
       <arg choice="opt">-- <replaceable>template-options</replaceable></arg>
     </cmdsynopsis>
@@ -62,7 +62,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
     <para>
       <command>lxc-create</command> creates a system object where is
-      stored the configuration informations and where can be stored
+      stored the configuration information and where can be stored
       user information. The identifier <replaceable>name</replaceable>
       is used to specify the container to be used with the different
       lxc commands.
@@ -75,7 +75,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
     <para>
       The object is the definition of the different resources an
       application can use or can see. The more the configuration file
-      contains informations, the more the container is isolated and
+      contains information, the more the container is isolated and
       the more the application is jailed.
     </para>
 
@@ -92,7 +92,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
       <varlistentry>
        <term>
-         <option>-f <replaceable>config_file</replaceable></option>
+         <option>-f, --config <replaceable>config_file</replaceable></option>
        </term>
        <listitem>
          <para>
@@ -104,7 +104,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
       <varlistentry>
        <term>
-         <option>-t <replaceable>template</replaceable></option>
+         <option>-t, --template <replaceable>template</replaceable></option>
        </term>
        <listitem>
          <para>
@@ -113,37 +113,60 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
            eg. busybox, debian, fedora, ubuntu or sshd.
            Refer to the examples in <filename>@LXCTEMPLATEDIR@</filename>
            for details of the expected script structure.
+           Alternatively, the full path to an executable template script
+           can also be passed as a parameter.
+           "none" can be used to force lxc-create to skip rootfs creation.
          </para>
        </listitem>
       </varlistentry>
 
       <varlistentry>
        <term>
-         <option>-B <replaceable>backingstore</replaceable></option>
+         <option>-B, --bdev <replaceable>backingstore</replaceable></option>
        </term>
        <listitem>
          <para>
-           'backingstore' is one of 'none', 'dir', 'lvm', or 'btrfs'.  The
-           default is 'none', meaning that the container root filesystem
+           'backingstore' is one of 'dir', 'lvm', 'loop', 'btrfs', 'zfs', 'rbd', or 'best'.  The
+           default is 'dir', meaning that the container root filesystem
            will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
-           'dir' has the same meaning as 'none', but also allows the optional
+           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 option 'btrfs' need not be specified as it will be used
-           automatically if the <filename>@LXCPATH@</filename> filesystem is found to
-           be btrfs.  If backingstore is 'lvm', then an lvm block device will be
+           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
+           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>
+         <para>
+           If backingstore is 'loop', you can use <replaceable>--fstype FSTYPE</replaceable> and <replaceable>--fssize SIZE</replaceable> as 'lvm'. The default values for these options are the same as 'lvm'.
+         </para>
+         <para>
+           If backingstore is 'rbd', then you will need to have a valid configuration in <filename>ceph.conf</filename> and a <filename>ceph.client.admin.keyring</filename> defined.
+           You can specify the following options :
+           <replaceable>--rbdname RBDNAME</replaceable> will create a blockdevice named RBDNAME rather than the default, which is the container name.
+           <replaceable>--rbdpool POOL</replaceable> will create the blockdevice in the pool named POOL, rather than the default, which is 'lxc'.
+         </para>
+         <para>
+           If backingstore is 'best', then lxc will try, in order, btrfs,
+           zfs, lvm, and finally a directory backing store.
+         </para>
        </listitem>
       </varlistentry>
 
@@ -165,6 +188,8 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
 
   </refsect1>
 
+  &commonoptions;
+
   <refsect1>
     <title>Diagnostic</title>
 
@@ -176,7 +201,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
           <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 -l</command> command to list the
+           the <command>lxc-ls</command> command to list the
            available containers on the system.
           </para>
         </listitem>