Solved

How to configure virbr0 on CentOS6.5

Posted on 2014-10-07
5
762 Views
Last Modified: 2014-10-09
Hi

I have a CentOS6.5 server and I expected to see a virbr0 interface but I don't.  I thought that this would be automatically created depending on what RPM/group is installed. Does anyone know what RPM/group I require or do I need to manually configure it?

%packages
@Base
@Core
@base
@console-internet
@core
@debugging
@directory-client
@hardware-monitoring
@java-platform
@large-systems
@network-file-system-client
@performance
@perl-runtime
@server-platform
@virtualization
@virtualization-client
@virtualization-platform


# ifconfig
br-ex     Link encap:Ethernet  HWaddr 00:1F:29:0A:7C:84
          inet addr:10.10.12.20  Bcast:10.10.12.255  Mask:255.255.255.0
          inet6 addr: fe80::1892:90ff:fedc:1eb1/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:1478662 errors:0 dropped:0 overruns:0 frame:0
          TX packets:853549 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2056593190 (1.9 GiB)  TX bytes:63083573 (60.1 MiB)

br-int    Link encap:Ethernet  HWaddr EE:BB:62:20:2A:45
          inet6 addr: fe80::d015:71ff:fe9c:4241/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:16 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:1140 (1.1 KiB)  TX bytes:468 (468.0 b)

br-tun    Link encap:Ethernet  HWaddr AE:A0:E9:16:71:4D
          inet6 addr: fe80::7b:68ff:fe6d:c277/64 Scope:Link
          UP BROADCAST RUNNING  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:468 (468.0 b)

eth0      Link encap:Ethernet  HWaddr 00:1F:29:0A:7C:84
          inet6 addr: fe80::21f:29ff:fe0a:7c84/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1482248 errors:0 dropped:0 overruns:0 frame:0
          TX packets:856759 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:2062940656 (1.9 GiB)  TX bytes:66699859 (63.6 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:551250 errors:0 dropped:0 overruns:0 frame:0
          TX packets:551250 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:2017116429 (1.8 GiB)  TX bytes:2017116429 (1.8 GiB)

# brctl show
bridge name     bridge id               STP enabled     interfaces
0
Comment
Question by:mickt
  • 4
5 Comments
 
LVL 10

Accepted Solution

by:
Ganesh Kumar A earned 500 total points
ID: 40366297
Bridged networking with libvirt
Bridged networking (also known as physical device sharing) is used to dedicate a physical device to a virtual machine. Bridging is often used for more advanced setups and on servers with multiple network interfaces.
To create a bridge (br0) based on the eth0 interface, execute the following command on the host:
# virsh iface-bridge eth0 br0

NetworkManager does not support bridging. NetworkManager must be disabled to use networking with the network scripts (located in the /etc/sysconfig/network-scripts/ directory).
# chkconfig NetworkManager off
# chkconfig network on
# service NetworkManager stop
# service network start
If you do not want to disable NetworkManager entirely, add "NM_CONTROLLED=no" to the ifcfg-* network script being used for the bridge.

May be this url will help:  http://www.techotopia.com/index.php/Creating_a_CentOS_6_KVM_Networked_Bridge_Interface
0
 

Author Comment

by:mickt
ID: 40367842
I can't do this as eth0 is associated with br-ex.

virbr0 is enabled automatically on an Ubuntu set-up that I have.  It is unaffected by my br-ex configuration.

Background here is that I run openstack on the host, which uses br-ex.  I use virbr0 for customised VM creation, which I can then import into OS as images.
0
 

Author Comment

by:mickt
ID: 40367882
I re-kickstarted the server and didn't install openstack.  virbr0 is there.  This is as expected.  It seems that openstack installation may have removed it.
0
 

Author Comment

by:mickt
ID: 40368266
packstack removes virbr0.  I'll need to investigate this as I'd prefer to keep it.
0
 

Author Comment

by:mickt
ID: 40370207
Should also include the following RPMs in the anaconda file.

libguestfs
libguestfs-tools
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

David Varnum recently wrote up his impressions of PRTG, based on a presentation by my colleague Christian at Tech Field Day at VMworld in Barcelona. Thanks David, for your detailed and honest evaluation!
Will try to explain how to use the VMware feature TAGs in the VMs and create Veeam Backup Jobs using TAGs. Since this article is too long, I will create second article for the Veeam tasks.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now