1
0
mirror of synced 2026-01-31 13:32:04 +00:00
Files
xen-tools.xen-tools/etc/xm.tmpl
steve eafc7427c2 2007-07-07 23:48:08 by steve
INITIAL COMMIT:  Support for arbitary partitioning systems.
  Patch from Sascha Kettler.
2007-07-07 23:49:02 +00:00

90 lines
1.4 KiB
Cheetah

#
# Configuration file for the Xen instance {$hostname}, created
# by xen-tools {$xen_tools_version} on { scalar localtime }.
#
#
# Kernel + memory size
#
{ if ( $kernel )
{
$OUT.= "kernel = '$kernel'";
}
}
{ if ( $initrd )
{
$OUT.= "ramdisk = '$initrd'";
}
}
memory = '{$memory}'
#
# Disk device(s).
#
{
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
{
if ( $PARTITIONS[$i]{'mountpoint'} eq '/' )
{
$OUT .= "root = '/dev/$device" . ($i + 1) . " ro'\n";
}
}
$OUT .= "disk = [\n";
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
{
$OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n";
}
$OUT .= " ]\n";
}
#
# 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'
{ if ( $admins )
{
$OUT .= "xen_shell = '$admins'\n";
}
}