[pve-devel] [PATCH storage/qemu-server/pve-manager] implement ova/ovf import for directory type storages

Fiona Ebner f.ebner at proxmox.com
Thu Apr 18 12:35:11 CEST 2024


Am 18.04.24 um 11:27 schrieb Dominik Csapak:
> ok after a bit of thinking and discussing off-list
> the plan to go forward from my side is this:
> 
> (please tell if there is something obviously wrong with it or you'd
> strongly prefer something differently)
> 
> extract on demand vs on upload:
>  i'd go with extract on demand because managing the extraction of the
> tarball + subdir etc is not really a win in my book, since we have to
> have most safeguards anyway and we have the same
> issue of where to store/map it etc. also it's not convenient for users
> that have already
> a bunch of ovas and want to store them in a central place, now they'd
> have to extract
> them just for us (and importing should be as small a hassle as it can be)
> 

The upside is that it would avoid all the extra cleanup handling and be
more efficient for users that want to import from a single OVA multiple
times. But you are right, the downside is also very big.

I'm thinking now, is there no way to expose a file in an OVA/tar without
actually extracting it? I.e. something like

> root at pve8a1 ~ # cat B         
> secret
> root at pve8a1 ~ # tar cf arch.tar A B dir
> root at pve8a1 ~ # losetup --offset 1536 --sizelimit 512 --read-only --show -f arch.tar
> /dev/loop0
> root at pve8a1 ~ # cat /dev/loop0
> secret

but that doesn't seem to work with sizelimit < 512. Not claiming losetup
is a good mechanism for that, just to illustrate the idea.




More information about the pve-devel mailing list