82.5. How to make a rtXen configuration file

Each virtual machine needs a configuration file, that must be located in /etc/xen/.

The parameters are the same of a standard Xen config file. Here there are two example configurations for a SmeServer virtual machine:

Example 82.1. Paravirtualization config file

# smeserver_pvm.cfg #
# Example config file for a paravirtualized environment running SmeServer.
# BOOTLOADER: pyGrub is a domU bootloader that allows, like GRUB, the loading
# of kernel and initrd that are into the VM disk image.
# In order to make it run, GRUB 1 must be installed on the VM.
bootloader = '/usr/lib/rtxen-4.1-1/bin/pygrub'

# MEMORY: specify the amount of RAM (MB) to assign at the VM. It couldn't be
# more than the physical RAM on the Abilis
memory = '512'

# DISK: specify the type of disk to use on the virtual machine.
# In this example we are using the disk image located in
# /opt/domains/smeserver/SmeServer.img. We want use that as a hda disk and have
# to be writable (w). The filename is case sensitive.
disk =[ 'file:/opt/domains/SmeServer/SmeServer.img,hda,w' ]

# NAME: the virtual machine name
name = 'smeserver_pvm'

# VIF: This section specifies the virtual inetrfaces to assign at the VM.
# Every interface (ethX) will be named into dom0 as vifY.X, where Y is the 
# domain ID.
# Is mandatory assign a unique MAC address to the vif in the same network. If
# it is not specified, rtXen will create a different address at every restart,
# producing potential issues with the DHCP server or internal domU scripts that
# need the MAC address ad a reference (ex: udev). Xen's domU MACs all start
# with 00:06:3E
vif = [ 'mac=00:06:3E:AA:BB:CC' ]

# ON_*: This section defines what to do when the VM is rebooted, turned off,
# destroyed or recovered after a system crash.
# Is also specified the behavior at start/stop of the Xen daemon.
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
on_xend_start = 'start'
on_xend_stop = 'shutdown'

# EXTRA: Is possible to add extra parameters to give to the kernel at startup.
# Adding extra='clocksource=jiffies' you can avoid some issues with the domU's
# system clock. More informations at:
# http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1098
extra='clocksource=jiffies'

Example 82.2. HW virtualization config file

# smeserver_hvm.cfg #
# Example config file for a HV environment running SmeServer.
# KERNEL and BUILDER: For the hardware vitrualization you need to specify
# the hvm loader as kernel and hvm as builder.
kernel = '/usr/lib/rtxen-4.1-1/boot/hvmloader'
builder = 'hvm'

# DEVICE_MODEL: The device model allows the hardware devices virtualization
# (disks, network interfaces...)
device_model = '/usr/lib/rtxen-4.1-1/bin/qemu-dm'

# MEMORY: specify the amount of RAM (MB) to assign at the VM. It couldn't be
# more than the physical RAM on the Abilis
memory = '512'

# DISK: specify the type of disk to use on the virtual machine.
# In this example we are using the disk image located in
# /opt/domains/smeserver/SmeServer.img. We want use that as an emulated hda
# disk and has to be writable (w). The filename is case sensitive.
disk = [ 'file:/opt/domains/SmeServer/SmeServer.img,ioemu:hda,w' ]

# NAME: the virtual machine name
name = 'smeserver_hvm'

# VIF: This section specifies the virtual inetrfaces to assign at the VM.
# Every interface (ethX) will be named into dom0 as vifY.X, where Y is the 
# domain ID.
# Is mandatory assign a unique MAC address to the vif in the same network. If
# it is not specified, rtXen will create a different address at every restart,
# producing potential issues with the DHCP server or internal domU scripts that
# need the MAC address ad a reference (ex: udev). Xen's domU MACs all start
# with 00:06:3E. type=ioemu means that the interface is emulated.
vif = [ 'type=ioemu,mac=00:16:3E:AA:BB:CC' ]

# VNC*: In hardware virtualization is possible to enable a remote desktop to
# see the console messages. With the following options is possible to connect
# through a VNC client to the dom0's IP and view the terminal.
vnc = 1
vncviewer = 0
vncconsole = 1
vnclisten = '0.0.0.0'

# ON_*: This section defines what to do when the VM is rebooted, turned off,
# destroyed or recovered after a system crash.
# Is also specified the behavior at start/stop of the Xen daemon.
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'
on_xend_start = 'start'
on_xend_stop = 'shutdown'