Description of problem: When attaching data storage domain to a dc and trying to import vms from it, it fails with error Cannot import VM. Storage Domain doesn't exist. Version-Release number of selected component (if applicable): ovirt-engine-4.2.0-0.0.master.20171124141652.gita5b4f9b.el7.centos.noarch vdsm-4.20.8-29.git6ceb389.el7.centos.x86_64 How reproducible: 100% Steps to Reproduce: 1. create vm with disk 2. move to maintenance the storage domain where the vm's disk is located 3. deactivate and detach the storage domain 4. attach to a different dc 5. try to import the vm Actual results: Cannot import VM. Storage Domain doesn't exist. Expected results: VM is imported Additional info: engine.log 2017-11-28 11:52:55,446+02 ERROR [org.ovirt.engine.core.bll.validator.ImportValidator] (default task-5) [46690cb5-5983-4278-acd2-3ca96933db4f] Storage Domain 'null' with id 'e84a4cb 4-19d2-4b45-b0e3-82aaee450f99', could not be found for disk alias 'vm1_Disk1' with image id '240a457e-4b8e-4bf4-975d-2e02fc166f7d'
Created attachment 1359761 [details] logs
This error means that the data center which the Template was registered from has not contained the storage domain which the VM was imported from. I saw also the following comment: Entity 'golden_mixed_virtio_template' with id '8731b686-5242-4fbc-857c-cff0730d3280', already exists as unregistered entity. override it with the new entity from the engine It means that there was an unregistered entity of that Template in the DB although this Template was already registered in the engine. This is an inconsistent state, and we need to figure out how we got there in the first place. It could happen in several use cases, the most common one is a Template which was registered to the setup only with part of its disks or part of its copies of the disk, using the partial_import flag. Is there a chance to reproduce this and send the full engine log including the Template creation so we can analyze what was the use case
I will reproduce it and send full logs, but I have to add that I tried also to register VM I created from Blank template, and I still received the same error and the import vm failed.
(In reply to Lilach Zitnitski from comment #3) > I will reproduce it and send full logs, but I have to add that I tried also > to register VM I created from Blank template, and I still received the same > error and the import vm failed. Thanks Lilach, I've eventually found the issue and sent a patch. Thanks again for the help
-------------------------------------- Tested with the following code: ---------------------------------------- rhvm-4.2.0-0.6.el7.noarch vdsm-4.20.9-1.el7ev.x86_64 Tested with the following scenario: Steps to Reproduce: 1. create vm with disk 2. move to maintenance the storage domain where the vm's disk is located 3. deactivate and detach the storage domain 4. attach to a different dc 5. try to import the vm Actual results: VM is imported Expected results: Moving to VERIFIED!
This bugzilla is included in oVirt 4.2.0 release, published on Dec 20th 2017. Since the problem described in this bug report should be resolved in oVirt 4.2.0 release, published on Dec 20th 2017, it has been closed with a resolution of CURRENT RELEASE. If the solution does not work for you, please open a new bug report.