LXC-Web-Panel icon indicating copy to clipboard operation
LXC-Web-Panel copied to clipboard

Add more interfaces to containers and to host

Open emibcn opened this issue 11 years ago • 4 comments

It would be great to be able to configure more interfaces to each container and to the host, so creating more sophisticated network configurations.

emibcn avatar May 23 '14 13:05 emibcn

i can do this for a container but not for the host (because the future LXC Web Panel will be cross distros)

ElieDeloumeau avatar May 26 '14 13:05 ElieDeloumeau

For host networking, I'm speaking about the "LXC Settings" => "Networking" menu option. With that we'll be able to configure n virtual/phys bridged networks, for example. Then, in VMs, we'll be able to choose between any of these to attach an interface to. Maybe, a multi-distro solution is to just add interfaces to the list, not to configure them.

emibcn avatar May 26 '14 13:05 emibcn

yes but this feature use lxc-net (only on ubuntu by default) and i can't do this for all linux distributions.

ElieDeloumeau avatar May 26 '14 14:05 ElieDeloumeau

Ok. Just be able to add more interfaces to each VM could be great. Configuring extra bridges in the host is up to advanced users/admins and the use of them will still be available on VMs config.

Looking at lwp/__init__.py , it looks like LXC config options are expected to be unique. An example of multi-interfaces config might be:

# begin eth0
lxc.network.type = veth
lxc.network.hwaddr = 00:16:3e:7d:f1:af
lxc.network.flags = up
lxc.network.link = br0
# end eth0

# begin eth1
lxc.network.type = veth
lxc.network.hwaddr = 00:16:3e:7d:f1:bf
lxc.network.flags = up
lxc.network.link = br1
# end eth1

# begin eth2
lxc.network.type = veth
lxc.network.hwaddr = 00:16:3e:7d:f1:cf
lxc.network.flags = up
lxc.network.link = virbr0
# end eth2

Because there is no difference between the options of different interfaces, parser could look options between comments, like shown on the example. I can work on a fork and then do a pull request, if you like.

emibcn avatar May 26 '14 20:05 emibcn