In this howto we will setup bridged networking to dedicate physical network device to KVM virtual machines/servers. Its best way to have local network between virtual machines  and provide better performance.

1. Create a Bridge

Before it was all manual to create bridge device but now KVM provide single command to do all. To create a bridge (br0) using eth0, you need to execute following command

virsh iface-bridge eth0 br0

This will create bridge (br0) device file in /etc/sysconfig/network-scripts/ and take all settings from eth0 to configure itself with configure eth0 to use br0.

2. Stop NetworkManager

You will also need to do following in all ifcfg-* file in /etc/sysconfig/network-scripts/ to disable NetworkManager. Edit all files and make sure to have following value

NM_CONTROLLED=no

After this stop NetworkManager and start network service to start bridge at startup.

chkconfig NetworkManager off
chkconfig network on
service NetworkManager stop
service network start

You can now create or edit your virtual machine to use bridge network device (br0).

 

By Sohail Riaz

I am a First Red Hat Certified Architect - RHCA (ID # 110-082-666) from Pakistan with over 14 years industry experience in several disciplines including LINUX/UNIX System Administration, Virtualization, Network, Storage, Load Balances, HA Clusters and High Performance Computing.

Leave a Reply

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