Bug 918236
| Summary: | virt-convert fails to convert RHEV .ovf - IndexError: list index out of range | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Community] Virtualization Tools | Reporter: | James Laska <jlaska> | ||||
| Component: | virt-manager | Assignee: | Cole Robinson <crobinso> | ||||
| Status: | CLOSED CANTFIX | QA Contact: | |||||
| Severity: | low | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | unspecified | CC: | acathrow, berrange, crobinso, gscrivan, hbrock, hyao, jforbes, jturner, pavel, virt-maint, william | ||||
| Target Milestone: | --- | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | Environment: | ||||||
| Last Closed: | 2014-02-07 22:39:21 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Attachments: |
|
||||||
|
Description
James Laska
2013-03-05 18:34:23 UTC
I can reproduce this issue also. the problem seems to be caused by the xpath query. If the "ovf" namespace is not registered, then xpath doesn't correctly perform the query.
This line seems to fix the reported problem:
ctx.xpathRegisterNs("ovf", "http://schemas.dmtf.org/ovf/envelope/1/")
Using the attached file I now get:
Traceback (most recent call last):
File "virt-manager/virt-convert", line 176, in main
vmdef = inp.import_file(options.input_file)
File "virt-manager/virtconv/parsers/ovf.py", line 289, in import_file
register_namespace=ovf_register_namespace)
File "virt-manager/virtinst/util.py", line 300, in xml_parse_wrapper
ret = parse_func(doc, ctx, *args, **kwargs)
File "virt-manager/virtconv/parsers/ovf.py", line 426, in _import_file
vm.validate()
File "virt-manager/virtconv/vmcfg.py", line 69, in validate
raise ValueError(_("VM name is not set"))
ValueError: VM name is not set
and it seems that the file is missing also other information.
I have no familiarity with ovf, is it a valid ovf file?
If RHEV is generating it, presumably it's been successfully consumed by something else. So I think we can assume it's a valid ovf. virt-convert likely just needs to be extended. After poking at it for a while, I'm pretty convinced that ovf output is bogus. It's not like any other ovf files I can find in the wild. It doesn't even reference real filesystem paths, just UUIDs, so there would be nothing for libvirt to actually start anyways. Closing as CANTFIX |