From f2a6bd278896f4354f88cf828dc690d186126741 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Nov 2024 19:56:49 +0100 Subject: [PATCH] ovf import: disks: mave ovf namespace in resource path optional Some OVFs like for example the one from the GNS3 OVA doesn't has that namespace/prefix, and does't really hurts us to make it optional as long as the rest is correct. Brings us nearer to have working disks with GNS3. Signed-off-by: Thomas Lamprecht --- src/PVE/GuestImport/OVF.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PVE/GuestImport/OVF.pm b/src/PVE/GuestImport/OVF.pm index 03baa90..4a00039 100644 --- a/src/PVE/GuestImport/OVF.pm +++ b/src/PVE/GuestImport/OVF.pm @@ -267,7 +267,7 @@ sub parse_ovf { # RFC 3986 "2.3. Unreserved Characters" my $valid_uripath_chars = qr/[[:alnum:]]|[\-\._~]/; - if ($host_resource =~ m|^ovf:/(${valid_uripath_chars}+)/(${valid_uripath_chars}+)$|) { + if ($host_resource =~ m|^(?:ovf:)?/(${valid_uripath_chars}+)/(${valid_uripath_chars}+)$|) { $disk_section_path = $1; $disk_id = $2; } else {