7.2.2 Xen networking scripts
Xen’s virtual networking is configured by two shell scripts (by default network and
vif-bridge). These are called automatically by xend when certain events occur,
with arguments to the scripts providing further contextual information. These scripts
are found by default in /etc/xen/scripts. The names and locations of the scripts
can be configured in /etc/xen/xend-config.sxp.
network: This script is called whenever xend is started or stopped to respectively ini-
tialise or tear down the Xen virtual network. In the default configuration initial-
isation creates the bridge ‘xen-br0’ and moves eth0 onto that bridge, modifying
the routing accordingly. When xend exits, it deletes the Xen bridge and removes
eth0, restoring the normal IP and routing configuration.
vif-bridge: This script is called for every domain virtual interface and can configure
firewalling rules and add the vif to the appropriate bridge. By default, this adds
and removes VIFs on the default Xen bridge.
For more complex network setups (e.g. where routing is required or integrate with
existing bridges) these scripts may be replaced with customised variants for your site’s
preferred configuration.
7.3 Driver Domain Configuration
I/O privileges can be assigned to allow a domain to directly access PCI devices itself.
This is used to support driver domains.
Setting backend privileges is currently only supported in SXP format config files. To
allow a domain to function as a backend for others, somewhere within the vm ele-
ment of its configuration file must be a backend element of the form (backend
(type)) where type may be either netif or blkif, according to the type of
virtual device this domain will service.
Note that a block backend cannot currently import virtual block devices from other
domains, and a network backend cannot import virtual network devices from other
domains. Thus (particularly in the case of block backends, which cannot import a
virtual block device as their root filesystem), you may need to boot a backend domain
from a ramdisk or a network device.
Access to PCI devices may be configured on a per-device basis. Xen will assign the
minimal set of hardware privileges to a domain that are required to control its devices.
This can be configured in either format of configuration file:
• SXP Format: Include device elements of the form:
(device (pci (bus x) (dev y) (func z)))
inside the top-level vm element. Each one specifies the address of a device this
33
Commentaires sur ces manuels