Bug 1833851
| Summary: | [4.4 Beta] Cannot export VM as OVA | ||
|---|---|---|---|
| Product: | Red Hat Enterprise Virtualization Manager | Reporter: | Germano Veit Michel <gveitmic> |
| Component: | ovirt-engine | Assignee: | Nobody <nobody> |
| Status: | CLOSED DUPLICATE | QA Contact: | meital avital <mavital> |
| Severity: | medium | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 4.4.0 | CC: | lrotenbe |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | Unspecified | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2020-05-11 08:24:45 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | Virt | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Seems to be here in pack_ova.py
def write_disk_headers(ova_file, disks_info):
for disk_info in disks_info:
# disk_info is of the following structure: <full path>::<size in bytes>
idx = disk_info.index('::')
disk_path = disk_info[:idx]
disk_size = int(disk_info[idx+2:])
print("skipping disk: path=%s size=%d" % (disk_path, disk_size))
disk_name = os.path.basename(disk_path)
tar_info = create_tar_info(disk_name, disk_size)
# write tar info
ova_file.write(tar_info.tobuf())
path_to_offset[disk_path] = str(ova_file.tell())
ova_file.seek(disk_size, 1)
os.fsync(ova_file.fileno())
Hi Germano, This bug is a duplicate of BZ 1825638. Please note that the main reason of failing is the ansible-runner service. *** This bug has been marked as a duplicate of bug 1825638 *** (In reply to Liran Rotenberg from comment #3) > Hi Germano, > This bug is a duplicate of BZ 1825638. > Please note that the main reason of failing is the ansible-runner service. > > *** This bug has been marked as a duplicate of bug 1825638 *** Sorry for raising a DUP, I did search for those strings :( |
Description of problem: Exporting VM as OVA fails when writing the disk headers. Seems to be related to finding the index, with a substring search that does not exist: "disk_info.index('::')" 2020-05-11 12:10:49 AEST - fatal: [host2.kvm]: FAILED! => {"changed": true, "msg": "non-zero return code", "rc": 1, "stderr": "Shared connection to host2.kvm closed.\r\n", "stderr_lines": ["Shared connection to host2.kvm closed."], "stdout": "writing ovf: <?xml version=1.0 encoding=UTF-8?><ovf:Envelope xmlns:ovf=http://schemas.dmtf.org/ovf/envelope/1 xmlns:rasd=http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData xmlns:vssd=http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://schemas.dmtf.org/ovf/envelope/1 xmlns:ovirt=http://www.ovirt.org/ovf><References><File ovf:href=945f7e31-54a7-46e9-9d4c-828c03d3e189 ovf:id=945f7e31-54a7-46e9-9d4c-828c03d3e189 ovf:size=1310720></File></References><NetworkSection><Info>List of networks</Info></NetworkSection><DiskSection><Info>List of Virtual Disks</Info><Disk ovf:diskId=9f58df91-9f05-42f0-9f17-25322a06f487 ovf:capacity=2 ovf:capacityAllocationUnits=byte\r\nTraceback (most recent call last):\r\n File \"/root/.ansible/tmp/ansible-tmp-1589163043.172344-70162732857194/pack_ova.py\", line 99, in <module>\r\n write_disk_headers(ova_file, disks_info.split('+'))\r\n File \"/root/.ansible/tmp/ansible-tmp-1589163043.172344-70162732857194/pack_ova.py\", line 71, in write_disk_headers\r\n idx = disk_info.index('::')\r\nValueError: substring not found\r\n", "stdout_lines": ["writing ovf: <?xml version=1.0 encoding=UTF-8?><ovf:Envelope xmlns:ovf=http://schemas.dmtf.org/ovf/envelope/1 xmlns:rasd=http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_ResourceAllocationSettingData xmlns:vssd=http://schemas.dmtf.org/wbem/wscim/1/cim-schema/2/CIM_VirtualSystemSettingData xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xmlns=http://schemas.dmtf.org/ovf/envelope/1 xmlns:ovirt=http://www.ovirt.org/ovf><References><File ovf:href=945f7e31-54a7-46e9-9d4c-828c03d3e189 ovf:id=945f7e31-54a7-46e9-9d4c-828c03d3e189 ovf:size=1310720></File></References><NetworkSection><Info>List of networks</Info></NetworkSection><DiskSection><Info>List of Virtual Disks</Info><Disk ovf:diskId=9f58df91-9f05-42f0-9f17-25322a06f487 ovf:capacity=2 ovf:capacityAllocationUnits=byte", "Traceback (most recent call last):", " File \"/root/.ansible/tmp/ansible-tmp-1589163043.172344-70162732857194/pack_ova.py\", line 99, in <module>", " write_disk_headers(ova_file, disks_info.split('+'))", " File \"/root/.ansible/tmp/ansible-tmp-1589163043.172344-70162732857194/pack_ova.py\", line 71, in write_disk_headers", " idx = disk_info.index('::')", "ValueError: substring not found"]} Version-Release number of selected component (if applicable): rhvm-4.4.0-0.33.master.el8ev.noarch ansible-2.9.6-1.el8ae.noarch vdsm-4.40.13-1.el8ev.x86_64 How reproducible: Always Steps to Reproduce: 1. Create VM with single disk 2. Export VM as OVA Actual results: Fail Expected results: Success