1
0
mirror of synced 2026-05-03 14:58:48 +00:00
Files
xen-tools.xen-tools/etc/xm.tmpl
steve 0110af1aae 2006-08-19 13:40:16 by steve
Allow MAC address to be specified for the initial network interface.
2006-08-19 13:40:17 +00:00

77 lines
1012 B
Cheetah

#
# Configuration file for the Xen instance {$hostname}, created on
# { scalar localtime }.
#
#
# Kernel + memory size
#
kernel = '{$kernel}'
{ 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,$m' ]";
}
}
#
# Behaviour
#
on_poweroff = 'destroy'
on_reboot = 'restart'
on_crash = 'restart'