Can't start lxc container on centos 7

I have installed lxc from git to update the version from 1 to latest one, but whenever try to create a container and start I’m getting an error as below. I have searched but I can’t see any useful fix , could you please support me :

[root@server4 templates]# lxc-create --version
4.0.0-devel

[root@server4 templates]# lxc-ls -f
NAME STATE AUTOSTART GROUPS IPV4 IPV6 UNPRIVILEGED
cent STOPPED 0 - - - false

[root@server4 templates]# lxc-start -n cent
lxc-start: cent: lxccontainer.c: wait_on_daemonized_start: 860 Received container state “ABORTING” instead of “RUNNING”
lxc-start: cent: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: cent: tools/lxc_start.c: main: 311 To get more details, run the container in foreground mode
lxc-start: cent: tools/lxc_start.c: main: 314 Additional information can be obtained by setting the --logfile and --logpriority options

[root@server4 templates]# cat /etc/centos-release
CentOS Linux release 7.4.1708 (Core)

[root@server4 templates]# lxc-start -n cent -F
lxc-start: cent: utils.c: lxc_can_use_pidfd: 1853 Kernel does not support pidfds
lxc-start: cent: network.c: instantiate_veth: 624 No such file or directory - Failed to attach “vethkHsSW5” to bridge “lxcbr0”, bridge interface doesn’t exist
lxc-start: cent: network.c: lxc_create_network_priv: 3384 No such file or directory - Failed to create network device
lxc-start: cent: start.c: lxc_spawn: 1847 Failed to create the network
lxc-start: cent: start.c: __lxc_start: 2074 Failed to spawn container “cent”
lxc-start: cent: tools/lxc_start.c: main: 308 The container failed to start
lxc-start: cent: tools/lxc_start.c: main: 314 Additional information can be obtained by setting the --logfile and --logpriority options
[root@server4 templates]#

As the error says, lxcbr0 appears missing on your system.

1 Like

should I create br0 using virsh or am I free to create bridge on physical interface in whatever way.
what is the default network , is it “virib” created by libvirt daemon ??

LXC normally ships with a lxc-net systemd unit that does this, but you may need some configuration to enable it (distro dependent).

1 Like

many thanks @stgraber for usual support given at this site :handshake: