Bug 2001565 - VM OVA import fails if loop device doesn't exist in the host during the import
Summary: VM OVA import fails if loop device doesn't exist in the host during the import
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: ovirt-engine
Classification: oVirt
Component: BLL.Virt
Version: 4.4.8
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ovirt-4.5.0
: 4.5.0
Assignee: Shmuel Melamud
QA Contact: Nisim Simsolo
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-09-06 12:06 UTC by Guilherme Santos
Modified: 2022-04-20 06:33 UTC (History)
6 users (show)

Fixed In Version: ovirt-engine-4.5.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-04-20 06:33:59 UTC
oVirt Team: Virt
Embargoed:
pm-rhel: ovirt-4.5?


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHV-43384 0 None None None 2021-09-06 12:09:57 UTC
oVirt gerrit 116778 0 master MERGED core: Wait udev to settle down device permissions 2021-09-19 14:42:29 UTC
oVirt gerrit 116947 0 master MERGED core: extract_ova: wait for loop device 2021-10-06 09:02:11 UTC

Description Guilherme Santos 2021-09-06 12:06:39 UTC
Description of problem:
When trying to import a VM from OVA, it may failed with the following message:
# less /var/log/ovirt-engine/ova/ovirt-import-ova-ansible-20210906141645-<hostname>-dff540f5-b4a8-4e80-b830-90b42577986c.log
(...)
"rc" : 1,
        "stdout" : "qemu-img: Could not open '/dev/loop0': Could not open '/dev/loop0': Permission denied\r\nqemu-img conversion failed with error:  1\r\nTraceback (most recent call last):\r\n  File \"/root/.ansible/tmp/ansible-tmp-1630927007.0029898-38803-53216924181380/extract_ova.py\", line 122, in <module>\r\n    extract_disks(sys.argv[1], yaml.load(sys.argv[2]), yaml.load(sys.argv[3]))\r\n  File \"/root/.ansible/tmp/ansible-tmp-1630927007.0029898-38803-53216924181380/extract_ova.py\", line 113, in extract_disks\r\n    extract_disk(ova_path, ova_file.tell(), image_path)\r\n  File \"/root/.ansible/tmp/ansible-tmp-1630927007.0029898-38803-53216924181380/extract_ova.py\", line 38, in extract_disk\r\n    check_call(['su', '-p', '-c', qemu_cmd, 'vdsm'])\r\n  File \"/usr/lib64/python3.6/subprocess.py\", line 311, in check_call\r\n    raise CalledProcessError(retcode, cmd)\r\nsubprocess.CalledProcessError: Command '['su', '-p', '-c', \"qemu-img convert -O qcow2 '/dev/loop0' '/rhev/data-center/mnt/blockSD/fea08f3f-105b-4160-a201-40752efaffc4/images/2b08161b-5f05-41ef-a94a-29a3806eff1d/f93c6260-dd04-4690-8c17-be666b9c180f'\", 'vdsm']' returned non-zero exit status 1.\r\n",
(...)

It looks like is the same issue as this one here: https://bugzilla.redhat.com/show_bug.cgi?id=1813028
but for the extract_ova.py instead of the pack_ova.py from the 18103028 

Version-Release number of selected component (if applicable):
4.4.8

How reproducible:
idk, 50/50 I guess?

Steps to Reproduce:
1. Have a vm exported as OVA
2. Import it
3.

Actual results:
fails

Expected results:
succeeds

Additional info:

Comment 1 Nisim Simsolo 2022-04-12 08:39:33 UTC
Verified:
ovirt-engine-4.5.0-0.237.el8ev
vdsm-4.50.0.10-1.el8ev.x86_64
qemu-kvm-6.2.0-11.module+el8.6.0+14707+5aa4b42d.x86_64
libvirt-daemon-8.0.0-5.module+el8.6.0+14480+c0a3aa0f.x86_64

Verification scenario:
1. Export VM as OVA to host without /dev/loop devices.
  Verify VM exported successfully with disks.
2. Reboot host in order to clear /dev/loop. and import the exported OVA.
  OVA imported successfully, run VM and verify VM is running and VM configuration is correct.
3. Export VM as OVA when to host with /dev/loop devices.
  Verify VM exported successfully with disks.
4. Verify /dev/loop device created, import the exported OVA.
  OVA imported successfully, run VM and verify VM is running and VM configuration is correct.
5. Repeat steps 1-4 few times.

Comment 2 Sandro Bonazzola 2022-04-20 06:33:59 UTC
This bugzilla is included in oVirt 4.5.0 release, published on April 20th 2022.

Since the problem described in this bug report should be resolved in oVirt 4.5.0 release, it has been closed with a resolution of CURRENT RELEASE.

If the solution does not work for you, please open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.