<div dir="ltr">Hi,<div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Sep 29, 2014 at 2:08 PM, Hamada, Ondrej <span dir="ltr"><<a href="mailto:ondrej.hamada@acision.com" target="_blank">ondrej.hamada@acision.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div lang="EN-US" link="#0563C1" vlink="#954F72">
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<p class="MsoNormal">I’m trying to figure out how to force the virtual machines based on one template to deploy always together on a single node. A scenario:<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I have four nodes. I need to deploy five VMs related to each other. I want all the five to be deployed on the same host. Little bit later I need to deploy another set of five VMs. I want all the five of them to be deployed on a single node,
but it should be different node then the preceding set of five VMs was deployed on.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Speaking in terms of available scheduler policies is combination of packing and stripping. First use the stripping – find the node with highest count of available resources and then packing – deploy the VMs on same node.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Is this even possible in OpenNebula?<u></u><u></u></p>
<p class="MsoNormal"><u></u></p></div></div></blockquote></div><br></div><div class="gmail_extra">What you describe cannot be done automatically in OpenNebula. You can make use of the CURRENT_VMS [1] requirement variable, but this requires some manual setup:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Let's say the IDs for group 1 are 10..14, and group 2 IDs are 15..19.</div><div class="gmail_extra"><br></div><div class="gmail_extra">Set the SCHED_REQUIREMENTS to "CURRENT_VMS=10" for VMs 11..14, and "CURRENT_VMS=15" for 16..19.</div><div class="gmail_extra">This will make each group to be deployed in the same host.</div><div class="gmail_extra"><br></div><div class="gmail_extra">If you also set "CURRENT_VMS != 10" for VM 15, the second group will not be deployed in the same host as the first one.</div><div class="gmail_extra"><br></div><div class="gmail_extra">This can be done from the same template. Each time you instantiate, the second param can be a path to an extra file that will be merged with the existing Template [2].</div><div class="gmail_extra"><br></div><div class="gmail_extra">Regards</div><div class="gmail_extra"><br></div><div class="gmail_extra">[1] <a href="http://docs.opennebula.org/4.8/user/references/template.html#requirement-expression-syntax">http://docs.opennebula.org/4.8/user/references/template.html#requirement-expression-syntax</a><br></div><div class="gmail_extra">[2] <a href="http://docs.opennebula.org/4.8/user/virtual_resource_management/vm_guide.html#instantiating-templates">http://docs.opennebula.org/4.8/user/virtual_resource_management/vm_guide.html#instantiating-templates</a><br></div><div class="gmail_extra"><br class="">--<br><div>Carlos Martín, MSc<br>Project Engineer</div><div>OpenNebula - Flexible Enterprise Cloud Made Simple<br><div><span style="border-collapse:collapse;color:rgb(136,136,136);font-family:arial,sans-serif;font-size:13px"><a href="http://www.opennebula.org/" target="_blank">www.OpenNebula.org</a> | <a href="mailto:cmartin@opennebula.org" target="_blank">cmartin@opennebula.org</a> | <a href="http://twitter.com/opennebula" target="_blank">@OpenNebula</a></span></div></div></div></div>