Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
de232a51
Commit
de232a51
authored
Mar 02, 2016
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #864 from brauner/bugfix_branch
Add features/small improvements to man pages (lxc-attach, lxc-copy)
parents
0f4d7aff
a372480c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
4 deletions
+30
-4
lxc-attach.sgml.in
doc/lxc-attach.sgml.in
+6
-2
lxc-copy.sgml.in
doc/lxc-copy.sgml.in
+21
-0
lxc_copy.c
src/lxc/lxc_copy.c
+3
-2
No files found.
doc/lxc-attach.sgml.in
View file @
de232a51
...
@@ -140,7 +140,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -140,7 +140,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<replaceable>CGROUP|LSM</replaceable>. Allowed values are
<replaceable>CGROUP|LSM</replaceable>. Allowed values are
<replaceable>CGROUP</replaceable>, <replaceable>CAP</replaceable> and
<replaceable>CGROUP</replaceable>, <replaceable>CAP</replaceable> and
<replaceable>LSM</replaceable> representing cgroup, capabilities and
<replaceable>LSM</replaceable> representing cgroup, capabilities and
restriction privileges respectively.
restriction privileges respectively. (The pipe symbol needs to be escaped,
e.g. <replaceable>CGROUP\|LSM</replaceable> or quoted, e.g.
<replaceable>"CGROUP|LSM"</replaceable>.)
</para>
</para>
<para>
<para>
<emphasis>Warning:</emphasis> This may leak privileges into the
<emphasis>Warning:</emphasis> This may leak privileges into the
...
@@ -168,7 +170,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -168,7 +170,9 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<replaceable>NETWORK</replaceable>. This allows one to change
<replaceable>NETWORK</replaceable>. This allows one to change
the context of the process to e.g. the network namespace of the
the context of the process to e.g. the network namespace of the
container while retaining the other namespaces as those of the
container while retaining the other namespaces as those of the
host.
host. (The pipe symbol needs to be escaped, e.g.
<replaceable>MOUNT\|PID</replaceable> or quoted, e.g.
<replaceable>"MOUNT|PID"</replaceable>.)
</para>
</para>
<para>
<para>
<emphasis>Important:</emphasis> This option implies
<emphasis>Important:</emphasis> This option implies
...
...
doc/lxc-copy.sgml.in
View file @
de232a51
...
@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -58,6 +58,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<arg choice="opt">-K, --keepdata</arg>
<arg choice="opt">-K, --keepdata</arg>
<arg choice="opt">-M, --keepmac</arg>
<arg choice="opt">-M, --keepmac</arg>
<arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
<arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
<arg choice="opt">-- hook arguments</arg>
</cmdsynopsis>
</cmdsynopsis>
<cmdsynopsis>
<cmdsynopsis>
<command>lxc-copy</command>
<command>lxc-copy</command>
...
@@ -71,6 +72,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -71,6 +72,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
<arg choice="opt">-K, --keepdata</arg>
<arg choice="opt">-K, --keepdata</arg>
<arg choice="opt">-M, --keepmac</arg>
<arg choice="opt">-M, --keepmac</arg>
<arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
<arg choice="opt">-L, --fssize <replaceable>size [unit]</replaceable></arg>
<arg choice="opt">-- hook arguments</arg>
</cmdsynopsis>
</cmdsynopsis>
<cmdsynopsis>
<cmdsynopsis>
<command>lxc-copy</command>
<command>lxc-copy</command>
...
@@ -262,6 +264,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
...
@@ -262,6 +264,25 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
</refsect1>
</refsect1>
<refsect1>
<title>Copy hook</title>
<para>
If the container being copied has one or more
<filename>lxc.hook.clone</filename> specified, then the specified hooks
will be called for the new container. The first 3 arguments passed to the
clone hook will be the container name, a section ('lxc'), and the hook
type ('clone'). Extra arguments passed to <command>lxc-copy</command> will
be passed to the hook program starting at argument 4. The
<filename>LXC_ROOTFS_MOUNT</filename> environment variable gives
the path under which the container's root filesystem is mounted. The
configuration file pathname is stored in
<filename>LXC_CONFIG_FILE</filename>, the new container name in
<filename>LXC_NAME</filename>, the old container name in
<filename>LXC_SRC_NAME</filename>, and the path or device on which the
rootfs is located is in <filename>LXC_ROOTFS_PATH</filename>.
</para>
</refsect1>
&commonoptions;
&commonoptions;
&seealso;
&seealso;
...
...
src/lxc/lxc_copy.c
View file @
de232a51
...
@@ -101,8 +101,8 @@ static char *const keys[] = {
...
@@ -101,8 +101,8 @@ static char *const keys[] = {
static
struct
lxc_arguments
my_args
=
{
static
struct
lxc_arguments
my_args
=
{
.
progname
=
"lxc-copy"
,
.
progname
=
"lxc-copy"
,
.
help
=
"
\n
\
.
help
=
"
\n
\
--name=NAME [-P lxcpath] -N newname [-p newpath] [-B backingstorage] [-s] [-K] [-M] [-L size [unit]]
\n
\
--name=NAME [-P lxcpath] -N newname [-p newpath] [-B backingstorage] [-s] [-K] [-M] [-L size [unit]]
-- hook options
\n
\
--name=NAME [-P lxcpath] [-N newname] [-p newpath] [-B backingstorage] -e [-d] [-D] [-K] [-M] [-m {bind,aufs,overlay}=/src:/dest]
\n
\
--name=NAME [-P lxcpath] [-N newname] [-p newpath] [-B backingstorage] -e [-d] [-D] [-K] [-M] [-m {bind,aufs,overlay}=/src:/dest]
-- hook options
\n
\
--name=NAME [-P lxcpath] -N newname -R
\n
\
--name=NAME [-P lxcpath] -N newname -R
\n
\
\n
\
\n
\
lxc-copy clone a container
\n
\
lxc-copy clone a container
\n
\
...
@@ -122,6 +122,7 @@ Options :\n\
...
@@ -122,6 +122,7 @@ Options :\n\
-L, --fssize size of the new block device for block device containers
\n
\
-L, --fssize size of the new block device for block device containers
\n
\
-D, --keedata pass together with -e start a persistent snapshot
\n
\
-D, --keedata pass together with -e start a persistent snapshot
\n
\
-K, --keepname keep the hostname of the original container
\n
\
-K, --keepname keep the hostname of the original container
\n
\
-- hook options arguments passed to the hook program
\n
\
-M, --keepmac keep the MAC address of the original container
\n
"
,
-M, --keepmac keep the MAC address of the original container
\n
"
,
.
options
=
my_longopts
,
.
options
=
my_longopts
,
.
parser
=
my_parser
,
.
parser
=
my_parser
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment