1
0
mirror of synced 2026-01-13 15:17:30 +00:00

- Added 'type' parameter to specify desired guest type (PV,PVH,HVM)

This commit is contained in:
Arno Bakker 2021-10-11 11:39:25 +02:00
parent 00527f64b2
commit 0990f50fad
2 changed files with 12 additions and 1 deletions

View File

@ -215,6 +215,8 @@ and EVMS EXAMPLE.
Set the number of vcpus that the new instance will
have instead of the default value of "1".
--type=type Specify the VM type to use for the new guest.
Valid choices are 'pv' (default), 'pvh', or 'pvh'. xfs)
Installation options:
@ -1345,6 +1347,7 @@ sub setupDefaultOptions
$CONFIG{ 'ipfile' } = '/etc/xen-tools/ips.txt';
$CONFIG{ 'output' } = '/etc/xen';
$CONFIG{ 'extension' } = '.cfg';
$CONFIG{ 'type' } = 'pv'; # Arno: as per man xl.cfg
#
# Installation method defaults to "debootstrap" using
@ -1490,6 +1493,10 @@ sub checkOption
vlan => {
check => qr/^([1-9][0-9]{0,2}|10[01][0-9]|102[0-4])$/i,
message => "must be a number between 1 and 1024.\n",
}, # Arno
guestType => {
check => qr/^pv|pvh|hvm$/, # man xl.cfg
message => "must be 'pv', 'pvh' or 'hvm'.\n",
},
);
@ -1529,6 +1536,7 @@ sub checkOption
hash_method => 'hashMethod',
apt_proxy => 'uri',
vlan => 'vlan',
type => 'guestType', # Arno
);
# If given option does not exists in optionsTypes,
@ -1685,7 +1693,8 @@ sub parseCommandLineArguments
"extension:s", \&checkOption,
"dontformat", \&checkOption,
"lvm_thin=s", \$CONFIG{ 'lvm_thin' },
"type:s", \&checkOption, # Arno
# Help options
"debug!", \$CONFIG{ 'debug' },
"help", \$HELP,
@ -2719,6 +2728,7 @@ sub showSummary
}
}
logprint("Guest type : $CONFIG{'type'}\n");
logprint("Image type : $CONFIG{'image'}\n");
logprint("Memory size : $CONFIG{'memory'}\n");

View File

@ -30,6 +30,7 @@ memory = '{$memory}'
$OUT .= "maxmem = '$maxmem'\n";
}
}
type = '{$type}'
#
# Disk device(s).