>On 08/13/2014 07:31 PM, Garrett Gauthier wrote:
>
>
>
>       To keep accounting for network traffic for each container, I need to 
> know the virtual interface name.  The problem is
>that each time my container starts I get a new interface created on the host, 
>something like vethCSR894, it is never the same.
>I have tried by using lxc.network.veth.pair but that parameter is ignored and 
>a new interace pair is cerated each time
>VETH##### (Host) ↔ ETH0 (Container).
>
>       So bottom line I want to create a virtual interface that is connected 
> to my bridge and force the container to use that
>interface each time.
>
>
>        I used Cacti but any tool has the same issue as the interface name is 
> randomly generated each time the container
>starts.
>
>       Any help would be appreciated.
>
>
>
>It works for me:
>
>lxc.network.veth.pair = veth_da-ipa-0


I'm even using something like

        lxc-start [...] -s lxc.network.veth.pair=$CONTAINER

in my lxc wrapper. Notice, that you can't "overwrite" an existing config file 
entry because multiple container interfaces are declared by repeating the 
"lxc.network" tags.


Guido

        
_______________________________________________
lxc-users mailing list
[email protected]
http://lists.linuxcontainers.org/listinfo/lxc-users

Reply via email to