# Customize VM\_Template and VM Name

**URL:** https://forum.opennebula.io/t/customize-vm-template-and-vm-name/11835
**Category:** Installation & Configuration
**Created:** [February 7, 2024, 5:36pm UTC](https://forum.opennebula.io/t/customize-vm-template-and-vm-name/11835 "2024-02-07T17:36:23Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![wilhelmmi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/wilhelmmi/32/7966_2.png) [@wilhelmmi](https://forum.opennebula.io/u/wilhelmmi)
#### Post date: [February 7, 2024, 5:36pm UTC](https://forum.opennebula.io/t/customize-vm-template-and-vm-name/11835/1 "2024-02-07T17:36:23Z")

</div>

Hey together,

I am trying to “customize” a VM-Template. As soon as someone is deploying a VM via the template, I want that the vm will be named after a special naming convention in the vcenter. So far, I just added the VM\_Prefix = “vm-…”.  
Everything works as expected and all the vms in the vcenter starting with “vm-”. But now I want to add a customer number to the prefix. The number varies from customer to customer… So for customer 123 the vm should be named “vm-123”…

I am not sure if I can solve this by editing the VM\_Prefix variable… Any ideas on how to solve this?

Best Regards

---

<div class="post-metadata">

### Author: ![dclavijo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/dclavijo/32/5265_2.png) [@dclavijo](https://forum.opennebula.io/u/dclavijo)
#### Post date: [February 9, 2024, 5:26pm UTC](https://forum.opennebula.io/t/customize-vm-template-and-vm-name/11835/2 "2024-02-09T17:26:25Z")

</div>

Take a look at the examples shown after [this section](https://docs.opennebula.io/6.8/management_and_operations/references/template.html?highlight=context#context-section). You can reference variables on the VM Template to generate “procedural” variables.

---

<div class="post-metadata">

### Author: ![wilhelmmi](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/wilhelmmi/32/7966_2.png) [@wilhelmmi](https://forum.opennebula.io/u/wilhelmmi)
#### Post date: [February 16, 2024, 1:34pm UTC](https://forum.opennebula.io/t/customize-vm-template-and-vm-name/11835/3 "2024-02-16T13:34:34Z")

</div>

Nice the $uname and $gname did it for us.  
Cheers!
