Sha256: 21871a35cff6612aa0b15519eacb5c2f39b2bbb527cfc9b8ea8870b7f675305f

Contents?: true

Size: 1.88 KB

Versions: 30

Compression:

Stored size: 1.88 KB

Contents

#
# Configuration file for the Xen instance {$hostname}, created
# by xen-tools {$xen_tools_version} on { scalar localtime }.
#

#
#  Kernel + memory size
#
{ if ( ( $kernel ) && ( !defined($bootloader)) )
  {
    $OUT.= "kernel      = '$kernel'\n";
  }
}
{ if ( ( $initrd ) && ( !defined($bootloader)) )
  {
    $OUT.= "ramdisk     = '$initrd'\n";
  }
}
{ if ( $bootloader )
  {
    $OUT .= "bootloader = '$bootloader'\n";
  }
}
memory      = '{$memory}'

#
#  Disk device(s).
#
{ 
  $ROOTDISKOUT = "";
  for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
  {
      if ( $PARTITIONS[$i]{'mountpoint'} eq '/' )
      {
          $ROOTDISKOUT = "                  '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n";
          $OUT .= "root        = '/dev/$device" . ($i + 1) . " ro'\n";
      }
  }
  $OUT .= "disk        = [\n";
  $OUT .= $ROOTDISKOUT;
  for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
  {
      if ( $PARTITIONS[$i]{'mountpoint'} ne '/' )
      {
          $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"
    }

    my $vn = '';
    if ( $vifname )
    {
      $vn = ",vifname=$vifname";
    }

    $OUT .= "vif         = [ 'ip=$ip1";
    $OUT .= "$m";
    $OUT .= "$vn";
    $OUT .= "' ]";
  }
}

#
#  Behaviour
#
on_poweroff = 'destroy'
on_reboot   = 'restart'
on_crash    = 'restart'


{ if ( $admins )
  {
    $OUT .= "xen_shell = '$admins'\n";
  }
}

extra = '2 console=xvc0'

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
le1t0-deprec-2.1.6.088 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.087 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.086 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.085 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.084 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.083 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.082 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.081 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.080 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.079 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.078 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.077 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.076 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.075 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.074 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.073 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.072 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.071 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.070 lib/deprec/templates/xentools/xm.tmpl.erb
le1t0-deprec-2.1.6.069 lib/deprec/templates/xentools/xm.tmpl.erb