1
0
mirror of synced 2026-02-24 23:47:51 +00:00
Files
xen-tools.xen-tools/etc/xm.tmpl
steve 75e6b78318 2006-12-05 15:04:31 by steve
kernel + initrd are no longer mandatory, and they will only be
 in the build xen configuration file if specified.
2006-12-05 15:04:32 +00:00

83 lines
1.0 KiB
Cheetah

#
# Configuration file for the Xen instance {$hostname}, created on
# { scalar localtime }.
#
#
# Kernel + memory size
#
{ if ( $kernel )
{
$OUT.= "kernel = '$kernel'\n";
}
}
{ if ( $initrd )
{
$OUT.= "ramdisk = '$initrd'\n";
}
}
memory = '{$memory}'
#
# Disk device(s).
#
root = '/dev/{$device}1 ro'
{ if ( $noswap )
{
$OUT .= "disk = [ '$image_vbd,$device" . "1,w' ]";
}
else
{
$OUT .= "disk = [ '$image_vbd,$device" . "1,w', '$swap_vbd,$device" . "2,w' ]";
}
}
#
# Hostname
#
name = '{$hostname}'
#
# Networking
#
{ if ( $dhcp )
{
$OUT .= "dhcp = 'dhcp'\n";
# Setup the mac address, if present.
my $m = '';
if ( $mac )
{
$m = "mac=$mac"
}
$OUT .= "vif = [ '$m' ]";
}
else
{
#
# Setup the mac address, if present.
#
my $m = '';
if ( $mac )
{
$m = ",mac=$mac"
}
$OUT .= "vif = [ 'ip=$ip1";
$OUT .= "$m' ]";
}
}
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'