Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

LXC configuration

I'm new to the LXC world and i'm facing an issue. I can't start an LXC container normally. Here is the error:

~ $ sudo lxc-start -d -n newcon -F

lxc-start: conf.c: instantiate_veth: 2729 failed to attach 'vethK6YJGI' to the bridge 'lxcbr0': Operation not permitted
lxc-start: conf.c: lxc_create_network: 3022 failed to create netdev
lxc-start: start.c: lxc_spawn: 1100 Failed to create the network.
lxc-start: start.c: __lxc_start: 1355 Failed to spawn container "newcon".
lxc-start: tools/lxc_start.c: main: 366 The container failed to start.
lxc-start: tools/lxc_start.c: main: 370 Additional information can be obtained by setting the --logfile and --logpriority options.

veth and lxcbr0 are supposed to created automatically by LXC

~ $ cat /etc/lxc/default.conf = veth = lxcbr0 = up = 00:16:3e:xx:xx:xx

I can't figure out what causing the

Operation not permitted

I have come up wiht a temporary solution to my problem found by accident in an old article here:

~ # brctl addbr lxcbr0
~ # brctl setfd lxcbr0 0
~ # ifconfig lxcbr0 promisc up
~ # brctl addif lxcbr0 enp2s0
~ # route add -net default gw lxcbr0

Could someone help with this?