B.11. Unable to add bridge br0 port vnet0: No such device
- Symptom
- The following error message appears:
Unable to add bridge name_of_bridge port vnet0: No such device
For example, if the bridge name is br0, the error message will appear as:Unable to add bridge br0 port vnet0: No such device
In libvirt versions 0.9.6 and earlier, the same error appears as:Failed to add tap interface to bridge name_of_bridge: No such device
Or for example, if the bridge is named br0:Failed to add tap interface to bridge 'br0': No such device
- Investigation
- Both error messages reveal that the bridge device specified in the guest's (or domain's)
<interface>
definition does not exist.To verify the bridge device listed in the error message does not exist, use the shell commandip addr showbr0
.A message similar to this confirms the host has no bridge by that name:br0: error fetching interface information: Device not found
If this is the case, continue to the solution.However, if the resulting message is similar to the following, the issue exists elsewhere:3: br0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN link/ether 1b:c4:94:cf:fd:17 brd ff:ff:ff:ff:ff:ff inet 192.168.122.1/24 brd 192.168.122.255 scope global br0
- Solution
- Edit the existing bridge or create a new bridge with
virsh
- Use
virsh
to either edit the settings of an existing bridge or network, or to add the bridge device to the host system configuration.- Edit the existing bridge settings using
virsh
- Use
virsh edit name_of_guest
to change the<interface>
definition to use a bridge or network that already exists.For example, changetype='bridge'
totype='network'
, and<source bridge='br0'/>
to<source network='default'/>
. - Create a host bridge using
virsh
- For libvirt version 0.9.8 and later, a bridge device can be created with the
virsh iface-bridge
command. This will create a bridge device br0 witheth0
, the physical network interface which is set as part of a bridge, attached:virsh iface-bridge eth0 br0
Optional: If desired, remove this bridge and restore the originaleth0
configuration with this command:virsh iface-unbridge br0
- Edit the existing bridge settings using
- Create a host bridge manually
- For older versions of libvirt, it is possible to manually create a bridge device on the host. Refer to Section 11.3, “Bridged Networking with libvirt” for instructions.
- Edit the existing bridge or create a new bridge with