RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1985830 - Start or remove VM failure even v2v has already finished
Summary: Start or remove VM failure even v2v has already finished
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 9
Classification: Red Hat
Component: virt-v2v
Version: 9.0
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: beta
: ---
Assignee: Tomáš Golembiovský
QA Contact: Xiaodai Wang
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-07-26 02:08 UTC by Xiaodai Wang
Modified: 2022-11-15 10:23 UTC (History)
8 users (show)

Fixed In Version: virt-v2v-2.0.7-1.el9
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1985827
Environment:
Last Closed: 2022-11-15 09:55:51 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2022:7968 0 None None None 2022-11-15 09:56:22 UTC

Description Xiaodai Wang 2021-07-26 02:08:43 UTC
+++ This bug was initially created as a clone of Bug #1985827 +++

Description of problem:
Start or remove VM failure even v2v has already finished

Version-Release number of selected component (if applicable):
virt-v2v-1.42.0-14.module+el8.5.0+11846+77888a74.x86_64
Software Version:4.4.7.6-0.11.el8ev

How reproducible:
30%

Steps to Reproduce:
1. Run virt-v2v to convert a VM to rhv by rhv-upload.
2. Start the VM or Remove the VM once v2v finishes off.

The issue is hard to reproduce manually, it's better to keep running following script by automation.
function_test_xen.positive_test.rhev.scsi_disk.output_mode.rhev.rhv_upload

Actual results:
2021-07-22 13:22:49,124+08 ERROR [org.ovirt.engine.api.restapi.resource.AbstractBackendResource] (default task-876) [] Operation Failed: [Cannot run VM. VM Auto-xen-rhel7.9-scsidisk is being imported.]

Expected results:
The VM operation should success when v2v finishes.

Additional info:

--- Additional comment from Xiaodai Wang on 2021-07-26 02:05:28 UTC ---

Comments from Nir Soffer, thanks.

Looking at the code related to creating  a vm it is expected that the vm
will not finish the import when virt-v2v finishes, since it does not wait for
compilation.

vm = vms_service.add(
    types.Vm(
        cluster=cluster,
        initialization=types.Initialization(
            configuration=types.Configuration(
                type=types.ConfigurationType.OVA,
                data=ovf,
            )
        )
    )
)

This completes before the vm is created.

Waiting until an operation is completed is a great pain in RHV.

The best way to do this for most operations is to use jobs, as used here:
https://gitlab.com/nirs/ovirt-stress/-/blob/bb2088f05b3e186733da99260f7b5ecb0a0d03a8/delete-snapshot/test.py#L148

The general idea is to add correlation_id when calling the API, and
then wait for
the job with that id.

Comment 4 Xiaodai Wang 2022-05-06 02:44:40 UTC
I triggered one of our v2v functional job[1] which always has the issue of this bug. 
In the link below, we can see almost all scripts are PASS or FIXED. That means the issue
reported in this bug cannot be reproduced in the job.

So I think this bug can be moved to VERIFIED.

[1]https://libvirt-jenkins.rhev-ci-vms.eng.rdu2.redhat.com/job/v2v-RHEL-9.1-runtest-x86_64-function-specific_kvm-rhel/2/testReport/rhel/specific_kvm/

Comment 6 errata-xmlrpc 2022-11-15 09:55:51 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (Low: virt-v2v security, bug fix, and enhancement update), and where to find the updated
files, follow the link below.

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

https://access.redhat.com/errata/RHSA-2022:7968


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