Description of problem: BZ1933238 adds the functionality of migrate between clusters through the ovirt_vm ansible collection, however the destination host needs to be specified for the migration to work. # ansible localhost -c localhost -m ovirt.ovirt.ovirt_vm -a "name=vm_1 cluster=cl_2 state=running migrate=true auth='url=https://<engine-fqdn>/ovirt-engine/api username=admin@internal password=<pass> insecure=true'" -v An exception occurred during task execution. To see the full traceback, use -vvv. The error was: ovirtsdk4.Error: Fault reason is "Operation Failed". Fault detail is "[Cannot update a VM in this status. Try stopping the VM first.]". HTTP response code is 409. localhost | FAILED! => { "changed": false, "msg": "Fault reason is \"Operation Failed\". Fault detail is \"[Cannot update a VM in this status. Try stopping the VM first.]\". HTTP response code is 409." } If you stop the vm and then run it, it works (the host is automatically chosen) I think that, for consistence, it should be possible to migrate not specifying the host and with the vm running. Version-Release number of selected component (if applicable): ovirt-engine-4.4.6.6-0.10.el8ev.noarch ovirt-ansible-collection-1.4.2-1.el8ev.noarch How reproducible: always Steps to Reproduce: 1. Have a running VM and try to migrate it to another cluster # ansible localhost -c localhost -m ovirt.ovirt.ovirt_vm -a "name=vm_1 cluster=cl_2 state=running migrate=true auth='url=https://<engine-fqdn>/ovirt-engine/api username=admin@internal password=<pass> insecure=true'" -v 2. Try again specifying the host and not specifying the host but with the vm stopped 3. Actual results: Error when trying to migrate with VM on and not host specified. Expected results: running VM successfully migrated with and without specifying the host (like when is not running) Additional info:
nack on any improvement in this area. If anything we should add a clear documentation to the ansible role warning that a cross cluster migration is unsupported and dangerous. See bug 1441632 for details.