3
lxc: linux Container library
5
(C) Copyright IBM Corp. 2007, 2008
8
Daniel Lezcano <dlezcano at fr.ibm.com>
10
This library is free software; you can redistribute it and/or
11
modify it under the terms of the GNU Lesser General Public
12
License as published by the Free Software Foundation; either
13
version 2.1 of the License, or (at your option) any later version.
15
This library is distributed in the hope that it will be useful,
16
but WITHOUT ANY WARRANTY; without even the implied warranty of
17
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18
Lesser General Public License for more details.
20
You should have received a copy of the GNU Lesser General Public
21
License along with this library; if not, write to the Free Software
22
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
26
<!DOCTYPE refentry PUBLIC "-//Davenport//DTD DocBook V3.0//EN" [
28
<!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml">
29
<!ENTITY seealso SYSTEM "@builddir@/see_also.sgml">
34
<docinfo><date>@LXC_GENERATE_DATE@</date></docinfo>
37
<refentrytitle>lxc-create</refentrytitle>
38
<manvolnum>1</manvolnum>
42
<refname>lxc-create</refname>
51
<command>lxc-create <replaceable>-n name</replaceable>
52
<optional>-f config_file</optional>
53
<optional>-t template</optional>
54
<optional>-B backingstore</optional>
55
<optional>-- template-options</optional>
61
<title>Description</title>
64
<command>lxc-create</command> creates a system object where is
65
stored the configuration informations and where can be stored
66
user information. The identifier <replaceable>name</replaceable>
67
is used to specify the container to be used with the different
71
The object is a directory created in <filename>@LXCPATH@</filename>
72
and identified by its name.
76
The object is the definition of the different resources an
77
application can use or can see. The more the configuration file
78
contains informations, the more the container is isolated and
79
the more the application is jailed.
83
If the configuration file <replaceable>config_file</replaceable>
84
is not specified, the container will be created with the default
85
isolation: processes, sysv ipc and mount points.
90
<title>Options</title>
95
<option>-f <replaceable>config_file</replaceable></option>
99
Specify the configuration file to configure the virtualization
100
and isolation functionalities for the container.
107
<option>-t <replaceable>template</replaceable></option>
111
'template' is the short name of an existing 'lxc-template'
112
script that is called by lxc-create,
113
eg. busybox, debian, fedora, ubuntu or sshd.
114
Refer to the examples in <filename>@LXCTEMPLATEDIR@</filename>
115
for details of the expected script structure.
122
<option>-B <replaceable>backingstore</replaceable></option>
126
'backingstore' is one of 'none', 'lvm', or 'btrfs'. The
127
default is 'none', meaning that the container root filesystem
128
will be a directory under <filename>@LXCPATH@/container/rootfs</filename>.
129
The option 'btrfs' need not be specified as it will be used
130
automatically if the <filename>@LXCPATH@</filename> filesystem is found to
131
be btrfs. If backingstore is 'lvm', then an lvm block device will be
132
used and the following further options are available:
133
<replaceable>--lvname lvname1</replaceable> will create an LV
134
named <filename>lvname1</filename> rather than the default, which
135
is the container name. <replaceable>--vgname vgname1</replaceable>
136
will create the LV in volume group <filename>vgname1</filename>
137
rather than the default, <filename>lxc</filename>.
138
<replaceable>--fstype FSTYPE</replaceable> will create an FSTYPE
139
filesystem on the LV, rather than the default, which is ext4.
140
<replaceable>--fssize SIZE</replaceable> will create a LV (and
141
filesystem) of size SIZE rather than the default, which is 1G.
147
<option>-- <replaceable>template-options</replaceable></option>
151
This will pass <replaceable>template-options</replaceable> to the
152
template as arguments. To see the list of options supported by
153
the template, you can run
154
<command>lxc-create -t TEMPLATE -h</command>.
165
<title>Diagnostic</title>
170
<term>The container already exists</term>
173
As the message mention it, you try to create a container
174
but there is a container with the same name. You can use
175
the <command>lxc-ls -l</command> command to list the
176
available containers on the system.
188
<title>Author</title>
189
<para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para>
194
<!-- Keep this comment at the end of the file
199
sgml-minimize-attributes:nil
200
sgml-always-quote-attributes:t
203
sgml-parent-document:nil
204
sgml-default-dtd-file:nil
205
sgml-exposed-tags:nil
206
sgml-local-catalogs:nil
207
sgml-local-ecat-files:nil