[pve-devel] [PATCH storage/qemu-server/manager v7] implement ova/ovf import for file based storages
Thomas Lamprecht
t.lamprecht at proxmox.com
Mon Nov 18 19:19:32 CET 2024
Am 18.11.24 um 19:03 schrieb Filip Schauer:
> On 18/11/2024 18:53, Thomas Lamprecht wrote:
>> diff --git a/src/PVE/GuestImport/OVF.pm b/src/PVE/GuestImport/OVF.pm
>> index 4af58ed..ed6fcea 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');
>
> This fixes the XPath error, but the "name" text box in the import dialog
> is empty. When giving it a name and clicking "Import" a VM is
> immediately created but it has no disks.
And FWIW, pveproxy does indeed log the following for GNS3:
pvedaemon[2813654]: warning: unable to parse the VM name in this OVF manifest, generating a default value
pvedaemon[2813654]: invalid host resource /disk/vmdisk1, skipping
pvedaemon[2813654]: invalid host resource /disk/vmdisk2, skipping
@Dominik, should we use the RPCEnv log_warn (or on info level) so that those
make it also into the task log? I mean, they should not really expose anything
hidden/secret, the OVA file is user provided after all and if anybody can use
it for an import they also should be able to see odd quirks?
More information about the pve-devel
mailing list