[Lxc-users] Cleaning up veth when not destroying the usual way

Serge Hallyn serge.hallyn at ubuntu.com
Wed Apr 24 13:53:28 UTC 2013


Quoting Robin Monjo (appldiget) (robin.monjo at applidget.com):
> Hello,
> 
> I create my containers a particular way:
> - mount an existing container into the /containers/ folder
> - manually change the config for the new container
> - start the new container by specifying the path (-f option)
> 
> Then, to destroy it, I just stop it, unmount and remove everything. The problem is that it's not a clean destroy and after creating and starting a few containers this way, the ifconfig  command on the host machine output a lot of unused veth* interface.
> 
> Since lxc-destroy doesn't recognise my containers (not in the default folder), how do I clean destroy them manually (remove unused interfaces in ifconfig).
> 
> PS: Host is ubuntu 12.04 with default lxc config

It would be far preferable to bind-mount /containers onto
/var/lib/lxc and set the containers up there.  If you're
willing to do that and test it, then I'll happily look at
the config files you are using and try to reproduce.

-serge




More information about the lxc-users mailing list