[lxc-devel] [PATCH v2] Add lxc-copy executable
Serge Hallyn
serge.hallyn at ubuntu.com
Thu Nov 5 23:15:08 UTC 2015
Quoting Christian Brauner (christianvanbrauner at gmail.com):
> This is a complete reimplementation of lxc-clone and lxc-start-ephemeral.
> lxc-copy merges the functionalities of lxc-clone + lxc-start-ephemeral into one
> executable.
>
> (1) Cloning containers:
>
> (a) as copy:
>
> lxc-copy -n aa -N bb
>
> (b) as snapshot:
>
> lxc-copy -n aa -N bb -s
>
> (2) Renaming containers:
>
> lxc-copy -n aa -N bb -R
>
> (3) Starting ephemeral containers:
>
> (a) start ephemeral container as daemon with random name:
>
> lxc-copy -n aa -e
>
> (b) start ephemeral container in foreground mode with random name:
>
> lxc-copy -n aa -e -F
>
> (c) start ephemeral container with specified name as daemon:
>
> lxc-copy -n aa -N bb
^ you didn't add '-e' here. Is that a typo in this example?
by "as daemon" you mean daemonized (-d) mode right?
> (d) start non-ephemeral container as daemon:
>
> lxc-copy -n aa -K
> (e) start ephemeral container with custom mounts (additional mounts can
> be of type {bind,aufs,overlay}) as daemon:
>
> lxc-copy -n aa -e -m bind=/src:/dest:ro,aufs=/src:/dest:rw,overlay=/src:/dest
I can't quite tell how to distinguish here between a command
which does or does not start the container.
How about adding an explicity [-S|--start] without which the
copy is created but not started?
Is there any meaningful difference between
lxc-copy -n aa -e -D -s
and
lxc-copy -n aa -s
?
Or should we just have '-e: ephemeral, deleted when done' versus
no -e: copy is persistent.
-serge
More information about the lxc-devel
mailing list