From 5ae7d10fdc1ae2a5ee80f0530107b1a1e3db3b70 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 18 Nov 2024 19:25:00 +0100 Subject: [PATCH] ovf import: regisiter "vmw" namespace This is used when finding the firmware type, so register it here or libxml/xpath will complain about an "Undefined namespace prefix" The schema URL was taken from some OVFs found in the wild. Reported-by: Filip Schauer Signed-off-by: Thomas Lamprecht --- src/PVE/GuestImport/OVF.pm | 1 + 1 file changed, 1 insertion(+) diff --git a/src/PVE/GuestImport/OVF.pm b/src/PVE/GuestImport/OVF.pm index 4af58ed..49cae17 100644 --- a/src/PVE/GuestImport/OVF.pm +++ b/src/PVE/GuestImport/OVF.pm @@ -191,6 +191,7 @@ sub parse_ovf { # 'ovf' is the default namespace so it will prepended to each xml element my $xpc = XML::LibXML::XPathContext->new($dom); $xpc->registerNs('ovf', 'http://schemas.dmtf.org/ovf/envelope/1'); + $xpc->registerNs('vmw', 'http://www.vmware.com/schema/ovf'); $xpc->registerNs('rasd', 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData'); $xpc->registerNs('vssd', 'http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData');