Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1641536

Summary: virt-v2v: VMs imported from Xen and VMware are removed after import is completed.
Product: [oVirt] ovirt-engine Reporter: Nisim Simsolo <nsimsolo>
Component: BLL.VirtAssignee: Steven Rosenberg <srosenbe>
Status: CLOSED CURRENTRELEASE QA Contact: Nisim Simsolo <nsimsolo>
Severity: urgent Docs Contact: Rolfe Dlugy-Hegwer <rdlugyhe>
Priority: unspecified    
Version: 4.3.0CC: bugs, michal.skrivanek, nsimsolo, ratamir, rbarry, rdlugyhe, srosenbe
Target Milestone: ovirt-4.3.0Keywords: Regression
Target Release: ---Flags: rule-engine: ovirt-4.3+
rule-engine: blocker+
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Previously, after using virt-v2v to import a virtual machine from Xen or VMware environments, the Red Hat Virtualization Manager was incorrectly removing the virtual machine. The Manager was removing the import job too early, causing it to remove the job reference twice. This issue has been fixed in the current release. The Manager only removes the import job after processing is complete. Using virt-v2v to import virtual machines from VmWare and Xen works.
Story Points: ---
Clone Of: Environment:
Last Closed: 2019-02-13 07:45:03 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:
Bug Depends On:    
Bug Blocks: 1575777    
Attachments:
Description Flags
vdsm.log
none
engine.log
none
import.log none

Description Nisim Simsolo 2018-10-22 08:03:28 UTC
Description of problem:
When importing VMs from Xen or VMware environments, Imported VMs are removed after import completion.

engine.log: 

2018-10-22 10:54:37,124+03 INFO  [org.ovirt.engine.core.bll.exportimport.ConvertVmCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-66) [618391a2-7df1-497c-aaa5-2c8074f411db] Ending command 'org.ovirt.engine.core.bll.exportimport.ConvertVmCommand' successfully.
.
.
.
2018-10-22 10:54:38,218+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-46) [618391a2-7df1-497c-aaa5-2c8074f411db] EVENT_ID: VDS_BROKER_COMMAND_FAILURE(10,802), VDSM lilach-vdsb command GetConvertedOvfVDS failed: Job Id does not exists
2018-10-22 10:54:38,219+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.GetConvertedOvfVDSCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-46) [618391a2-7df1-497c-aaa5-2c8074f411db] Command 'GetConvertedOvfVDSCommand(HostName = lilach-vdsb, VdsAndVmIDVDSParametersBase:{hostId='cafdec73-a657-4faf-af10-34e0c08c8f3f', vmId='564db017-08dc-e73f-adb6-f2bde2cfd8e2'})' execution failed: VDSGenericException: VDSErrorException: Failed in vdscommand to GetConvertedOvfVDS, error = Job Id does not exists
2018-10-22 10:54:38,224+03 ERROR [org.ovirt.engine.core.vdsbroker.vdsbroker.DeleteV2VJobVDSCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-46) [618391a2-7df1-497c-aaa5-2c8074f411db] Command 'DeleteV2VJobVDSCommand(HostName = lilach-vdsb, VdsAndVmIDVDSParametersBase:{hostId='cafdec73-a657-4faf-af10-34e0c08c8f3f', vmId='564db017-08dc-e73f-adb6-f2bde2cfd8e2'})' execution failed: VDSGenericException: VDSErrorException: Failed in vdscommand to DeleteV2VJobVDS, error = Job Id does not exists
2018-10-22 10:54:38,224+03 ERROR [org.ovirt.engine.core.bll.exportimport.UpdateConvertedVmCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-46) [618391a2-7df1-497c-aaa5-2c8074f411db] Command 'org.ovirt.engine.core.bll.exportimport.UpdateConvertedVmCommand' failed: EngineException: org.ovirt.engine.core.vdsbroker.vdsbroker.VDSErrorException: VDSGenericException: VDSErrorException: Failed in vdscommand to DeleteV2VJobVDS, error = Job Id does not exists (Failed with error V2V_JOB_DOESNT_EXIST and code 66)
2018-10-22 10:54:41,258+03 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmFromExternalProviderCommand] (EE-ManagedThreadFactory-engineScheduled-Thread-86) [618391a2-7df1-497c-aaa5-2c8074f411db] Ending command 'org.ovirt.engine.core.bll.exportimport.ImportVmFromExternalProviderCommand' with failure.
2018-10-22 10:54:42,000+03 ERROR [org.ovirt.engine.core.dal.dbbroker.auditloghandling.AuditLogDirector] (EE-ManagedThreadFactory-engineScheduled-Thread-86) [1532948c] EVENT_ID: IMPORTEXPORT_IMPORT_VM_FAILED(1,153), Failed to import Vm RHEL7_2 to Data Center Default, Cluster Default


Version-Release number of selected component (if applicable):
ovirt-engine-4.3.0-0.0.master.20181016132820.gite60d148.el7
virt-v2v-1.38.2-12.el7.x86_64
vdsm-4.30.1-14.git7aa9cb1.el7.x86_64
libvirt-client-4.5.0-10.el7.x86_64
qemu-kvm-ev-2.10.0-21.el7_5.4.1.x86_64
sanlock-3.6.0-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. Import VM from Xen or VMware.
2.
3.

Actual results:
After import is completed, VMs are removed.

Expected results:
VMs imported should not be removed.

Additional info:
engine.log, vdsm.log and import.log attached

Comment 1 Nisim Simsolo 2018-10-22 08:07:59 UTC
Created attachment 1496303 [details]
vdsm.log

Comment 2 Nisim Simsolo 2018-10-22 08:08:24 UTC
Created attachment 1496305 [details]
engine.log

Comment 3 Nisim Simsolo 2018-10-22 08:08:50 UTC
Created attachment 1496306 [details]
import.log

Comment 4 Red Hat Bugzilla Rules Engine 2018-10-22 13:44:55 UTC
This bug report has Keywords: Regression or TestBlocker.
Since no regressions or test blockers are allowed between releases, it is also being identified as a blocker for this release. Please resolve ASAP.

Comment 5 Steven Rosenberg 2018-10-23 06:23:06 UTC
This looks like an issue that was already fixed via the following patch which was already merged:

https://gerrit.ovirt.org/#/c/95002/

Please retest with this version accordingly.

Comment 7 Steven Rosenberg 2018-10-24 09:25:51 UTC
For the record, I demonstrated the fix to Nisim on my environment. It still needs to be tested in the official build.

Comment 8 Nisim Simsolo 2018-10-24 11:33:46 UTC
Verified: 
Updating to latest oVirt 4.3 is solving this issue.

Verification builds:
ovirt-engine-4.3.0-0.0.master.20181023141116.gitc92ccb5.el7
vdsm-4.30.1-25.gitce9e416.el7.x86_64
libvirt-client-4.5.0-10.el7.x86_64
qemu-kvm-common-ev-2.10.0-21.el7_5.7.1.x86_64
virt-v2v-1.38.2-12.el7.x86_64

Comment 9 Sandro Bonazzola 2018-11-02 14:33:58 UTC
This bugzilla is included in oVirt 4.2.7 release, published on November 2nd 2018.

Since the problem described in this bug report should be
resolved in oVirt 4.2.7 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.

Comment 10 Sandro Bonazzola 2018-11-02 14:39:16 UTC
Closed by mistake, moving back to qa -> verified

Comment 11 Rolfe Dlugy-Hegwer 2019-01-18 01:58:37 UTC
Please tech review the updated Doc Text. This is my best interpretation of the limited information available in the original text, but I'm sure it is not correct. Feel free to contact me for help formulating the final version.

Comment 12 Steven Rosenberg 2019-01-20 09:38:17 UTC
Corrections for second paragraph:

In the current release, the Red Hat Virtualization Manager now only removes the import job when the processing is completed. Using virt-v2v to import virtual machines from VmWare and Xen now works.

Comment 13 Sandro Bonazzola 2019-02-13 07:45:03 UTC
This bugzilla is included in oVirt 4.3.0 release, published on February 4th 2019.

Since the problem described in this bug report should be
resolved in oVirt 4.3.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.