Glad to see a Forum devoted to Containers!!!
I have been trying to get networking to work in my containers, yet to no avail. Having tried just about every configuration I could find on the web,
I decided to just scrap all configs and restart with a setup as per this page:
https://tech.feedyourhead.at/content...-debian-jessie
Now, the guest interface comes up with the IP address, but no network connectivity.
I am starting to think there is something outside of my configs that is the problem, but not sure. I thought the best way to figure this out is to give as much info as possible and hopefully someone will spot the problem.
Here goes:
Host: Debian Jessie
Host Network Address: 192.168.0.163
Host Gateway: 192.168.0.1
Container: Debian Jessie
Container Network Address: 192.168.33.2
Container Gateway: 192.168.33.1
network-manager and wcid are not installed.
Not sure if this means anything but on lxc-start the container throws one error.
Code:
[ OK ] Reached target Paths.
Failed to open /dev/autofs: No such file or directory
Failed to initialize automounter: No such file or directory
[FAILED] Failed to set up automount Arbitrary Executable File Formats File System Automount Point.
See 'systemctl status proc-sys-fs-binfmt_misc.automount' for details.
Unit proc-sys-fs-binfmt_misc.automount entered failed state.
[ OK ] Reached target Swap.
Running the suggested command from within the container yields:
Code:
# systemctl status proc-sys-fs-binfmt_misc.automount
? proc-sys-fs-binfmt_misc.automount - Arbitrary Executable File Formats File System Automount Point
Loaded: loaded (/lib/systemd/system/proc-sys-fs-binfmt_misc.automount; static)
Active: failed (Result: resources)
Where: /proc/sys/fs/binfmt_misc
Docs: https://www.kernel.org/doc/Documentation/binfmt_misc.txt
http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
I read the "Docs" links... couldn't make much of it, but I don't think it's part of the problem, but would like verification of that.
Configs On Host:
Both
/etc/default/lxc and
/etc/lxc/default.conf are empty.
Code:
# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
auto br0
iface br0 inet static
address 192.168.33.1
netmask 255.255.255.0
broadcast 192.168.33.255
bridge_ports dummy0
bridge_fd 2.0
bridge_maxwait 1
Code:
# ifconfig |grep -A1 Ethernet
br0 Link encap:Ethernet HWaddr fe:31:5f:ef:bf:9a
inet addr:192.168.33.1 Bcast:192.168.33.255 Mask:255.255.255.0
--
eth0 Link encap:Ethernet HWaddr 00:21:86:f0:5d:86
inet addr:192.168.0.163 Bcast:192.168.0.255 Mask:255.255.255.0
--
vethJL4V0V Link encap:Ethernet HWaddr fe:31:5f:ef:bf:9a
inet6 addr: fe80::fc31:5fff:feef:bf9a/64 Scope:Link
--
virbr0 Link encap:Ethernet HWaddr 0a:5b:ec:e0:14:a6
inet addr:192.168.122.1 Bcast:192.168.122.255 Mask:255.255.255.0
Container config:
Code:
# cat /var/lib/lxc/debian8_chat/config
lxc.start.auto = 0
lxc.network.type = empty
lxc.rootfs = /var/lib/lxc/debian8_chat/rootfs
# Common configuration
lxc.include = /usr/share/lxc/config/debian.common.conf
# Container specific configuration
lxc.mount = /var/lib/lxc/debian8_chat/fstab
lxc.utsname = debian8_chat
lxc.arch = amd64
lxc.autodev = 1
lxc.kmsg = 0
lxc.tty = 6
# Newtwork
lxc.network.type = veth
lxc.network.name = veth0
lxc.network.flags = up
## specify the interface to be used for real network traffic.
lxc.network.link = br0
Container network interface file:
Code:
# cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto veth0
iface veth0 inet static
address 192.168.33.2
netmask 255.255.255.0
gateway 192.168.33.1
dns-nameservers 192.168.33.1
Any help would be greatly appreciated.