I have already try this solution, it doesn't work : r...@server:~# lxc-ps --lxc CONTAINER PID TTY TIME CMD host1 23479 pts/5 00:00:00 lxc-init host1 23481 pts/5 00:00:00 bash
r...@server:~# ip link set ppp0 netns 23481 RTNETLINK answers: Invalid argument r...@server:~# ip link set ppp0 netns 23479 RTNETLINK answers: Invalid argument Thanks Daniel Lezcano wrote: > n.hicher wrote: >> Yes, it's can work, but for that I need to restart the container, I'd >> like to know if it's possible to add an interface on a container >> already started ? > > Oh, ok I misunderstood. > > Yes, you can, with the installed 'ip-utils' tools (guessing you have a > recent version). > > 1 - find the pid of one of the process running in the container > lxc-ps --lxc will help in this case > > 2 - assuming you have a pid 1234, use the following syntax. > > ip link set ppp0 netns 1234 > > At this point the 'ppp0' interface should be in the container, but you > won't be able to move it back to the host. > > I noticed the kernel has flagged 'ppp_generic' with the > NETIF_F_NETNS_LOCAL, so it should not be movable across namespaces, > but let's see if that works for you ... > > Thanks > -- Daniel > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Sauf indication contraire ci-dessus: > Compagnie IBM France > Siège Social : Tour Descartes, 2, avenue Gambetta, La Défense 5, 92400 > Courbevoie > RCS Nanterre 552 118 465 > Forme Sociale : S.A.S. > Capital Social : 542.737.118 ? > SIREN/SIRET : 552 118 465 02430 ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ Lxc-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/lxc-users
