I'm trying to get lxc containers running with a bridged network connection so the container get ip addresses like the host does from a dhcp server.
I red several tutorials, but I couldn't find one that explicitly mentions 15.04. Mostly they were about ubuntu 12. So maybe that's the problem somehow?
Here is what I tried:
- install ubuntu 15.04 server
sudo apt-get install lxc lxctl lxc-templates- install lxc webpanel as root:
wget http://lxc-webpanel.github.io/tools/install.sh -O - | bash
/etc/network/interfaces change to the following:
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet dhcp
bridge_ports eth0
bridge_stp off
bridge_fd 0
bridge_maxwait 0
- After rebooting I have
lxcbr0andbr0inifconfig - create a lxc container in the webpanel with ubuntu in it
- in the webpanel, configure the new container to use
br0instead oflxcbr0 - start the container
=> the new container's MAC is not seen in the dhcp servers lease list as well logging in to the container with lxc-console and running ifconfig shows that it doesn't get an IP address.
Btw. If I keep lxcbr0 the container gets an IP address, but that is masqueraded and not accessible from the outside. But that works.
What's the thing I'm missing here? Maybe some security issue?
[edit]
brctl show shows this:
bridge name bridge id STP enabled interfaces
br0 8000.000c29e793a1 no eth0
vethSCX4N3
lxcbr0 8000.000000000000 no
Also, the ubuntu 15.04 server is running on an esxi 6.0. [/edit]
brctl showwhile your container is running? And is your Ubuntu 15.04 server on another virtualization host like VMware?