# Auto-fill VM name / hostnames

**URL:** <https://forum.opennebula.io/t/auto-fill-vm-name-hostnames/8973>\
**Category:** Installation & Configuration\
**Created:** [November 9, 2020, 10:38am UTC](https://forum.opennebula.io/t/auto-fill-vm-name-hostnames/8973 "2020-11-09T10:38:05Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jcstroo](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@jcstroo](https://forum.opennebula.io/u/jcstroo)\
**Post date:** [November 9, 2020, 10:38am UTC](https://forum.opennebula.io/t/auto-fill-vm-name-hostnames/8973/1 "2020-11-09T10:38:05Z")

</div>

Hi all,

I’m new to opennebula and am testing vonecloud on my vsphere test lab to see if it fits our needs to enable developers to request their own VMs.

One important thing is that we do not want the developers to choose weird VM-names and hostnames. They are realy good at that… We want something simple line “VM\_” to be the vm name in opennebula and VMware vcenter/vSphere and also we want to user this as the hostname in the VM.

The out-of-the-box solution give the users the abaility to fill in a name and that will become real messy. having the users name or abreviation als part of the VM-name is also an option, just als long as it is auto-generated and unique.

Does anyone have any tips on how I can accomplish that?

Regards,  
John

---

<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:** [November 11, 2020, 8:59am UTC](https://forum.opennebula.io/t/auto-fill-vm-name-hostnames/8973/2 "2020-11-11T08:59:07Z")

</div>

AFAIK there is no out of the box way to disable the VM naming at instantiation, without changing the code that is.

However, you can define a prefix for [all VM names](http://docs.opennebula.io/5.12/deployment/vmware_infrastructure_setup/vcenter_setup.html?highlight=vm_prefix#import-a-cluster-with-sunstone:~:text=You%20can%20define%20VM_PREFIX%20attribute%20within,will%20be%20named%20begin%20with%20VM_PREFIX.).

---

<div class="post-metadata">

**Author:** ![jcstroo](https://avatars.discourse-cdn.com/v4/letter/j/13edae/32.png) [@jcstroo](https://forum.opennebula.io/u/jcstroo)\
**Post date:** [November 13, 2020, 1:38pm UTC](https://forum.opennebula.io/t/auto-fill-vm-name-hostnames/8973/3 "2020-11-13T13:38:46Z")

</div>

Hi Tino, thank you for your reply. I’ll have a look at the vm\_prefix. That might just do the trick for me!

Regards,  
John
