Title mentioned that this was reproduced with CFME 5.10 and RHV 4.1, but 5.10 should be used only with RHV 4.2 (we have never tested 4.1). Could you please try to reproduce with 5.10 and RHV 4.2?
This Bug confuses me, Reading David H's message, the orphan vs archive is working as designed. It is also the first thing I checked when looking through this BZ. If the vm is still assigned a storage, it is classified as orphaned, if not, it is classified as archived. So apparently, when the vm disappears, the storage association is not removed from the vm. So if you want it to be classified as archived, the storages_vms_and_templates records will need to be deleted. If the storage has been deleted, then fixing this seems straight forward. If the storage still exist, I'm not sure how we know to remove the associated storage. That seems to go against the way this typically works.
https://github.com/ManageIQ/manageiq/pull/18330
I am not able to get rhv42 environment. hence not tested this BZ with rhv42. Once I get rhv42 environment, I will test and report BZ If I find any issue. So I am verifying this BZ. Thank you.
I confirm this works for 5.10.0.31.20190108221820_a0968c8 and rhv42.