5.1 Configuration Files
Xen configuration files contain the following standard variables.
Unless otherwise stated, configuration items should be enclosed in
quotes: see the configuration scripts in /etc/xen/
for concrete examples.
- Path to the kernel image.
- Path to a ramdisk image (optional).
- Memory size in megabytes.
- The number of virtual CPUs.
- Port to export the domain console on (default 9600 +
- Network interface configuration. This may simply contain
an empty string for each desired interface, or may override various
vif = [ 'mac=00:16:3E:00:00:11, bridge=xen-br0',
to assign a MAC address and bridge to the first interface and assign
a different bridge to the second interface, leaving xend to choose
the MAC address. The settings that may be overridden in this way are
type, mac, bridge, ip, script, backend, and vifname.
- List of block devices to export to the domain e.g.
disk = [ 'phy:hda1,sda1,r' ]
exports physical device /dev/hda1 to the domain as
/dev/sda1 with read-only access. Exporting a disk read-write
which is currently mounted is dangerous - if you are certain
you wish to do this, you can specify w! as the mode.
- Set to `dhcp' if you want to use DHCP to configure
- Manually configured IP netmask.
- Manually configured IP gateway.
- Set the hostname for the virtual machine.
- Specify the root device parameter on the kernel command
- IP address for the NFS server (if any).
- Path of the root filesystem on the NFS server (if
- Extra string to append to the kernel command line (if
Additional fields are documented in the example configuration files
(e.g. to configure virtual TPM functionality).
For additional flexibility, it is also possible to include Python
scripting commands in configuration files. An example of this is the
xmexample2 file, which uses Python code to handle the