2007-07-07 23:48:08 by steve
INITIAL COMMIT: Support for arbitary partitioning systems. Patch from Sascha Kettler.
This commit is contained in:
17
etc/xm.tmpl
17
etc/xm.tmpl
@@ -21,15 +21,20 @@ memory = '{$memory}'
|
||||
#
|
||||
# Disk device(s).
|
||||
#
|
||||
root = '/dev/{$device}1 ro'
|
||||
{ if ( $noswap )
|
||||
{
|
||||
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
|
||||
{
|
||||
$OUT .= "disk = [ '$image_vbd,$device" . "1,w' ]";
|
||||
if ( $PARTITIONS[$i]{'mountpoint'} eq '/' )
|
||||
{
|
||||
$OUT .= "root = '/dev/$device" . ($i + 1) . " ro'\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
$OUT .= "disk = [\n";
|
||||
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
|
||||
{
|
||||
$OUT .= "disk = [ '$image_vbd,$device" . "1,w', '$swap_vbd,$device" . "2,w' ]";
|
||||
$OUT .= " '$PARTITIONS[$i]{'imagetype'}$PARTITIONS[$i]{'image'},$device" . ( $i + 1 ) .",w',\n";
|
||||
}
|
||||
$OUT .= " ]\n";
|
||||
}
|
||||
|
||||
#
|
||||
@@ -81,4 +86,4 @@ on_crash = 'restart'
|
||||
{
|
||||
$OUT .= "xen_shell = '$admins'\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user