Fedora Linux Support Community & Resources Center
  #1  
Old 26th July 2016, 08:46 PM
theGrzeniek Offline
Registered User
 
Join Date: Jul 2016
Location: Warsawa
Posts: 2
linuxfedorafirefox
libvirt does not attach virbr0-nic to virbr0

Hi all

after upgrading to fedora 24 I have problem with networking in gnome-boxes. Guest are attached to default network in libvirt and it seems that network works ok. But the problem is MAC address of virbr0 bridge is changing on every guest machine start.

I think that in previous release brctl show looked like this:
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes virbr0-nic

but I'm not sure. Now it looks:
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes

The problem is that on every start of Windows guest machines NLA process detects and forces to set up new network profile (named Network 1, Network 2, etc)

theGrzeniek
Reply With Quote
  #2  
Old 16th November 2016, 02:41 AM
asio_bob Offline
Registered User
 
Join Date: Oct 2006
Posts: 42
linuxfedorafirefox
Re: libvirt does not attach virbr0-nic to virbr0

I've run into the same problem - I'm not sure when virbr0-nic is supposed to be attached, however in my case it's not attached at host boot, and it's not attached as a pre-step when launching a libvirt session based VM (e.g via Gnome-Boxes).

My solution is using Network-Manager (F24 default) then virbr0-nic can be attached to the actual bridge when it first becomes available using dispatcher scripts. This is what I've done.

1. Create the dispatcher script: /etc/NetworkManager/dispatcher.d/99-virbr0 with the following content. Make sure virbr0 and virbr0-nic are the correct names in your environment

Code:
#!/bin/sh
# See the "DISPATCHER SCRIPTS" section of `man NetworkManager`.
# Remember to make this file executable!
# Remember to ensure the correct SELinux Contex
[ "$1" != "virbr0" ] && exit 0
case "$2" in
    "up")
        # Attach the dummy interface to the bridge.
        /sbin/ip link set virbr0-nic master virbr0
        ;;
esac
2.
Code:
sudo chmod 755 /etc/NetworkManager/dispatcher.d/99-virbr0
3. Ensure the script is labeled in the correct SELinux contect
Code:
sudo restorecon 755 /etc/NetworkManager/dispatcher.d/99-virbr0
Now even after the host reboots, the virbr0-nic is attached to virbr0 bridge which provides constant MAC address for the bridge. Now when a windows VM starts up, NLA retains the same network profile

Last edited by asio_bob; 16th November 2016 at 02:55 AM. Reason: Added clarity on permissions
Reply With Quote
  #3  
Old 27th March 2017, 09:21 PM
dd_wizard Offline
Registered User
 
Join Date: Sep 2009
Posts: 1,995
linuxfedorafirefox
Re: libvirt does not attach virbr0-nic to virbr0

I did this fix in F24, but I don't think it's needed in F25. Here's the output of brctl show without doing the NetworkManager patch:
Code:
$ sudo brctl show
bridge name	bridge id		STP enabled	interfaces
virbr0		8000.52540017c02e	yes		virbr0-nic
dd_wizard
Reply With Quote
Reply

Tags
attach, libvirt, virbr0, virbr0nic

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
What's this virbr0 interface in ifconfig? Thetargos Servers & Networking 4 1st December 2011 06:05 PM
how to config DNS for libvirt virbr0 on fc15/fc16? wlpl Servers & Networking 0 15th November 2011 01:48 AM
libvirt do not create virbr0 yansolo74 Mac Chat 36 8th July 2008 10:23 AM
XEN virbr0 not working, help wanted Albacore Servers & Networking 0 13th October 2007 05:19 PM
virbr0, et al. billquinn Servers & Networking 1 6th August 2007 02:09 AM


Current GMT-time: 05:40 (Friday, 26-05-2017)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat