When a virtual machine has been transformed from VMware to RHV, we want to prevent the original virtual machine from starting, in order to avoid conflict between source and destination VM. A control policy could implement that.
https://github.com/ManageIQ/manageiq/pull/17389
https://github.com/ManageIQ/manageiq-content/pull/324
https://github.com/ManageIQ/manageiq-automation_engine/pull/186
New commits detected on ManageIQ/manageiq/master: https://github.com/ManageIQ/manageiq/commit/75b03cb810056add77e261c309b5ef2f4bdb9f16 commit 75b03cb810056add77e261c309b5ef2f4bdb9f16 Author: Lucy Fu <lufu> AuthorDate: Wed Jun 6 09:02:27 2018 -0400 Commit: Lucy Fu <lufu> CommitDate: Wed Jun 6 09:02:27 2018 -0400 Add new tag category and entry /transformation_status/migrated. https://bugzilla.redhat.com/show_bug.cgi?id=1565199 db/fixtures/classifications.yml | 17 + 1 file changed, 17 insertions(+) https://github.com/ManageIQ/manageiq/commit/7a46dd2e9fde7c611fc6641143d035da06160f1d commit 7a46dd2e9fde7c611fc6641143d035da06160f1d Author: Lucy Fu <lufu> AuthorDate: Mon May 7 13:53:35 2018 -0400 Commit: Lucy Fu <lufu> CommitDate: Mon May 7 13:53:35 2018 -0400 Add built in policy to prevent transformed VM from starting. https://bugzilla.redhat.com/show_bug.cgi?id=1565199 app/models/service_template_transformation_plan_task.rb | 4 + product/policy/built_in_policies.yml | 13 + spec/models/service_template_transformation_plan_task_spec.rb | 7 + 3 files changed, 24 insertions(+)
New commit detected on ManageIQ/manageiq-content/master: https://github.com/ManageIQ/manageiq-content/commit/79dfbbe7d863e0c078522ca71e367cfa7bf34e9f commit 79dfbbe7d863e0c078522ca71e367cfa7bf34e9f Author: Lucy Fu <lufu> AuthorDate: Wed Jun 6 09:03:27 2018 -0400 Commit: Lucy Fu <lufu> CommitDate: Wed Jun 6 09:03:27 2018 -0400 Tag migrated VM. https://bugzilla.redhat.com/show_bug.cgi?id=1565199 content/automate/ManageIQ/Transformation/Infrastructure/VM/vmwarews.class/__methods__/setmigrated.rb | 8 +- 1 file changed, 6 insertions(+), 2 deletions(-)
New commit detected on ManageIQ/manageiq-automation_engine/master: https://github.com/ManageIQ/manageiq-automation_engine/commit/79f36c8f133d583aeb38f821d788a0b0f4eca265 commit 79f36c8f133d583aeb38f821d788a0b0f4eca265 Author: Lucy Fu <lufu> AuthorDate: Wed Jun 6 12:39:51 2018 -0400 Commit: Lucy Fu <lufu> CommitDate: Wed Jun 6 12:39:51 2018 -0400 Expose task.mark_vm_migrated to Service. https://bugzilla.redhat.com/show_bug.cgi?id=1565199 lib/miq_automation_engine/service_models/miq_ae_service_service_template_transformation_plan_task.rb | 1 + 1 file changed, 1 insertion(+)
Verified in 5.10.0.4.20180712211305_e6e4542. Builtin policy works as expected, original vm doesn't start after migration.