parse config: do not validate informative values in cloud init section

Suggested-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht 2022-11-17 12:46:11 +01:00
parent 7e554ab102
commit c229961ad3

View File

@ -2492,6 +2492,11 @@ sub parse_vm_config {
} elsif ($line =~ m/^([a-z][a-z_]*\d*):\s*(.+?)\s*$/) {
my $key = $1;
my $value = $2;
if ($section eq 'cloudinit') {
# ignore validation only used for informative purpose
$conf->{$key} = $value;
next;
}
eval { $value = check_type($key, $value); };
if ($@) {
$handle_error->("vm $vmid - unable to parse value of '$key' - $@");