|
|
|
|
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.
- kernel
- Path to the kernel image.
- ramdisk
- Path to a ramdisk image (optional).
- memory
- Memory size in megabytes.
- vcpus
- The number of virtual CPUs.
- console
- Port to export the domain console on (default 9600 +
domain ID).
- vif
- Network interface configuration. This may simply contain
an empty string for each desired interface, or may override various
settings, e.g.
vif = [ 'mac=00:16:3E:00:00:11, bridge=xen-br0',
'bridge=xen-br1' ]
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.
- disk
- 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.
- dhcp
- Set to `dhcp' if you want to use DHCP to configure
networking.
- netmask
- Manually configured IP netmask.
- gateway
- Manually configured IP gateway.
- hostname
- Set the hostname for the virtual machine.
- root
- Specify the root device parameter on the kernel command
line.
- nfs_server
- IP address for the NFS server (if any).
- nfs_root
- Path of the root filesystem on the NFS server (if
any).
- extra
- Extra string to append to the kernel command line (if
any)
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
vmid variable.
|
|
|