I recently upgraded my virtual host node from Fedora 13 to Fedora 15 and alas virt-manager / NetworkManager do not yet configure a bridged network device for use with KVM guests.
There have been somechanges to how Fedora names network devicesas well as changing tosystemd, so while the basics are the same, there are some changes to the details.
Dependencies
You will need to have bridge-utils installed, I found it was included when I installed virt-manager.
yum install bridge-utils
Manual configuration
Configure your interfaces by editing the network scripts located in /etc/sysconfig/network-scripts. Take note of the new terminology Fedora is using.
Note: You will lose networking temporarily as you perform. the configuration.
1. Disable NetworkManager. Unfortunately NM does not manage bridges and if you do not disable it , NM will over write your configuration.
systemctl stop NetworkManager.service
systemctl disable NetworkManager.service
2. Configure your bridge by adding a file ifcfg-br0 with the contents:
Static IP:
DEVICE=br0
TYPE=Bridge
BOOTPROTO=static
NBOOT=yes
DELAY=0
IPADDR=192.168.0.10 # Set your IP address here.
NETWORK=192.168.0.0
NETMASK=255.255.255.0
GATEWAY=192.168.0.1
MTU=1500
DNS1=192.168.0.2 # Set your DNS server.
IPV6INIT=no # ipv6 is disabled
USERCTL=no
Or if you prefer to use DHCP:
DEVICE=br0
TYPE=Bridge
BOOTPROTO=dhcp
NBOOT=yes
DELAY=0
3. Add your network card to the bridge. Here we will add an interface using a file ifcfg-em0
DEVICE=em0
# change the hardware address to match the hardware address your NIC uses
HWADDR=00:11:AA:BB:CC:DD
NBOOT=yes
BRIDGE=br0
3. Enable networking
systemctl start network.service
systemctl enable network.service
Configure iptables
We can add a single rule to allow network packets to be forwarded to the guests.
iptables -I FORWARD -m physdev --physdev-is-bridged -j ACCEPT
# Save your changes
/etc/init.d/iptables save