Bobcares

Unable to add bridge port vnet0: No such device – How to fix

by | Mar 19, 2021

Stuck with Unable to add bridge port vnet0? We can help you.

Recently we had a customer who came across the error, Unable to add bridge name_of_bridge port vnet0: No such device.

As part of our Server Management Services, we assist our customers with several such errors.

Today, let us discuss the cause and solution for the same.

 

Unable to add bridge port vnet0: No such device

Generally, the error message appears as:

Unable to add bridge name_of_bridge port vnet0: No such device

For example, if the bridge name is br0, the error message will be like this:

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

For instance, if the bridge is named br0:

Failed to add tap interface to bridge ‘br0′: No such device

 

Find the error

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, we use:

ip addr show br0

A message similar to this confirms the host has no bridge by that name:

br0: error fetching interface information: Device not found

If the resulting message is similar to the following, the issue exists elsewhere:

br0 Link encap:Ethernet HWaddr 00:00:5A:11:70:48
inet addr:10.22.1.5 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:249841 errors:0 dropped:0 overruns:0 frame:0
TX packets:281948 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:106327234 (101.4 MiB) TX bytes:21182634 (20.2 MiB)

 

Solution for Unable to add bridge port vnet0

  • Edit the existing bridge or create a new bridge with virsh

We 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

We use virsh to 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’/>.

  • Create a host bridge using virsh

For libvirt version 0.9.8 and later, we can create a bridge device with the virsh iface-bridge command.

This creates a bridge device br0 with eth0, the physical network interface that is set as part of a bridge, attached:

virsh iface-bridge eth0 br0

If necessary, remove this bridge and restore the original eth0 configuration using

virsh iface-unbridge br0
  • Create a host bridge manually

For older versions of libvirt, it is possible to manually create a bridge device on the host.

Depending on our environment, setting up a bridge with libvirt in Red Hat Enterprise Linux 7 may require disabling Network Manager. Our Support Techs does not recommend that. This also requires libvirtd to run for the bridge to operate.

We can use the text user interface tool nmtui to configure bridging in a terminal window. Issue the following command to start the tool:

~]$ nmtui

Eventually, the text user interface appears. Any invalid command prints a usage message.

To navigate, we use the arrow keys or press Tab to step forwards and press Shift+Tab to step back through the options.

Then press Enter to select an option. The Space bar toggles the status of a check box.

  1. From the starting menu, select Edit a connection. Select Add, the New Connection screen opens.
  2. Then select Bridge, the Edit connection screen opens.
  3. To add slave interfaces to the bridge select Add, the New Connection screen opens. Once the type of Connection has been chosen, select the Create button to cause the bridge’s Edit Connection display to appear.
  4. Enter the required slave’s device name or MAC address in the Device section. If required, enter a clone MAC address to be used as the bridge’s MAC address by selecting Show to the right of the Ethernet label. Select the OK button.
    If the device is specified without a MAC address the Device section will be automatically populated once the Edit Connection window is reloaded, but only if it successfully finds the device.
  5. The name of the bridge slave appears in the Slaves section. Repeat the above steps to add further slave connections.
  6. Finally, review and confirm the settings before selecting the OK button.

[Couldn’t fix the error? We’d be happy to further assist you]

 

Conclusion

In short, when the bridge device specified in the guest’s (or domain’s) <interface> definition does not exist, we come across the error, Unable to add bridge port vnet0: No such device. Today, we saw how our Support Techs fix the same.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.

Privacy Preference Center

Necessary

Necessary cookies help make a website usable by enabling basic functions like page navigation and access to secure areas of the website. The website cannot function properly without these cookies.

PHPSESSID - Preserves user session state across page requests.

gdpr[consent_types] - Used to store user consents.

gdpr[allowed_cookies] - Used to store user allowed cookies.

PHPSESSID, gdpr[consent_types], gdpr[allowed_cookies]
PHPSESSID
WHMCSpKDlPzh2chML

Statistics

Statistic cookies help website owners to understand how visitors interact with websites by collecting and reporting information anonymously.

_ga - Preserves user session state across page requests.

_gat - Used by Google Analytics to throttle request rate

_gid - Registers a unique ID that is used to generate statistical data on how you use the website.

smartlookCookie - Used to collect user device and location information of the site visitors to improve the websites User Experience.

_ga, _gat, _gid
_ga, _gat, _gid
smartlookCookie
_clck, _clsk, CLID, ANONCHK, MR, MUID, SM

Marketing

Marketing cookies are used to track visitors across websites. The intention is to display ads that are relevant and engaging for the individual user and thereby more valuable for publishers and third party advertisers.

IDE - Used by Google DoubleClick to register and report the website user's actions after viewing or clicking one of the advertiser's ads with the purpose of measuring the efficacy of an ad and to present targeted ads to the user.

test_cookie - Used to check if the user's browser supports cookies.

1P_JAR - Google cookie. These cookies are used to collect website statistics and track conversion rates.

NID - Registers a unique ID that identifies a returning user's device. The ID is used for serving ads that are most relevant to the user.

DV - Google ad personalisation

_reb2bgeo - The visitor's geographical location

_reb2bloaded - Whether or not the script loaded for the visitor

_reb2bref - The referring URL for the visit

_reb2bsessionID - The visitor's RB2B session ID

_reb2buid - The visitor's RB2B user ID

IDE, test_cookie, 1P_JAR, NID, DV, NID
IDE, test_cookie
1P_JAR, NID, DV
NID
hblid
_reb2bgeo, _reb2bloaded, _reb2bref, _reb2bsessionID, _reb2buid

Security

These are essential site cookies, used by the google reCAPTCHA. These cookies use an unique identifier to verify if a visitor is human or a bot.

SID, APISID, HSID, NID, PREF
SID, APISID, HSID, NID, PREF