Yes you could use affinity labels, can you remove hosts without breaking 
affinity? I had to set the affinity to soft/not enforcing when doing 
maintenance on hosts.

The only way to bulk add hosts is via the API/SDK.

The easiest would be ansible.

https://docs.ansible.com/ansible/latest/modules/ovirt_affinity_group_module.html#ovirt-affinity-group-module


https://docs.ansible.com/ansible/latest/modules/ovirt_affinity_label_module.html#ovirt-affinity-label-module



Regards,
                  Paul S.
________________________________
From: Alan G <alan+ov...@griff.me.uk>
Sent: 28 July 2020 13:02
To: Nardus Geldenhuys <nard...@gmail.com>
Cc: Staniforth, Paul <p.stanifo...@leedsbeckett.ac.uk>; users@ovirt.org 
<users@ovirt.org>
Subject: Re: [ovirt-users] Re: affinity/pool/fencing ?


Caution External Mail: Do not click any links or open any attachments unless 
you trust the sender and know that the content is safe.

You might find affinity labels are a better fit in this use case. It would 
allow you to add/remove/move hosts in the future much more quickly than hard 
coding affinity. But that still leaves the bulk configuration tasks.

The only way to do this quickly is with the REST API or one of the SDKs that 
leverage it.

You'd create the affinity labels in the web UI then assign the VMs using the 
API.


---- On Tue, 28 Jul 2020 12:43:43 +0100 Nardus Geldenhuys 
<nard...@gmail.com<mailto:nard...@gmail.com>> wrote ----

Hi Paul

Thanks for the response, easy way to add 100 VM's in your second step ?

Regards

Nar

On Tue, 28 Jul 2020 at 13:17, Staniforth, Paul 
<p.stanifo...@leedsbeckett.ac.uk<mailto:p.stanifo...@leedsbeckett.ac.uk>> wrote:
Hello Nar,
                   you can achieve this with 2 affinity rules, a positive and 
negative one.

In the cluster create the first affinity group VM affinity rule disabled HOST 
affinity rule positive  set enforcing mode. Then add the VMs and 2 Hosts to 
force them to run on these hosts.

In the cluster create the second affinity group VM affinity rule disabled  HOST 
affinity rule negative set enforcing mode. Then add the rest of the VMs and the 
2 Hosts to force them not to run on these hosts.

https://www.ovirt.org/documentation/vmm-guide/chap-Administrative_Tasks.html<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fdocumentation%2Fvmm-guide%2Fchap-Administrative_Tasks.html&data=02%7C01%7CP.Staniforth%40leedsbeckett.ac.uk%7Cdf4ab183550a4963e3cf08d832ee1d1f%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637315345553093116&sdata=s4mrlXWxhGTn3A0WbtZ25KPre11F93%2FqEw9TwJ1VbtM%3D&reserved=0>


Regards,

                 Paul S.



________________________________
From: Nardus Geldenhuys <nard...@gmail.com<mailto:nard...@gmail.com>>
Sent: 28 July 2020 11:22
To: users@ovirt.org<mailto:users@ovirt.org> 
<users@ovirt.org<mailto:users@ovirt.org>>
Subject: [ovirt-users] affinity/pool/fencing ?


Caution External Mail: Do not click any links or open any attachments unless 
you trust the sender and know that the content is safe.

Hi oVirt land

Hope you are well. Don't even know what to call this. But let me describe what 
I want to achieve.

We have a cluster with say 100 vm's. But we want two use two hosts in the 
cluster two run only certain VM's. I think you can do that with affinity rules. 
But how can I restrict those two hosts to only run the VM's, meaning that no 
other VM's will run on them.

I don't want to go and edit the 100 other VM's to not run on 2 hosts. Is there 
an easy way for doing this?

Oracle VM uses pools, I dont know what vmware uses.

Any advice will help.

Regards

Nar
To view the terms under which this email is distributed, please go to:-
http://leedsbeckett.ac.uk/disclaimer/email/<https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fleedsbeckett.ac.uk%2Fdisclaimer%2Femail%2F&data=02%7C01%7CP.Staniforth%40leedsbeckett.ac.uk%7Cdf4ab183550a4963e3cf08d832ee1d1f%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637315345553103073&sdata=8oLJEAZVtqHpA%2F7VG8tDDeA4Mgy0lHfKIZM2ekKlQyc%3D&reserved=0>


_______________________________________________
Users mailing list -- users@ovirt.org<mailto:users@ovirt.org>
To unsubscribe send an email to 
users-le...@ovirt.org<mailto:users-le...@ovirt.org>
Privacy Statement: 
https://www.ovirt.org/privacy-policy.html<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fprivacy-policy.html&data=02%7C01%7CP.Staniforth%40leedsbeckett.ac.uk%7Cdf4ab183550a4963e3cf08d832ee1d1f%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637315345553103073&sdata=0pWGpfZGoECWI4hXbVsUUbaqmXqIwjZSeE%2FQ34WrFdY%3D&reserved=0>
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ovirt.org%2Fcommunity%2Fabout%2Fcommunity-guidelines%2F&data=02%7C01%7CP.Staniforth%40leedsbeckett.ac.uk%7Cdf4ab183550a4963e3cf08d832ee1d1f%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637315345553113030&sdata=xThodOe5Oi0Q12pXn0AT4Y8f4mHyEEIap3pdRSb9drA%3D&reserved=0>
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/4V4DW7HI375CW4G75NJW3TIMNAZCP4NR/<https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.ovirt.org%2Farchives%2Flist%2Fusers%40ovirt.org%2Fmessage%2F4V4DW7HI375CW4G75NJW3TIMNAZCP4NR%2F&data=02%7C01%7CP.Staniforth%40leedsbeckett.ac.uk%7Cdf4ab183550a4963e3cf08d832ee1d1f%7Cd79a81124fbe417aa112cd0fb490d85c%7C0%7C0%7C637315345553113030&sdata=L8hIgtJj1J05aUZXrwH%2FvAhUef15KSaEnRtpzZ3eKx4%3D&reserved=0>


To view the terms under which this email is distributed, please go to:-
http://leedsbeckett.ac.uk/disclaimer/email/
_______________________________________________
Users mailing list -- users@ovirt.org
To unsubscribe send an email to users-le...@ovirt.org
Privacy Statement: https://www.ovirt.org/privacy-policy.html
oVirt Code of Conduct: 
https://www.ovirt.org/community/about/community-guidelines/
List Archives: 
https://lists.ovirt.org/archives/list/users@ovirt.org/message/4PCKAKVNUMEDHHEFR3OJRRFJPYABYBEL/

Reply via email to