Install lxc:
$ sudo yum install lxc lxc-templates lxc-extras
Build container:
$ sudo lxc-create -n test -t fedora
Change root password:
$ chroot /var/lib/lxc/test/rootfs passwd
$ sudo lxc-start --name test
lxc-start: conf.c: instantiate_veth: 2978 failed to attach 'veth4GJ2LK' 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.
http://febru.soluvas.com/2015/03/solved-failed-to-attach-bridge-virbr0.html Oops, need to add the network bridge:
$ brctl addbr virbr0
# FIXME: can we use a different ip? I just got this from a blog post.
$ sudo ifconfig virbr0 10.0.5.1 netmask 255.255.255.0 up