[pve-devel] [PATCH storage/qemu-server/manager v6] implement ova/ovf import for file based storages

Dominik Csapak d.csapak at proxmox.com
Mon Nov 18 14:53:43 CET 2024


On 11/18/24 14:44, Dominik Csapak wrote:
> On 11/18/24 14:39, Lukas Wagner wrote:
>> On Mon Nov 18, 2024 at 2:18 PM CET, Dominik Csapak wrote:
>>> On 11/18/24 14:06, Lukas Wagner wrote:
>>>> On Fri Nov 15, 2024 at 4:17 PM CET, Dominik Csapak wrote:
>>>>> This series enables importing ova/ovf from directory based storages,
>>>>> inclusive upload/download via the webui (ova only).
>>>>>
>>>>> It also improves the ovf importer by parsing the ostype, nics, bootorder
>>>>> (and firmware from vmware exported files).
>>>>>
>>>>> I opted to move the OVF.pm to pve-storage, since there is no
>>>>> real other place where we could put it. I put it in a new module
>>>>> 'GuestImport'
>>>>>
>>>>> We now extract the images into either a given target storage or in the
>>>>> import storage in the 'images' dir so accidentally left over images
>>>>> are discoverable by the ui/cli.
>>>>>
>>>>> This version is half rebased on fabians hardening series:
>>>>> https://lore.proxmox.com/pve-devel/20241104104221.228730-1-f.gruenbichler@proxmox.com/
>>>>>
>>>>> I sent the qemu-server patch from fabian again but omitted some
>>>>> problematic checks. I add them later with a check
>>>>> against the import vtype again (last patch in qemu-server)
>>>>
>>>> Hi,
>>>> gave this series a quick test on the respective latest master branches.
>>>>
>>>> Looking good so far, but a couple of things that I've noticed were:
>>>>    -  In the UI, checking 'Live Import' does not seem to have any effect
>>>>       (is live import even available for OVA import?)
>>>
>>> yes this works here, under what condition does it not for you?
>>>
>>
>> nothing special, I tested the feature using the Home Assistant .ova from
>> [1]. Downloaded the OVA to my local storage, pressed "import", did not
>> change *any* settings apart from ticking "live import".
>> The import works, but the VM is not started. Starting the VM manually
>> works fine, also the tasks log does not show anything of concern.
>> In the browser network requests I saw that 'live-restore' is set to '1'
>> in the import POST request.
>>
>> [1] https://www.home-assistant.io/installation/alternative/
> 
> 
> mhmm can reproduce with that ova image, maybe it has something to do with our
> ovf import not detecting the main disk?
> (at least here it does not detect any disk)
> 
> 

ok two things here:

* this ova is malformed it seems, it has a HostResource of '/disk/vmidsk1' when
the spec says it should be of the form 'ovf:/disk/vmdisk1' which is what we look for
(we could make that optional though?)

* seemingly live-import does not start the vm if there was no disk, but AFAICS
this was pre-existing and not something my series introduced (but not sure either)




More information about the pve-devel mailing list