On Mon, Sep 4, 2023 at 10:54 AM Arik Hadas <ahadas(a)redhat.com> wrote:
On Mon, Sep 4, 2023 at 9:49 AM <lars.stolpe(a)bvg.de> wrote:
> Hi,
>
> we can't import some OVA VMs into oVirt, that was previously exported in
> oVirt.
> Further investigations and testing showed, that in some vm.ovf files the
> last closing tag is missing ( </ovf:Envelope instead of </ovf:Envelope> ).
>
> Intense testing showed the following occurrence:
> on test DC (4.4.10.7-1):
> - about half of the VMs have that problem (about 9 VMs)
> - VMs where the export is working properly are ok, no matter how often i
> do export
> - VMs who's vm.ovf is wrong stay that way, no matter how often i do export
>
> on production DC (4.4.10.7-1):
> - all VMs have that problem (49 VMs)
> - an imported "good" VM formerly exported on test DC, now have a wrong
> vm.ovf too after re-exporting on production DC
> - vm.ovf of all VMs stay incorrect, no matter how often i do export
>
> on develop DC (4.5.4-1):
> - the only VM have that problem (1 VM)
> - vm.ovf of VMs stay incorrect, no matter how often i do export
>
> Environment:
> all DC have independent hardware and are built exactly the same way with
> the same components
> oVirt is with hosted-engine
>
> test and production:
> oVirt: 4.4.10.7-1
> engine OS: Cent OS Stream 8
> host OS: RHEL 8.7
>
> develop:
> oVirt: 4.5.4-1
> engine OS: Cent OS Stream 8 (latest updates till September 1st)
> host OS: RHEL 8.8 (latest updates till September 1st)
>
> Is that a known problem?
>
Nope
> Is there a way to fix this?
>
We use the same components that we use for OVAs also for writing OVFs of
snapshots and for writing domain XMLs so I doubt the problem is on the
ovirt-engine side (as we would have seen more severe issues)
We store the OVF in the OVA with a Python script that runs on the host so
I'd suggest to look for a message that starts with "writing ovf:" in its
log [1] to see whether the script was provided with the complete XML from
ovirt-engine
If the complete XML was provided, you can change the pack_ova.py script on
the ovirt-engine side to debug why it's not stored properly in the tar
(OVA) file
Lars, since you have environments that this issue reproduces on
consistently, could you please check if the issue is resolved by replacing
that write_ovf function in the link above with:
def write_ovf(entity, ova_file, ovf):
print("writing ovf: %s" % ovf)
ovf2 = ovf if python2 else ovf.encode()
tar_info = create_tar_info(entity + ".ovf", len(ovf2))
buf = (tar_info.tobuf() if python2 else
tar_info.tobuf(format=tarfile.GNU_FORMAT))
ova_file.write(buf)
ova_file.write(ovf2)
pad_to_block_size(ova_file)
>
> regards, Lars
> _______________________________________________
> Users mailing list -- users(a)ovirt.org
> To unsubscribe send an email to users-leave(a)ovirt.org
> Privacy Statement:
https://www.ovirt.org/privacy-policy.html
> oVirt Code of Conduct:
>
https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
>
https://lists.ovirt.org/archives/list/users@ovirt.org/message/GDCFY7J72CR...
>