# Choose the name of VM deployed by service

**URL:** https://forum.opennebula.io/t/choose-the-name-of-vm-deployed-by-service/3833
**Category:** Product Support
**Created:** [February 20, 2017, 12:58pm UTC](https://forum.opennebula.io/t/choose-the-name-of-vm-deployed-by-service/3833 "2017-02-20T12:58:09Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Brice](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/brice/32/5070_2.png) [@Brice](https://forum.opennebula.io/u/Brice)
#### Post date: [February 20, 2017, 12:58pm UTC](https://forum.opennebula.io/t/choose-the-name-of-vm-deployed-by-service/3833/1 "2017-02-20T12:58:09Z")

</div>

Hello,  
I would like to know how to choose the name of my VM deployed by Service Template.  
I have a naming convention of type:  
FR-USER-PROD  
US-USER-PROD  
(User = client)  
To deploy a single VM, I indicate the name of my VM and it works with, in the template:  
SET\_HOSTNAME = “$ NAME”,  
But if I create a service that deploys 2 VM, I do not have the choice of naming.  
I can only configure:  
Vm\_name\_template: $ SERVICE\_NAME- $ ROLE\_NAME  
SERVICE\_NAME = CLIENT  
ROLE\_NAME = PROD  
How do I customize this?  
In addition, the name of the VM on the vCenter must be the same as the name of the hostname.  
So I have to remove the “one-ID” in front of the name.  
Can you help me ?

---

<div class="post-metadata">

### Author: ![Brice](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/brice/32/5070_2.png) [@Brice](https://forum.opennebula.io/u/Brice)
#### Post date: [February 21, 2017, 9:01am UTC](https://forum.opennebula.io/t/choose-the-name-of-vm-deployed-by-service/3833/2 "2017-02-21T09:01:41Z")

</div>

Help me please ?

---

<div class="post-metadata">

### Author: ![tinova](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/tinova/32/25_2.png) [@tinova](https://forum.opennebula.io/u/tinova)
#### Post date: [February 23, 2017, 3:11pm UTC](https://forum.opennebula.io/t/choose-the-name-of-vm-deployed-by-service/3833/3 "2017-02-23T15:11:44Z")

</div>

Quick question, are you using VMware or KVM under the hood?

---

<div class="post-metadata">

### Author: ![Brice](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/brice/32/5070_2.png) [@Brice](https://forum.opennebula.io/u/Brice)
#### Post date: [August 24, 2017, 8:09am UTC](https://forum.opennebula.io/t/choose-the-name-of-vm-deployed-by-service/3833/4 "2017-08-24T08:09:32Z")

</div>

Vmware.  
I solved by a user ask hostname and hostname variable used in a script at startup…

USER\_INPUTS = [  
HOSTNAMING = “M|text|Indiquer le nom du serveur :||” ]  
CONTEXT = [  
HOSTNAMING = “$HOSTNAMING”,  
START\_SCRIPT = “/root/bin/change\_name.sh” ]

No choice
