Sorry I don't think it fit our use case.

We'd like to have 4 VMs

1 VM with role "LVS", no problem here, using a lvs VM template
3 VM with role "WEB", using a web VM template. I need to set explicitly
their hostnames, no digit allowed (let's say obfuscated-vm-name-a,
obfuscated-vm-name-b and obfuscated-vm-name-ab)

how do I set each hostname in the service template?

Le Fri Jan 23 2015 at 12:11:07, Carlos Martín Sánchez <
cmar...@opennebula.org> a écrit :

> Hi there,
>
> On Thu, Jan 22, 2015 at 2:18 PM, Madko <madk...@gmail.com> wrote:
>
> How do you set hostname to VMs inside roles when you can't use numeric
>> hostname (ie hostname%i)?
>
>
> You can use the VM ID inside the context, the following works for me:
> "CONTEXT = [ HOSTNAME = TEST_$VMID ]"
>
> Or the VM name. This VM name can be changed the vm_name_template option in
> oneflow-server.conf [1].
> "CONTEXT = [ HOSTNAME = $NAME ]"
>
> Does it fit your use case?
>
> Regards
>
> [1]
> http://docs.opennebula.org/4.10/advanced_administration/application_flow_and_auto-scaling/appflow_configure.html
>
> --
> Carlos Martín, MSc
> Project Engineer
> OpenNebula - Flexible Enterprise Cloud Made Simple
> www.OpenNebula.org | cmar...@opennebula.org | @OpenNebula
> <http://twitter.com/opennebula> <cmar...@opennebula.org>
>
> On Thu, Jan 22, 2015 at 2:18 PM, Madko <madk...@gmail.com> wrote:
>
>> That's what we were doing untill now, service template with 10 or more VM
>> and therefor 10 or more roles (1:1 ratio) are not really convenient. But
>> thanks for your suggestion. Maybe I'm missing something. Is it possible to
>> change vm_template_contents to some sort of array? How do you set hostname
>> to VMs inside roles when you can't use numeric hostname (ie hostname%i)?
>>
>> best regards
>>
>> Le Thu Jan 22 2015 at 11:25:29, Carlos Martín Sánchez <
>> cmar...@opennebula.org> a écrit :
>>
>> Hi,
>>>
>>> On Wed, Jan 21, 2015 at 3:29 PM, Madko <madk...@gmail.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> is there a way to overload the vm_template_contents of only one
>>>> specific VM in a role? I'd like to fix the hostnames.
>>>> I only manage to overload the context of all the VMs in one role.
>>>>
>>>> best regards,
>>>>
>>>
>>> Maybe you can create a new role with the same template, and cardinality
>>> 1.
>>> Would that work for you?
>>>
>>> Regards
>>> --
>>> Carlos Martín, MSc
>>> Project Engineer
>>> OpenNebula - Flexible Enterprise Cloud Made Simple
>>> www.OpenNebula.org <http://www.opennebula.org/> | cmar...@opennebula.org
>>>  | @OpenNebula <http://twitter.com/opennebula> <cmar...@opennebula.org>
>>>
>>>
>>>
>
_______________________________________________
Users mailing list
Users@lists.opennebula.org
http://lists.opennebula.org/listinfo.cgi/users-opennebula.org

Reply via email to