Description of problem: If a VM had power state ON while its provider was removed, the power state will stay ON for such VM even after the VM becomes Orphaned. Version-Release number of selected component (if applicable): CFME 5.9.2.3 RHV 4.2.2.5 How reproducible: 100 % Steps to Reproduce: 1. Add a RHV provider to CFME. 2. Provision a VM from template (vm_orphaned in my case). 3. Wait for the provisioning to end. Make sure that the VM is ON and that CFME registers its power state as ON. 4. Remove your infrastructure provider from inventory. 5. Find you VM in CFME UI and make sure it's state is orphaned. 6. Go to its summary page and check its power state. 7. Also check its power state in vmdb_production DB (SELECT * FROM vms WHERE name = '<your_vm_name>'. Actual results: Both in UI and in DB the power state of such orphaned VM is ON. Expected results: I believe such a statement makes no sense. The only source of information about VM for CFME is the provider. If the VM is Orphaned (i.e. lost its provider), there is no way how CFME could know that the power state is on. In reality, from the point of view of CFME, the power state for an Orphaned VM should be unknown. If we want to display _last known_ power state, it should be in some different field. However I cannot see much use for such information.
This problem also occurs on CFME 5.10.0.17, therefore a clone should be created.