Installation guide

# brctl show
bridge name bridge id STP enabled interfaces
virbr0 8000.000000000000 yes
l i bvi rt adds i ptabl es rules which allow traffic to and from guest virtual machines attached to
the vi rbr0 device in the INP UT , FO R WAR D , O UT P UT and P O ST R O UT ING chains. l i bvi rt then
attempts to enable the i p_fo rward parameter. Some other applications may disable i p_fo rward ,
so the best option is to add the following to /etc/sysctl . co nf.
net.ipv4.ip_forward = 1
G u est virt ual mach in e co n f ig u rat io n
Once the host configuration is complete, a guest virtual machine can be connected to the virtual
network based on its name. To connect a guest to the 'default' virtual network, the following could be
used in the XML configuration file (such as /etc/l i bvi rtd /q emu/myg uest. xml ) for the guest:
<interface type='network'>
<source network='default'/>
</interface>
Note
Defining a MAC address is optional. If you do not define one, a MAC address is automatically
generated and used as the MAC address of the bridge device used by the network. Manually
setting the MAC address may be useful to maintain consistency or easy reference throughout
your environment, or to avoid the very small chance of a conflict.
<interface type='network'>
<source network='default'/>
<mac address='00:16:3e:1a:b3:4a'/>
</interface>
11.2. Disabling vhost -net
The vho st-net module is a kernel-level backend for virtio networking that reduces virtualization
overhead by moving virtio packet processing tasks out of user space (the qemu process) and into
the kernel (the vho st-net driver). vhost-net is only available for virtio network interfaces. If the
vhost-net kernel module is loaded, it is enabled by default for all virtio interfaces, but can be disabled
in the interface configuration in the case that a particular workload experiences a degradation in
performance when vhost-net is in use.
Specifically, when UDP traffic is sent from a host machine to a guest virtual machine on that host,
performance degradation can occur if the guest virtual machine processes incoming data at a rate
slower than the host machine sends it. In this situation, enabling vho st-net causes the UD P
socket's receive buffer to overflow more quickly, which results in greater packet loss. It is therefore
better to disable vho st-net in this situation to slow the traffic, and improve overall performance.
To disable vho st-net, edit the <i nterface> sub-element in the guest virtual machine's XML
configuration file and define the network as follows:
Red Hat Ent erp rise Linux 6 Virt ualiz at ion Host Configurat ion and G uest Inst allat ion G uide
92