Installation guide

libvirt adds iptables rules which allow traffic to and from guests attached to the virbr0 device
in the INPUT, FORWARD, OUTPUT and POSTROUTING chains. libvirt then attempts to enable the
ip_forward parameter. Some other applications may disable ip_forward, so the best option is to
add the following to /etc/sysctl.conf:
net.ipv4.ip_forward = 1
G u est co n fig u rat io n
Once the host configuration is complete, a guest can be connected to the virtual network based on its
name. To connect a guest to the 'default' virtual network, the following XML can be used in the guest:
<interface type='network'>
<source network='default'/>
</interface>
Note
Defining a MAC address is optional. A MAC address is automatically generated if omitted.
Manually setting the MAC address is useful in certain situations.
<interface type='network'>
<source network='default'/>
<mac address='00:16:3e:1a:b3:4a'/>
</interface>
10.2. Bridged net working wit h libvirt
Bridged networking (also known as physical device sharing) is used for dedicating a physical
device to a virtual machine. Bridging is often used for more advanced setups and on servers with
multiple network interfaces.
Disab le Xen n et wo rk scrip t s
If your system was using a Xen bridge, it is recommended to disable the default Xen network bridge
by editing /etc/xen/xend-config.sxp and changing the line:
(network-script network-bridge)
To:
(network-script /bin/true)
Disab le Net wo rkMan ag er
Net wo rkMan ag er d o es n o t su p p o rt brid g in g . Running NetworkManager will overwrite any
manual bridge configuration. Because of this, NetworkManager should be disabled in order to use
networking via the network scripts (located in the /etc/sysconfig/network-scripts/
directory):
Chapt er 1 0 . Net work Con figu rat ion
137