Attempt to fixup image-dev
This commit is contained in:
30
etc/xm.tmpl
30
etc/xm.tmpl
@@ -21,7 +21,7 @@ memory = '{$memory}'
|
||||
#
|
||||
# Disk device(s).
|
||||
#
|
||||
{
|
||||
{
|
||||
for ( my $i = 0; $i <= $#PARTITIONS; $i++ )
|
||||
{
|
||||
if ( $PARTITIONS[$i]{'mountpoint'} eq '/' )
|
||||
@@ -37,6 +37,26 @@ memory = '{$memory}'
|
||||
$OUT .= " ]\n";
|
||||
}
|
||||
|
||||
#
|
||||
# Physical volumes
|
||||
#
|
||||
{
|
||||
if ( $image_vbd )
|
||||
{
|
||||
$OUT .= "root = '/dev/$image-dev ro'\n";
|
||||
$OUT .= "disk = [ '$image_vbd,sda1,w' ";
|
||||
}
|
||||
if ( $swap_vbd )
|
||||
{
|
||||
$OUT .= ", '$swap_vbd,sda2,w'";
|
||||
}
|
||||
if ( $imag_vbd )
|
||||
{
|
||||
$OUT .= " ]\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#
|
||||
# Hostname
|
||||
#
|
||||
@@ -52,12 +72,12 @@ name = '{$hostname}'
|
||||
# Setup the mac address, if present.
|
||||
my $m = '';
|
||||
if ( $mac )
|
||||
{
|
||||
{
|
||||
$m = "mac=$mac"
|
||||
}
|
||||
|
||||
$OUT .= "vif = [ '$m' ]";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#
|
||||
@@ -65,11 +85,11 @@ name = '{$hostname}'
|
||||
#
|
||||
my $m = '';
|
||||
if ( $mac )
|
||||
{
|
||||
{
|
||||
$m = ",mac=$mac"
|
||||
}
|
||||
|
||||
$OUT .= "vif = [ 'ip=$ip1";
|
||||
$OUT .= "vif = [ 'ip=$ip1";
|
||||
$OUT .= "$m' ]";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user