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:
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.
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.