[Lxc-users] Determine which veth interface belongs to which container

Yury Vidineev adepty at yandex.ru
Mon Jul 1 17:28:26 UTC 2013


Hi Dwight
It would be great. Thank you!

On Monday, July 01, 2013 12:42:35 PM Dwight Engen wrote:
> Hi guys,
> 
> This is exactly the use case that I added lxc_cmd_get_config_item()
> for. Unfortunately it wasn't exposed yet, but since I saw your message
> I just proposed adding the ability to lxc-info over on the devel
> list. Hopefully this can do what you need.
> 
> On Mon, 1 Jul 2013 10:26:44 -0500
> 
> Serge Hallyn <serge.hallyn at ubuntu.com> wrote:
> > You can probably correlate it using /sys/class/net/$veth/iflink,
> > which should have consecutive values for link and peer.
> > 
> > Quoting Yury Vidineev (adepty at yandex.ru):
> > > Thank you for the answer! It's almost exactly what I need. But is
> > > it possible to know name of interfaces without containers restart?
> > > 
> > > On Monday, July 01, 2013 02:08:10 PM Claudio Kuenzler wrote:
> > > > > Hello
> > > > > Can anyone suggest me a way to determine which veth* interface
> > > > > belongs to which container?
> > > > 
> > > > You have the possibility to add the veth interface name into the
> > > > lxc config:
> > > > 
> > > > lxc.network.veth.pair = veth0-$name
> > > > 
> > > > 
> > > > Using this, you'll immediately know to which lxc container the
> > > > interface belongs.
> > 
> > --------------------------------------------------------------------------
> > ---- This SF.net email is sponsored by Windows:
> > 
> > Build for Windows Store.
> > 
> > http://p.sf.net/sfu/windows-dev2dev
> > _______________________________________________
> > Lxc-users mailing list
> > Lxc-users at lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/lxc-users

-- 
Sincerely,
Yury Vidineev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130701/b5cda3ac/attachment.html>


More information about the lxc-users mailing list