Installation guide

Important
This section describes manually adding network bridges. This procedure is not required or
recommended for all versions of Red Hat Enterprise Linux newer than version 5.0. For newer
versions use "Virtual Network" adapters when creating guests in virt-manager.
Net wo rkMan ag er works with virtual network devices by default in Red Hat Enterprise Linux
5.1 and newer.
An example of a virsh XML configuration file for a virtual network device:
<interface type='network'>
<mac address='AA:AA:AA:AA:AA:AA'/>
<source network='default'/>
<target dev='vnet0'/>
<model type='virtio'/>
</interface>
In xm configuration files, virtual network devices are labeled "vif".
The challenge in running the Xen hypervisor on a laptop is that most laptops will connected to the
network via wireless network or wired connections. Often these connections are switched multiple
times a day. In such an environment, the system assumes it has access to the same interface all the
time and it also can perform ifup or ifdown calls to the network interface it is using. In addition
wireless network cards do not work well in a virtualization environment due to Xen's (default) bridged
network usage.
This setup will also enable you to run Xen in offline mode when you have no active network
connection on your laptop. The easiest solution to run Xen on a laptop is to follow the procedure
outlined below:
You will be configuring a 'dummy' network interface which will be used by Xen. In this example the
interface is called dummy0. This will also allow you to use a hidden IP address space for your
guests.
You will need to use static IP address as DHCP will not listen on the dummy interface for DHCP
requests. You can compile your own version of DHCP to listen on dummy interfaces, however you
may want to look into using dnsmasq for DNS, DHCP and tftpboot services in a Xen environment.
Setup and configuration are explained further down in this section/chapter.
You can also configure NAT and IP masquerading in order to enable access to the network from
your guests.
Co n f ig u rin g a d u mmy n et wo rk in t erf ace
Perform the following configuration steps on your host:
1. Create a dummy0 network interface and assign it a static IP address. In our example I selected
10.1.1.1 to avoid routing problems in our environment. To enable dummy device support add
the following lines to /etc/modprobe.conf:
alias dummy0 dummy
options dummy numdummies=1
2. To configure networking for dummy0, edit or create /etc/sysconfig/network-
scripts/ifcfg-dummy0:
Red Hat En t erp rise Lin ux 5 Virt ualizat ion Guid e
14 2