Fix #3371: parse ovf: Allow dots in VM name

Dots are allow in PVE VM names, so they should not be dropped during import.

Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
This commit is contained in:
Dominic Jäger 2021-07-21 12:06:48 +02:00 committed by Thomas Lamprecht
parent 619a43992a
commit 8717d89d92

View File

@ -111,7 +111,8 @@ sub parse_ovf {
my $ovf_name = $xpc->findvalue($xpath_find_name);
if ($ovf_name) {
($qm->{name} = $ovf_name) =~ s/[^a-zA-Z0-9\-]//g; # PVE::QemuServer::confdesc requires a valid DNS name
# PVE::QemuServer::confdesc requires a valid DNS name
($qm->{name} = $ovf_name) =~ s/[^a-zA-Z0-9\-\.]//g;
} else {
warn "warning: unable to parse the VM name in this OVF manifest, generating a default value\n";
}