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
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:
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:
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