Description of problem: I'm importing a VM from a data domain which was attached to DC clus41 into another DC cl01 on same engine env. 2017-10-02 17:24:02,313+02 INFO [org.ovirt.engine.core.utils.transaction.TransactionSupport] (org.ovirt.thread.pool-6-thread-40) [d1a23b37-32c4-4 628-8a60-5f48af493a2c] transaction rolled back 2017-10-02 17:24:02,314+02 ERROR [org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand] (org.ovirt.thread.pool-6-thread-40) [d1a23b37-32c4-4628-8a60-5f48af493a2c] Command 'org.ovirt.engine.core.bll.exportimport.ImportVmFromConfigurationCommand' failed: CallableStatementCallback; SQL [{call insertimage(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; ERROR: duplicate key value violates unique constraint "pk_images" Detail: Key (image_guid)=(8ff47c61-1089-4d82-9319-72ad65928a91) already exists. Where: SQL statement "INSERT INTO images ( creation_date, image_guid, it_guid, size, ParentId, imageStatus, lastModified, vm_snapshot_id, volume_type, image_group_id, volume_format, active, volume_classification ) ... Version-Release number of selected component (if applicable): ovirt-engine-4.1.6.2-0.1.el7.noarch How reproducible: 100% Steps to Reproduce: 1. have a vm with snapshots on DC A 2. move disk to a new data domain, stop vm 3. detach the data domain 4. attach the data domain to DC B on same engine 5. try to import the VM Actual results: import fails with sql error inside engine.log Expected results: should work Additional info: please take into account this env exists since 3.0 so it has its history and it has had many bugs in the past so there are some issues which cannot be easy reproduced on clean env
Did you take live/cold snapshots? Are the snapshots contain memory?
(In reply to Eyal Shenitzky from comment #2) > Did you take live/cold snapshots? > Are the snapshots contain memory? live snapshots with memory.
Eyal, isn't this a dup of bug 1497518?
No, this is a different scenario. Manage to reproduce with the following steps: 1. Have a VM with disk 2. Run the VM 3. Create live snapshot with memory 4. Move disk to a different data storage domain 5. Stop the VM 3. Detach the data domain 4. Attach the data domain back to the environment 5. try to import the VM
Eyal - the attached patch is merged. Are we waiting for other patches? If not, please backport it to 4.1.
I can't execute step #5 as the list of unregistered VMs is empty rhevm-4.1.7.5-0.1.el7
Moving to 4.1.8 till we get a clear idea of what's the issue here
Raz I re-checked and it works for me, I will rephrase the steps to reproduce so it will be clearer: 1. Have a VM with disk on storage domain [A] 2. Run the VM 3. Create live snapshot with memory 4. Stop the VM 5. Move the VM's disk to a different data storage domain [B] 6. Detach the data storage domain [B] which contains the VM disk 7. Attach the data storage domain [B] back to the environment 8. try to import the VM VM import should succeed.
(In reply to Eyal Shenitzky from comment #9) > Raz I re-checked and it works for me, I will rephrase the steps to reproduce > so it will be clearer: > > 1. Have a VM with disk on storage domain [A] > 2. Run the VM > 3. Create live snapshot with memory > 4. Stop the VM > 5. Move the VM's disk to a different data storage domain [B] > 6. Detach the data storage domain [B] which contains the VM disk > 7. Attach the data storage domain [B] back to the environment > 8. try to import the VM > > VM import should succeed. Done exactly that but when attaching SD B, the list of unregistered VMs is empty. Will check again and update
Run the steps again and I see the same issue. the list of VM to import is empty
Maybe the issue is related to https://bugzilla.redhat.com/show_bug.cgi?id=1508908
(In reply to Raz Tamir from comment #12) > Maybe the issue is related to > https://bugzilla.redhat.com/show_bug.cgi?id=1508908 This is already ON_QA. Please retest.
Verified on rhevm-4.1.7.6-0.1.el7