LXC is just simple solution to make simple virtual operating system (OS), its like vmware or virtualbox or qemu or any other, but not fully like them, some feature was dropped. More detail about this software, you can check on LXC Ubuntu
for me, its very useful to create demo OpenERP / Odoo to client.
Just a simple solution for those who got lxc container error,
lxc-start: conf.c: instantiate_veth: xxxx failed to attach 'vethxxx' to the bridge 'virbr0': No such device
lxc-start: conf.c: lxc_create_network: 3261 failed to create netdev
lxc-start: start.c: lxc_spawn: 826 failed to create the network
lxc-start: start.c: __lxc_start: 1080 failed to spawn 'test'
lxc-start: lxc_start.c: main: 342 The container failed to start.
lxc-start: lxc_start.c: main: 346 Additional information can be obtained by setting the --logfile and --logpriority options.
Root Cause failed attach the bridge virbr0 or lxcbr0
its because of the container can not create bridge, can be because of your bridge is not created yet, or the network device on container is failed to create.
LXC container does not start solution
check your bridge
- use ifconfig or brctl to check that your bridge (on Host Server, not on guest) is exist and enable, ensure virbr0
- brctl show
- if doen't exists, you can add with brctl addbr virbr0
- ensure that guest hwaddr is changed, you need to do this to make guest host initiate from beginning to create networking device. Change it on /var/lib/lxc/(NAME_of_YOUR_CONTAINER)/config
- ensure that your bridge have IP in the same network of your lxc container and make it Up
- sudo brctl addbr virbr0
sudo ifconfig virbr0 10.0.5.1 netmask 255.255.255.0 up