LXC: Cannot attach to network interface

i want to set up LXC containers in a different VLAN. I have created the VLAN and assigned an interface br-lxc. I have changed the lxc.network.link to the interface br-lxc. However, on startup of the container i get an error:

lxc-start: conf.c: instantiate_veth: 2796 failed to attach 'vethWHW6V6' to the bridge 'br-lxc': Operation not permitted
lxc-start: conf.c: lxc_create_network: 3079 failed to create netdev
lxc-start: start.c: lxc_spawn: 935 failed to create the network
lxc-start: start.c: __lxc_start: 1192 failed to spawn 'Test'
lxc-start: lxc_start.c: main: 344 The container failed to start.

Has anyone an idea, why this happens?

1 Like

Is your new Interface working? Please provide content of /etc/config/network and output of ifconfig. Try to bind it to a switch port and connect a PC over ethernet for testing (or create a new wifi Interface and bind it to br-lxc)

OK, my fault. I apparently named the interface br-LXC but configured lxc to use br-lxc - this isn’t viewable in LuCI, since it displays interface names in all caps. I renamed the interface to lowercase, now the container starts up.