[pve-devel] [PATCH qemu-server] Fix #3371: parse ovf: Allow dots in VM name
Dominic Jäger
d.jaeger at proxmox.com
Wed Jul 21 12:06:48 CEST 2021
Dots are allow in PVE VM names, so they should not be dropped during import.
Signed-off-by: Dominic Jäger <d.jaeger at proxmox.com>
---
PVE/QemuServer/OVF.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/PVE/QemuServer/OVF.pm b/PVE/QemuServer/OVF.pm
index c76c199..0376cbf 100644
--- a/PVE/QemuServer/OVF.pm
+++ b/PVE/QemuServer/OVF.pm
@@ -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";
}
--
2.30.2
More information about the pve-devel
mailing list