[lxc-users] [BUG] lxc-destroy destroying wrong containers

Tomasz Chmielewski mangoo at wpkg.org
Tue Nov 10 13:51:24 UTC 2015


On 2015-11-10 22:47, Christian Brauner wrote:

> Yes, it is lxc-destroy but lxc-destroy does it exactly what it is 
> expected to
> do. The cause is the incomplete clone: When you clone a container 
> config of the
> original container gets copied. After the clone (copying the storage 
> etc.)
> succeeds the config is updated. That means before the config is updated 
> the
> config of your clone still contains the rootfs path to the original 
> container.
> You can verify this by doing:
> 
>         # lxc-clone -B dir testvm012d testvm13d
>         [ctrl+c]
> 
> and checking
> 
>         YOUR-FAVOURITE editor testvm13d/config
> 
> it should still contain
> 
>         lxc.rootfs = /path/to/testvm012d/rootfs
> 
> in contrast to when the copy of the rootfs of the original container 
> succeeds.
> Then it will contain:
> 
>         lxc.rootfs = /path/to/testvm13d/rootfs
> 
> (lxc-devel might be a good place to determine whether this is a bug or 
> not.)

Looks like lxc-clone should copy the config file at the very end, after 
rootfs.


Tomasz Chmielewski
http://wpkg.org



More information about the lxc-users mailing list