Description of problem: According to API it is possible to set PlacementPolicy with a list of Hosts. http://ovirt.github.io/ovirt-engine-api-model/4.4/#types/vm_placement_policy It is also possible to mark specific hosts in the GUI. The ovirt_vm module does not allow that, the placement_policy parameter is a string that relates to the parameter "host" which is a string as well. It is not possible to define several hosts. According to an upstream issue[1] already reported the solution should be to separate the host parameter from the placement_policy and make placement_policy a dict (affinity and hosts). [1] https://github.com/oVirt/ovirt-ansible-collection/issues/200 Version-Release number of selected component (if applicable): How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Unable to set multiple hosts with placement_policy Expected results: It should be possible to select multiple hosts when placement_policy affinity is set to "pinned". Additional info:
Verified on Installed Packages ovirt-ansible-collection.noarch 1.5.3-1.el8ev @rhv-4.4.7 ... - name: Add placement policy with multiple hosts ovirt.ovirt.ovirt_vm: auth: "{{ ovirt_auth }}" name: vm_1 placement_policy: pinned placement_policy_hosts: - host_1 - host_2 ....
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory (Low: RHV Engine and Host Common Packages security update [ovirt-4.4.7]), and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHSA-2021:2866