]>
Commit | Line | Data |
---|---|---|
396639d4 DL |
1 | <!-- |
2 | ||
3 | lxc: linux Container library | |
4 | ||
5 | (C) Copyright IBM Corp. 2007, 2008 | |
6 | ||
7 | Authors: | |
9afe19d6 | 8 | Daniel Lezcano <daniel.lezcano at free.fr> |
396639d4 DL |
9 | |
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. | |
14 | ||
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. | |
19 | ||
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 | |
250b1eec | 22 | Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
396639d4 DL |
23 | |
24 | --> | |
25 | ||
7f951458 | 26 | <!DOCTYPE refentry PUBLIC @docdtd@ [ |
396639d4 DL |
27 | |
28 | <!ENTITY commonoptions SYSTEM "@builddir@/common_options.sgml"> | |
29 | <!ENTITY seealso SYSTEM "@builddir@/see_also.sgml"> | |
30 | ]> | |
31 | ||
32 | <refentry> | |
33 | ||
34 | <docinfo><date>@LXC_GENERATE_DATE@</date></docinfo> | |
35 | ||
36 | <refmeta> | |
37 | <refentrytitle>lxc-restart</refentrytitle> | |
38 | <manvolnum>1</manvolnum> | |
39 | <refmiscinfo>IBM</refmiscinfo> | |
40 | </refmeta> | |
41 | ||
42 | <refnamediv> | |
43 | <refname>lxc-restart</refname> | |
44 | ||
45 | <refpurpose> | |
9887d6c6 | 46 | restart a container from a file (not implemented yet) |
396639d4 DL |
47 | </refpurpose> |
48 | </refnamediv> | |
49 | ||
50 | <refsynopsisdiv> | |
51 | <cmdsynopsis> | |
b4578c5b DE |
52 | <command>lxc-restart</command> |
53 | <arg choice="opt">-f <replaceable>config_file</replaceable></arg> | |
54 | <arg choice="opt">-s KEY=VAL</arg> | |
55 | <arg choice="req">--statefile=<replaceable>FILE</replaceable></arg> | |
56 | <arg choice="req">--statefd=<replaceable>FD</replaceable></arg> | |
57 | <arg choice="req">--name=<replaceable>NAME</replaceable></arg> | |
396639d4 DL |
58 | </cmdsynopsis> |
59 | </refsynopsisdiv> | |
60 | ||
61 | <refsect1> | |
62 | <title>Description</title> | |
63 | ||
64 | <para> | |
65 | <command>lxc-restart</command> is a command | |
66 | to restart an application from the state read in the specified | |
67 | <replaceable>FILE</replaceable>, in a container with the | |
68 | identifier <replaceable>NAME</replaceable>. | |
69 | If the option <option>--pause</option> | |
70 | is specified, the application will be stopped after the | |
71 | restart just before resuming execution. The command | |
72 | <command>lxc-unfreeze</command> will be needed to resume its | |
73 | execution. | |
74 | </para> | |
75 | </refsect1> | |
76 | ||
77 | <refsect1> | |
78 | <title>Restart Options</title> | |
79 | ||
80 | <variablelist> | |
81 | <varlistentry> | |
82 | <term><option>-S, --statefile=<replaceable>FILE</replaceable></option></term> | |
83 | <listitem> | |
84 | <para> | |
85 | read the state of the container in this | |
86 | <replaceable>FILE</replaceable>. | |
87 | This option is exclusive with <option>--statefd</option> below. | |
88 | </para> | |
89 | </listitem> | |
90 | </varlistentry> | |
91 | ||
92 | <varlistentry> | |
93 | <term><option>-d, --statefd=<replaceable>FD</replaceable></option></term> | |
94 | <listitem> | |
95 | <para> | |
96 | read the state of the container in this | |
97 | <replaceable>FD</replaceable> file descriptor. | |
98 | This option is exclusive with above <option>--statefile</option>. | |
99 | </para> | |
100 | </listitem> | |
101 | </varlistentry> | |
102 | ||
103 | <varlistentry> | |
104 | <term><option>-p</option></term> | |
105 | <listitem> | |
106 | <para> | |
107 | Pause container processes after restart. The container will be | |
108 | stopped until you resume it with the lxc-unfreeze command. | |
109 | </para> | |
110 | </listitem> | |
111 | </varlistentry> | |
112 | ||
113 | <varlistentry> | |
114 | <term><option>-f, --rcfile=<replaceable>config_file</replaceable></option></term> | |
115 | <listitem> | |
116 | <para> | |
117 | Specify the configuration file to configure the | |
118 | virtualization and isolation functionalities for the | |
119 | container. This parameter should be specified if it was | |
120 | specified for the <command>lxc-execute</command> | |
121 | or <command>lxc-start</command> commands or if the | |
122 | container configuration has to be changed at restart. The | |
123 | latter may fail if the needed resources are not available | |
124 | for the restart. If the container was created and | |
125 | configured with <command>lxc-create</command>, this option | |
126 | is not needed, the configuration will be automatically | |
127 | found. | |
128 | </para> | |
129 | </listitem> | |
130 | </varlistentry> | |
131 | ||
132 | <varlistentry> | |
133 | <term> | |
134 | <option>-s <replaceable>KEY=VAL</replaceable></option> | |
135 | </term> | |
136 | <listitem> | |
137 | <para> | |
138 | Assign value <replaceable>VAL</replaceable> to configuration | |
139 | variable <replaceable>KEY</replaceable>. This overrides any | |
140 | assignment done in <replaceable>config_file</replaceable>. | |
141 | </para> | |
142 | </listitem> | |
143 | </varlistentry> | |
144 | ||
145 | </variablelist> | |
146 | ||
147 | </refsect1> | |
148 | ||
149 | &commonoptions; | |
150 | ||
151 | <refsect1> | |
152 | <title>Examples</title> | |
153 | <para> | |
154 | To start a new container <literal>123</literal> computing decimals of pi | |
155 | </para> | |
156 | <programlisting> | |
157 | lxc-execute -n 123 -- pi1 -d 500000 | |
158 | lxc-execute --name=123 -- pi1 -d 500000 | |
159 | </programlisting> | |
160 | ||
161 | <para> | |
162 | to checkpoint the same container in <emphasis>dump-death</emphasis> | |
163 | mode | |
164 | </para> | |
165 | <programlisting> | |
166 | lxc-checkpoint -n 123 -S /share/123/chkpt1 -k | |
167 | lxc-checkpoint --name=123 --statefile=/share/123/chkpt1 -k | |
168 | </programlisting> | |
169 | ||
170 | <para> | |
171 | and to restart the same container with a different id | |
172 | </para> | |
173 | <programlisting> | |
174 | lxc-restart -n 200 -S /share/123/chkpt1 | |
175 | lxc-restart --name=200 --statefile=/share/123/chkpt1 | |
176 | </programlisting> | |
177 | ||
178 | </refsect1> | |
179 | ||
9887d6c6 | 180 | <refsect1> |
a3e80ccc | 181 | <title>Notes</title> |
9887d6c6 DL |
182 | <para>Actually, this command does not operate. Its description |
183 | helps to define a CLI api for future Checkpoint / Restart | |
184 | solution</para> | |
185 | </refsect1> | |
186 | ||
396639d4 DL |
187 | &seealso; |
188 | ||
189 | <refsect1> | |
190 | <title>Author</title> | |
191 | <para>Daniel Lezcano <email>daniel.lezcano@free.fr</email></para> | |
192 | </refsect1> | |
193 | ||
194 | </refentry> | |
195 | ||
196 | <!-- Keep this comment at the end of the file | |
197 | Local variables: | |
198 | mode: sgml | |
199 | sgml-omittag:t | |
200 | sgml-shorttag:t | |
201 | sgml-minimize-attributes:nil | |
202 | sgml-always-quote-attributes:t | |
203 | sgml-indent-step:2 | |
204 | sgml-indent-data:t | |
205 | sgml-parent-document:nil | |
206 | sgml-default-dtd-file:nil | |
207 | sgml-exposed-tags:nil | |
208 | sgml-local-catalogs:nil | |
209 | sgml-local-ecat-files:nil | |
210 | End: | |
211 | --> |