[Lxc-users] [lxc-users] - move ppp on container

n.hicher n.hicher at alphalink.fr
Wed Mar 24 16:50:33 UTC 2010


I have already try this solution, it doesn't work :

root at 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

root at server:~# ip link set ppp0 netns 23481
RTNETLINK answers: Invalid argument

root at 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





More information about the lxc-users mailing list