Hi,

A new parameter will be added to endpoint '/ovirt-engine/api/hosts' in 4.3,
'migration_target_of' which lists exactly that.
Here is the documentation:
http://ovirt.github.io/ovirt-engine-api-model/4.3/#services/hosts/methods/list/parameters/migration_target_of

I don't think it can be done using the 4.2 API.


Andrej

On Tue, 16 Oct 2018 at 14:00, Hari Prasanth Loganathan <
[email protected]> wrote:

> Hi Guys,
>
> 1) I have an use case in affinity rule, say
>   i) I have two VMs and two Hosts
>  ii) I created a affinity group, which has the Vm to Vm affinity rule as
> negative
>
>   so when I start the both the VMs, One Vm settled in one Host and another
> VM settled in another Host
>
> 2) Now I try to migrate one of the VM from Host 1 to Host 2, It is
> throwing an error saying It violates affinity rule (since Vm to Vm affinity
> rule as negative)
>
> I agree the use case is correct and working as expected.
>
> I see the ovirt API as https://{BASE_URL}/ovirt-engine/api/hosts, which
> list all the hosts available, Is there an API which list only the host
> applicable for VM migration for the VM ?
>
> Thanks,
> Hari
>
>
>
>
> I need an API to
>
>
>
>
> On Tue, Oct 16, 2018 at 12:52 PM Martin Sivak <[email protected]> wrote:
>
>> Hi,
>>
>> > "hosts_rule": {"enabled": "true", "enforcing": "true", "positive":
>> "false" },
>>
>> Notice positive: false. You created a rule which repels those VMs from
>> the host you selected.
>>
>> Martin
>>
>> On Tue, Oct 16, 2018 at 7:47 AM, Hari Prasanth Loganathan
>> <[email protected]> wrote:
>> > Hi Team,
>> >
>> > Affinity rule is not working as expected, I created a affinity group and
>> > added two VMs and one host (say TestHost2) (NOTE : two hosts available)
>> with
>> > following configuration
>> >
>> >            "enforcing": "true",
>> >             "hosts_rule": {
>> >                 "enabled": "true",
>> >                 "enforcing": "true",
>> >                 "positive": "false"
>> >             },
>> >             "positive": "true",
>> >             "vms_rule": {
>> >                 "enabled": "true",
>> >                 "enforcing": "true",
>> >                 "positive": "true"
>> >             },
>> >
>> > But both the VMs are coming up in TestHost1, Am I missing something?
>> >
>> > Thanks,
>> > Hari
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > On Mon, Oct 15, 2018 at 4:05 PM Martin Sivak <[email protected]> wrote:
>> >>
>> >> >             I have found that migration doesn't  work when using
>> >> > vms_rule Enforcing Hard.
>> >> > Scenario vms in an affinity group with Enforcing Hard no host members
>> >> > when trying to migrate vms it comes back with no host to migrate to
>> even
>> >> > when selecting all vms in the affinity group.
>> >>
>> >> Yes you are right, the engine checks one by one. We do not support
>> >> group migration in the scheduler. It was never considered important
>> >> enough to offset the development costs (the internal architecture
>> >> would have to change significantly). The workaround is to relax the
>> >> affinity rule a bit first, do the migration and restore the affinity
>> >> rule.
>> >>
>> >> Martin Sivak
>> >>
>> >> On Mon, Oct 15, 2018 at 12:13 PM, Staniforth, Paul
>> >> <[email protected]> wrote:
>> >> > Hello,
>> >> >             I have found that migration doesn't  work when using
>> >> > vms_rule Enforcing Hard.
>> >> > Scenario vms in an affinity group with Enforcing Hard no host members
>> >> > when trying to migrate vms it comes back with no host to migrate to
>> even
>> >> > when selecting all vms in the affinity group.
>> >> >
>> >> > Regards,
>> >> >                   Paul S.
>> >> > ________________________________________
>> >> > From: Martin Sivak <[email protected]>
>> >> > Sent: 15 October 2018 09:43
>> >> > To: Darrell Budic
>> >> > Cc: Ovirt Users
>> >> > Subject: [ovirt-users] Re: Affinity rules in ovirt
>> >> >
>> >> > Hi,
>> >> >
>> >> >> 3) What is the difference between VM to VM affinity and VM to Host
>> >> >> affinity?
>> >> >
>> >> > - VM - VM rule expresses the relationship of all running VMs from the
>> >> > specified list to each other.
>> >> > - VM - Host rule describes the relationship of all running VMs from
>> >> > the list to the selected hosts
>> >> >
>> >> >> Say I have 2 hosts, so what happens in case of failure of host
>> running
>> >> >> the VMs?
>> >> >
>> >> > VMs that are not up are not considered by scheduler. So it will
>> >> > (assuming those are highly available VMs) start the first VM
>> somewhere
>> >> > and then the second VM will be started at the same host where the
>> >> > first one is running.
>> >> >
>> >> >> Enforcing will keep the scheduler from launching a VM if it can’t
>> meet
>> >> >> those
>> >> >> criteria, and will try and make changes to which hosts are running
>> >> >> where if
>> >> >> it can. If you don’t set it, it will still try and launch VMs on
>> >> >> different
>> >> >> hosts, but if it can’t, it will still launch the VM.
>> >> >
>> >> > Correct.
>> >> >
>> >> >> It also won’t make
>> >> >> changes to bring all VMs into compliance with the Affinity rules,
>> from
>> >> >> what
>> >> >> I can tel.
>> >> >
>> >> > It will try that too, but rather less aggressively.
>> >> >
>> >> >
>> >> > Best regards
>> >> >
>> >> > Martin Sivak
>> >> >
>> >> > On Sun, Oct 14, 2018 at 7:59 PM, Darrell Budic <
>> [email protected]>
>> >> > wrote:
>> >> >> VM to VM affinity will try and run the VMs on the same host if
>> >> >> positive, and
>> >> >> different hosts if negative.
>> >> >>
>> >> >> VM to Host affinity will try and run the VM on a specific set of
>> Hosts
>> >> >> if
>> >> >> positive, and not on those hosts if negative.
>> >> >>
>> >> >> Enforcing will keep the scheduler from launching a VM if it can’t
>> meet
>> >> >> those
>> >> >> criteria, and will try and make changes to which hosts are running
>> >> >> where if
>> >> >> it can. If you don’t set it, it will still try and launch VMs on
>> >> >> different
>> >> >> hosts, but if it can’t, it will still launch the VM. It also won’t
>> make
>> >> >> changes to bring all VMs into compliance with the Affinity rules,
>> from
>> >> >> what
>> >> >> I can tel.
>> >> >>
>> >> >> On Oct 14, 2018, at 8:15 AM, Hari Prasanth Loganathan
>> >> >> <[email protected]> wrote:
>> >> >>
>> >> >> Hi Team,
>> >> >>
>> >> >> I tried to follow up the affinity rules using this tutorial :
>> >> >> https://www.youtube.com/watch?v=rs_5BSqacWE but I have few
>> >> >> clarifications in
>> >> >> it.,
>> >> >>
>> >> >> 1) I understand the VM to VM affinity, It means both the individual
>> VMs
>> >> >> needs to run on a single common host, Say I have 2 hosts, so what
>> >> >> happens in
>> >> >> case of failure of host running the VMs?
>> >> >> 2)  If I create a affinity group and I get the following data,
>> >> >>                 i) What is host rule / vms rule - enabled, enforcing
>> >> >> and
>> >> >> positive ?
>> >> >>
>> >> >>           "enforcing": "true",
>> >> >>             "hosts_rule": {
>> >> >>                 "enabled": "true",
>> >> >>                 "enforcing": "true",
>> >> >>                 "positive": "false"
>> >> >>             },
>> >> >>             "vms_rule": {
>> >> >>                 "enabled": "false",
>> >> >>                 "enforcing": "true",
>> >> >>                 "positive": "false"
>> >> >>             }
>> >> >>
>> >> >> 3) What is the difference between VM to VM affinity and VM to Host
>> >> >> affinity?
>> >> >>
>> >> >> Doc's are not very clear, so please any help is appreciated.
>> >> >>
>> >> >> Thanks,
>> >> >> Hari
>> >> >>
>> >> >>
>> >> >>
>> >> >> DISCLAIMER - MSysTechnologies LLC
>> >> >>
>> >> >>
>> >> >> This email message, contents and its attachments may contain
>> >> >> confidential,
>> >> >> proprietary or legally privileged information and is intended solely
>> >> >> for the
>> >> >> use of the individual or entity to whom it is actually intended. If
>> you
>> >> >> have
>> >> >> erroneously received this message, please permanently delete it
>> >> >> immediately
>> >> >> and notify the sender. If you are not the intended recipient of the
>> >> >> email
>> >> >> message,you are notified strictly not to disseminate,distribute or
>> copy
>> >> >> this
>> >> >> e-mail.E-mail transmission cannot be guaranteed to be secure or
>> >> >> error-free
>> >> >> as Information could be intercepted, corrupted, lost, destroyed,
>> >> >> incomplete
>> >> >> or contain viruses and MSysTechnologies LLC accepts no liability for
>> >> >> the
>> >> >> contents and integrity of this mail or for any damage caused by the
>> >> >> limitations of the e-mail transmission.
>> >> >>
>> >> >>
>> >> >> _______________________________________________
>> >> >> Users mailing list -- [email protected]
>> >> >> To unsubscribe send an email to [email protected]
>> >> >> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> >> >> oVirt Code of Conduct:
>> >> >> https://www.ovirt.org/community/about/community-guidelines/
>> >> >> List Archives:
>> >> >>
>> >> >>
>> https://lists.ovirt.org/archives/list/[email protected]/message/ST35SIO45EO647BJKUVCUZQBRSAHAUSA/
>> >> >>
>> >> >>
>> >> >>
>> >> >> _______________________________________________
>> >> >> Users mailing list -- [email protected]
>> >> >> To unsubscribe send an email to [email protected]
>> >> >> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> >> >> oVirt Code of Conduct:
>> >> >> https://www.ovirt.org/community/about/community-guidelines/
>> >> >> List Archives:
>> >> >>
>> >> >>
>> https://lists.ovirt.org/archives/list/[email protected]/message/GXWG7ICW2YN7HZKWVVMRLO53YAIA5DCI/
>> >> >>
>> >> > _______________________________________________
>> >> > Users mailing list -- [email protected]
>> >> > To unsubscribe send an email to [email protected]
>> >> > Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> >> > oVirt Code of Conduct:
>> >> > https://www.ovirt.org/community/about/community-guidelines/
>> >> > List Archives:
>> >> >
>> https://lists.ovirt.org/archives/list/[email protected]/message/7R6KZVHKVGGTMRLMYKF4PO2GR32QMIXC/
>> >> > To view the terms under which this email is distributed, please go
>> to:-
>> >> > http://disclaimer.leedsbeckett.ac.uk/disclaimer/disclaimer.html
>> >> _______________________________________________
>> >> Users mailing list -- [email protected]
>> >> To unsubscribe send an email to [email protected]
>> >> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
>> >> oVirt Code of Conduct:
>> >> https://www.ovirt.org/community/about/community-guidelines/
>> >> List Archives:
>> >>
>> https://lists.ovirt.org/archives/list/[email protected]/message/4C73WN55VN2CNZCM6JIATRHJU77EFCRO/
>> >
>> >
>> > DISCLAIMER - MSysTechnologies LLC
>> >
>> > This email message, contents and its attachments may contain
>> confidential,
>> > proprietary or legally privileged information and is intended solely
>> for the
>> > use of the individual or entity to whom it is actually intended. If you
>> have
>> > erroneously received this message, please permanently delete it
>> immediately
>> > and notify the sender. If you are not the intended recipient of the
>> email
>> > message,you are notified strictly not to disseminate,distribute or copy
>> this
>> > e-mail.E-mail transmission cannot be guaranteed to be secure or
>> error-free
>> > as Information could be intercepted, corrupted, lost, destroyed,
>> incomplete
>> > or contain viruses and MSysTechnologies LLC accepts no liability for the
>> > contents and integrity of this mail or for any damage caused by the
>> > limitations of the e-mail transmission.
>>
>
> DISCLAIMER - *MSysTechnologies LLC*
>
> This email message, contents and its attachments may contain confidential,
> proprietary or legally privileged information and is intended solely for
> the use of the individual or entity to whom it is actually intended. If you
> have erroneously received this message, please permanently delete it
> immediately and notify the sender. If you are not the intended recipient of
> the email message,you are notified strictly not to disseminate,distribute
> or copy this e-mail.E-mail transmission cannot be guaranteed to be secure
> or error-free as Information could be intercepted, corrupted, lost,
> destroyed, incomplete or contain viruses and MSysTechnologies LLC accepts
> no liability for the contents and integrity of this mail or for any damage
> caused by the limitations of the e-mail transmission.
>
> _______________________________________________
> Users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> Privacy Statement: https://www.ovirt.org/site/privacy-policy/
> oVirt Code of Conduct:
> https://www.ovirt.org/community/about/community-guidelines/
> List Archives:
> https://lists.ovirt.org/archives/list/[email protected]/message/6N4XNEMB34KVCKEZFJQRNDBAL237OBDX/
>
_______________________________________________
Users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
Privacy Statement: https://www.ovirt.org/site/privacy-policy/
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/[email protected]/message/3MNFI5IL47O2M7EW5RSN6EOEJ3PQKPH2/

Reply via email to