-
lxc-clone: support 'permanent ephemeral' containers · 48853811Serge Hallyn authored
All of this needs a rewrite/redesign, and that will be coming (details below), but for now You can start 'non-ephemeral ephemeral' containers using lxc-start-ephemeral -o oldname -n newname --keep-data When you shut that down, the container stick around and can be restarted. Now lxc-clone will recognize such a container by the presence of the delta0/ which contains the read-write overlayfs layer. This means you can do incremental development of containers, i.e. lxc-create -t ubuntu -n r1 lxc-start-ephemeral --keep-data -o r1 -n r1-2 # make some changes, poweroff lxc-clone -o r1-2 -n r1-3 # make some changes... lxc-clone -o r1-3 -n r1-4 # etc... Now, as for design changes... from a higher level 1. lxc-clone should be re-written in c and exported through the api. 2. lxc-clone should support overlayfs and aufs 3. lxc-start-ephemeral should become a thin layer which clones a container, starts and stops and destroys it. at a lower level, 1. the api should support container->setup_mounts 2. lxc-clone should be written as a set of backend classes which can copy mounts to each other. So when you load a container which is lvm-backed, it creates a lvm backend class. That class instance can be converted into a loopback or qemu-nbd or directory backed class. A directory-backed class can be converted into a overlayfs or aufs backed class, which (a) uses the dirctory-backed class as the read-only base, and (b) pins the base container (so it can't be deleted until all snapshots are deleted). Signed-off-by:
Serge Hallyn <serge.hallyn@ubuntu.com> Acked-by:
Stéphane Graber <stgraber@ubuntu.com>
48853811
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| include | Loading commit data... | |
| lua-lxc | Loading commit data... | |
| lxc | Loading commit data... | |
| python-lxc | Loading commit data... | |
| tests | Loading commit data... | |
| Makefile.am | Loading commit data... |