3

I have started making many lxc containers on my host. So by default lxc provides a default bridge lxcbr0. How many virtual interfaces can be instantiated with lxcbr0. I started with 2000 containers,but i got stuck after 1024 containers.

The error being :

lxc-start: conf.c: instantiate_veth: 2978 failed to attach 'vethO7X5DJ' to          
the bridge 'lxcbr0': Exchange full
lxc-start: conf.c: lxc_create_network: 3261 failed to create netdev
lxc-start: start.c: lxc_spawn: 826 failed to create the network
lxc-start: start.c: __lxc_start: 1080 failed to spawn 'container_1024'
lxc-start: lxc_start.c: main: 342 The container failed to start.
Himani
  • 31
  • 3

2 Answers2

1

That is the linux bridge ports limit apparently, which is 1024.

You'll probably need to go with some custom networking (e.g. multiple bridges, as there is no hard limit on bridges) or might be http://openvswitch.org/ or something..

swnn
  • 31
  • 5
1

Create one more bridge lxcbr1 and then map lxcbr0 and lxcbr1 using veth interface like

 $ ip link add veth0 type veth peer name veth1
 $ brctl addif lxcbr0 veth0
 $ brctl addif lxcbr1 veth1
 $ ifconfig veth0 up
 $ ifconfig veth1 up

What we have done is,

1) We create a queue by name veth0 and veth1; so any packet go via veth0 will reach veth1 and vice versa;

2) Then we added both the ends of vethX to lxcbr<0-1> so that all the packet will go to both bridges and all the interfaces connected to this bridges;

Viswesn
  • 4,674
  • 2
  • 28
  • 45