The error message
lxc-start: conf.c: instantiate_veth: 2978 failed to attach 'veth87VSIJ' to the bridge 'virbr0': No such device
clearly indicates the absence of the bridge interface on your system. You can check your current available interfaces using the commands
ifconfig
or
ip link
In the current case because you don't have the bridge enabled, another thing to know is that virbr0 is generally associated with visualization services like xen or libvirtd. So the first thing you can try is to start one of those (being in fedora 20 I think you're using libvirtd)
sudo systemctl start libvirtd
If the interface is not activated by this, you can simply add it manually, but I strongly advise against it to avoid configuration conflicts.
The better solution that I may suggest is to use a different bridge altogether as it will also give you more control over it configuration. First you have to identify where the lxc-net bridge name is set, by examining the /usr/libexec/lxc/lxc-net
#!/bin/sh -
distrosysconfdir="/etc/sysconfig"
varrun="/run/lxc"
varlib="/var/lib"
# These can be overridden in /etc/sysconfig/lxc
# or in /etc/sysconfig/lxc-net
USE_LXC_BRIDGE="true"
LXC_BRIDGE="lxcbr0"
LXC_ADDR="10.0.3.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.0.3.0/24"
LXC_DHCP_RANGE="10.0.3.2,10.0.3.254"
LXC_DHCP_MAX="253"
LXC_DHCP_CONFILE=""
LXC_DOMAIN=""
LXC_IPV6_ADDR=""
LXC_IPV6_MASK=""
LXC_IPV6_NETWORK=""
LXC_IPV6_NAT="false"
[ ! -f $distrosysconfdir/lxc ] || . $distrosysconfdir/lxc
which will be overridden by /etc/lxc/default.conf
lxc.network.type = veth
lxc.network.link = lxcbr0
lxc.network.flags = up
lxc.network.hwaddr = 00:16:3e:xx:xx:xx
only if USE_LXC_BRIDGE="true" in /etc/sysconfig/lxc (not the case here)
# LXC_AUTO - whether or not to start containers at boot
LXC_AUTO="true"
# BOOTGROUPS - What groups should start on bootup?
# Comma separated list of groups.
# Leading comma, trailing comma or embedded double
# comma indicates when the NULL group should be run.
# Example (default): boot the onboot group first then the NULL group
BOOTGROUPS="onboot,"
# SHUTDOWNDELAY - Wait time for a container to shut down.
# Container shutdown can result in lengthy system
# shutdown times. Even 5 seconds per container can be
# too long.
SHUTDOWNDELAY=5
# OPTIONS can be used for anything else.
# If you want to boot everything then
# options can be "-a" or "-a -A".
OPTIONS=
# STOPOPTS are stop options. The can be used for anything else to stop.
# If you want to kill containers fast, use -k
STOPOPTS="-a -A -s"
USE_LXC_BRIDGE="false" # overridden in lxc-net
[ ! -f /etc/sysconfig/lxc-net ] || . /etc/sysconfig/lxc-net
or /etc/sysconfig/lxc-net if it exists (not in my case). In my case the bridge name is lxcbr0 and it will not be using the lxc bridge configuration.
With that settled, we create the new bridge interface configuration with:
sudo sh -c '
cat > /etc/sysconfig/network-scripts/ifcfg-lxcbr0 <<EOF
DEVICE="lxcbr0"
BOOTPROTO="static"
IPADDR="192.168.1.250"
NETMASK="255.255.255.0"
ONBOOT="yes"
TYPE="Bridge"
NM_CONTROLLED="no"
EOF
'
and we start it with
sudo ifup lxcbr0
you will also have to restart lxc and lxc-net
sudo systemctl stop lxc
sudo systemctl stop lxc-net
sudo systemctl start lxc-net
sudo systemctl start lxc