<div dir="ltr">Hi oVirt Masters !!!<div><br></div><div>I create Affinity Rules with sucess using REST API as Martin Sivak wrote on <a href="https://www.ovirt.org/blog/2016/07/affinity-labels">https://www.ovirt.org/blog/2016/07/affinity-labels</a></div><div><br></div><div>I only want to tell him ( and all others users ) that the URL to check on his blog is not right ( or at least nomore ).</div><div><br></div><div>Wrong way : ( Do not list hosts on affinitylabels - Original as wrote on Martin Blogs - <span style="background-color:transparent;color:inherit;font-family:menlo,monaco,consolas,"courier new",monospace;font-size:inherit;white-space:pre-wrap">$ cengine -f <a href="http://localhost:8080/ovirt-engine/api/affinitylabels">http://localhost:8080/ovirt-engine/api/affinitylabels</a> | jq -r '.affinity_label[] | {id, name, vms, hosts}'</span>)</div><div><br></div><div><div>[root@hlg-rbs-ovirt01-poa ~]# cengine -f <a href="https://hlg-rbs-ovirt01-poa.rbs.com.br/ovirt-engine/api/affinitylabels">https://hlg-rbs-ovirt01-poa.rbs.com.br/ovirt-engine/api/affinitylabels</a> </div><div>{</div><div> "affinity_label" : [ {</div><div> "read_only" : "false",</div><div> "name" : "DATACENTER_TV",</div><div> "href" : "/ovirt-engine/api/affinitylabels/37f59ae4-2c63-46ac-a126-aa75b5be3437",</div><div> "id" : "37f59ae4-2c63-46ac-a126-aa75b5be3437",</div><div> "link" : [ {</div><div> "href" : "/ovirt-engine/api/affinitylabels/37f59ae4-2c63-46ac-a126-aa75b5be3437/hosts",</div><div> "rel" : "hosts"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/affinitylabels/37f59ae4-2c63-46ac-a126-aa75b5be3437/vms",</div><div> "rel" : "vms"</div><div> } ]</div><div> }, {</div><div> "read_only" : "false",</div><div> "name" : "DATACENTER_CORP",</div><div> "href" : "/ovirt-engine/api/affinitylabels/cecf7ac2-3128-443a-8d90-26f90bfca99d",</div><div> "id" : "cecf7ac2-3128-443a-8d90-26f90bfca99d",</div><div> "link" : [ {</div><div> "href" : "/ovirt-engine/api/affinitylabels/cecf7ac2-3128-443a-8d90-26f90bfca99d/hosts",</div><div> "rel" : "hosts"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/affinitylabels/cecf7ac2-3128-443a-8d90-26f90bfca99d/vms",</div><div> "rel" : "vms"</div><div> } ]</div><div> } ]</div></div><div><br></div><div>For me the right way are : </div><div><br></div><div><div>[root@hlg-rbs-ovirt01-poa ~]# export DATACENTER_CORP=cecf7ac2-3128-443a-8d90-26f90bfca99d</div><div>[root@hlg-rbs-ovirt01-poa ~]# cengine -f <a href="https://hlg-rbs-ovirt01-poa.rbs.com.br/ovirt-engine/api/affinitylabels/">https://hlg-rbs-ovirt01-poa.rbs.com.br/ovirt-engine/api/affinitylabels/</a><font color="#ff0000">$DATACENTER_CORP/hosts</font></div><div>{</div><div> "host" : [ {</div><div> "href" : "/ovirt-engine/api/hosts/f527f077-dd27-46d2-bd39-3f157177277e",</div><div> "id" : "f527f077-dd27-46d2-bd39-3f157177277e"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/f9c9d929-b460-4102-bb29-de1e6ad6ad72",</div><div> "id" : "f9c9d929-b460-4102-bb29-de1e6ad6ad72"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/02ead14e-0208-4a74-b1c2-4c19383820f9",</div><div> "id" : "02ead14e-0208-4a74-b1c2-4c19383820f9"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/ffde7cb6-30db-4d77-872d-ef4e1b3d1a8e",</div><div> "id" : "ffde7cb6-30db-4d77-872d-ef4e1b3d1a8e"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/5feddfba-d7b2-423e-a946-ac2bf36906fa",</div><div> "id" : "5feddfba-d7b2-423e-a946-ac2bf36906fa"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/7d9cab91-703d-432d-b5da-91e122950794",</div><div> "id" : "7d9cab91-703d-432d-b5da-91e122950794"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/cd5e5f1d-6c8b-49ad-a9ab-4f2fc3fedbb8",</div><div> "id" : "cd5e5f1d-6c8b-49ad-a9ab-4f2fc3fedbb8"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/45b93272-7bfd-4d9a-b934-75c4a9b9514e",</div><div> "id" : "45b93272-7bfd-4d9a-b934-75c4a9b9514e"</div><div> }, {</div><div> "href" : "/ovirt-engine/api/hosts/0ccedcb2-33ab-43be-9218-7743d711bc18",</div><div> "id" : "0ccedcb2-33ab-43be-9218-7743d711bc18"</div><div> } ]</div></div><div><br></div><div>I am using oVirt 4.0.6.</div><div><br></div><div>Thanks.</div><div><br><br><div class="gmail_quote"><div dir="ltr">Em qui, 24 de nov de 2016 às 13:01, Roy Golan <<a href="mailto:rgolan@redhat.com">rgolan@redhat.com</a>> escreveu:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr" class="gmail_msg">Affinity labels [1] will allow you to label the hosts and vms to site1 and site2 and that should be it.</p>
<p dir="ltr" class="gmail_msg">- create label per site<br class="gmail_msg">
- add the redpective label to each vm and host</p>
<p dir="ltr" class="gmail_msg">Unfortunately there is no UI for that but with SDK or rest it's easy</p>
<p dir="ltr" class="gmail_msg">[1] <a href="https://www.ovirt.org/blog/2016/07/affinity-labels/" class="gmail_msg" target="_blank">https://www.ovirt.org/blog/2016/07/affinity-labels/</a></p>
<div class="gmail_extra gmail_msg"><br class="gmail_msg"><div class="gmail_quote gmail_msg"></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg">On Nov 24, 2016 3:12 PM, "Rogério Ceni Coelho" <<a href="mailto:rogeriocenicoelho@gmail.com" class="gmail_msg" target="_blank">rogeriocenicoelho@gmail.com</a>> wrote:<br type="attribution" class="gmail_msg"></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="gmail_msg">Hi Ovirt Jedi´s !!!<div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">First of all, congrats about the product !!! I love Ovirt !!!<br class="gmail_msg"><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I am using Ovirt 4.0.4 with 10 hosts and 58 virtual machines on two Active-Active Datacenters using two EMC Vplex + two EMC VNX5500 + eight Dell Blades + 8 Dell PowerEdge M610 and two M620 Servers.</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Half servers are on Site 1 and Half servers on Site 2. The same with VMs. All Sites work as one and have redundant network, storage, power, etc etc etc ...</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">I want to know what is the best way to set that VM number 1 runs on Site 1 and VM number 2 runs on Site 2 ?</div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">On Vmware 5.1 we use DRS Group Manager and on Hyper-V we use Custom Properties on hosts and on VMs. What we use on oVirt without segregate on two different Datacenters or two different clusters ?</div></div><div class="gmail_msg"><br class="gmail_msg"></div><div class="gmail_msg">Thanks in advance.</div></div>
<br class="gmail_msg"></blockquote></div></div><div class="gmail_extra gmail_msg"><div class="gmail_quote gmail_msg"><blockquote class="gmail_quote gmail_msg" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">_______________________________________________<br class="gmail_msg">
Users mailing list<br class="gmail_msg">
<a href="mailto:Users@ovirt.org" class="gmail_msg" target="_blank">Users@ovirt.org</a><br class="gmail_msg">
<a href="http://lists.ovirt.org/mailman/listinfo/users" rel="noreferrer" class="gmail_msg" target="_blank">http://lists.ovirt.org/mailman/listinfo/users</a><br class="gmail_msg">
<br class="gmail_msg"></blockquote></div></div>
</blockquote></div></div></div>