I have messed with this for days, trying several different ways to get a bridged network to work with an LXC container. I am brand new to lxc and this is the first thing I wanted to do. I have tried with my current bridge I use for KVM/qemu. The VMs work without any problems at all. Trying to run a debian 10 container on debian 10. I have even tried uninstalling and reinstalling LXC and still no luck. Any help at all would be greatly appreciated.
Also, this is my first post and my first ever forum. So if i am doing this wrong please let me know
cat /etc/default/lxc # LXC_AUTO - whether or not to start containers at boot LXC_AUTO="true" # BOOTGROUPS - What groups should start on bootup? # Comma separated list of groups. # Leading comma, trailing comma or embedded double # comma indicates when the NULL group should be run. # Example (default): boot the onboot group first then the NULL group BOOTGROUPS="onboot," # SHUTDOWNDELAY - Wait time for a container to shut down. # Container shutdown can result in lengthy system # shutdown times. Even 5 seconds per container can be # too long. SHUTDOWNDELAY=5 # OPTIONS can be used for anything else. # If you want to boot everything then # options can be "-a" or "-a -A". OPTIONS= # STOPOPTS are stop options. The can be used for anything else to stop. # If you want to kill containers fast, use -k STOPOPTS="-a -A -s" USE_LXC_BRIDGE="true" # overridden in lxc-net [ ! -f /etc/default/lxc-net ] || . /etc/default/lxc-net
cat /etc/lxc/default.conf lxc.net.0.type = veth lxc.net.0.link = virbr0 lxc.net.0.flags = up lxc.apparmor.profile = generated lxc.apparmor.allow_nesting = 1
cat /var/lib/lxc/deb/config # Template used to create this container: /usr/share/lxc/templates/lxc-debian # Parameters passed to the template: -r buster # Template script checksum (SHA-1): d5aa397522e36a17c64c014dd63c70d8607c9873 # For additional config options, please look at lxc.container.conf(5) # Uncomment the following line to support nesting containers: #lxc.include = /usr/share/lxc/config/nesting.conf # (Be aware this has security implications) lxc.net.0.type = veth lxc.net.0.hwaddr = 00:16:3e:e6:32:6b lxc.net.0.link = virbr0 lxc.net.0.flags = up lxc.apparmor.profile = generated lxc.apparmor.allow_nesting = 1 lxc.rootfs.path = dir:/var/lib/lxc/deb/rootfs # Common configuration lxc.include = /usr/share/lxc/config/debian.common.conf lxc.apparmor.profile = unconfined # Container specific configuration lxc.tty.max = 4 lxc.uts.name = deb lxc.arch = amd64 lxc.pty.max = 1024
ip ad 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 92: eth0@if93: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000 link/ether 00:16:3e:e6:32:6b brd ff:ff:ff:ff:ff:ff link-netnsid 0 inet6 fe80::216:3eff:fee6:326b/64 scope link valid_lft forever preferred_lft forever