[lxc-devel] [PATCH v2] Add lxc-copy executable

2015-11-04 Thread Christian Brauner
Changes v2: (1) The mkdtemp() call accidently created a directory in the current working directory of the shell it was called in. This is now fixed by correctly creating the full path first and then using the offset strlen(my_args->newpath) + 1 to point my_args->newname to the name of

[lxc-devel] [PATCH v2] Add lxc-copy executable

2015-11-04 Thread Christian Brauner
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-devel] [PATCH v1] Add lxc-copy executable

2015-11-04 Thread Christian Brauner
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-devel] [PATCH v1] Add lxc-copy executable

2015-11-04 Thread Christian Brauner
Changes in comparison to first implementation: (1) Instead of using a custom function to generate random names for ephemeral container we use mkdtemp(). This will be safer and the code considerably easier. (2) Make the whole code easily extendable by using a design centered around a