Explore information related to virsh iface bridge

Guest unable to reach host using macvtap interface - Fix it Now

This article covers how to fix the issue with guests unable to reach the host using macvtap interface.

This issue happens when A guest virtual machine can communicate with other guests, but cannot connect to the host machine after being configured to use a macvtap (also known as type='direct') network interface.


To resolve this error (guests unable to reach the host using macvtap interface), simply create an isolated network with libvirt:

1. Add and save the following XML in the /tmp/isolated.xml file. If the 192.168.254.0/24 network is already in use elsewhere on your network, you can choose a different network.

<network>

  <name>isolated</name>

  <ip address='192.168.254.1' netmask='255.255.255.0'>

    <dhcp>

      <range start='192.168.254.2' end='192.168.254.254' />

    </dhcp>

  </ip>

</network>

2. Create the network with this command: virsh net-define /tmp/isolated.xml

3. Set the network to autostart with the virsh net-autostart isolated command.

4. Start the network with the virsh net-start isolated command.

5. Using virsh edit name_of_guest, edit the configuration of each guest that uses macvtap for its network connection and add a new <interface> in the <devices> section similar to the following (note the <model type='virtio'/> line is optional to include):

<interface type='network'>

  <source network='isolated'/>

  <model type='virtio'/>

</interface>

6. Shut down, then restart each of these guests.

Since this new network is isolated to only the host and guests, all other communication from the guests will use the macvtap interface.

Read More


Unable to add bridge port vnet0 No such device - Fix it now ?

This article covers how to resolve the error, Unable to add bridge port vnet0: No such device which happens when the bridge device specified in the guest's (or domain’s) <interface> definition does not exist.

Theerror 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 command ifconfig br0.

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.


To fix the error, Unable to add bridge port vnet0: No such device :

1. 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.

2. 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, change type='bridge' to type='network', and <source bridge='br0'/> to <source network='default'/>.

Read More