# Hostname configuration

**URL:** https://forum.opennebula.io/t/hostname-configuration/7417
**Category:** Installation & Configuration
**Created:** [July 3, 2019, 3:25pm UTC](https://forum.opennebula.io/t/hostname-configuration/7417 "2019-07-03T15:25:15Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Yacine\_FETOUH](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yacine_fetouh/32/6120_2.png) [@Yacine\_FETOUH](https://forum.opennebula.io/u/Yacine_FETOUH)
#### Post date: [July 3, 2019, 3:25pm UTC](https://forum.opennebula.io/t/hostname-configuration/7417/1 "2019-07-03T15:25:15Z")

</div>

Hello everyone,

Is it possible to have VM name equal to hostname ?

I want my user to put the VM name and automatically have it as hostname.

Thank you for your help

---

<div class="post-metadata">

### Author: ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)
#### Post date: [July 3, 2019, 3:26pm UTC](https://forum.opennebula.io/t/hostname-configuration/7417/2 "2019-07-03T15:26:08Z")

</div>

add to the contextalization variables

`SET_HOSTNAME = $NAME`

---

<div class="post-metadata">

### Author: ![Yacine\_FETOUH](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yacine_fetouh/32/6120_2.png) [@Yacine\_FETOUH](https://forum.opennebula.io/u/Yacine_FETOUH)
#### Post date: [July 3, 2019, 3:30pm UTC](https://forum.opennebula.io/t/hostname-configuration/7417/3 "2019-07-03T15:30:17Z")

</div>

Thank you for your reply.

You mean in context section under custom vars ?

---

<div class="post-metadata">

### Author: ![Yacine\_FETOUH](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yacine_fetouh/32/6120_2.png) [@Yacine\_FETOUH](https://forum.opennebula.io/u/Yacine_FETOUH)
#### Post date: [July 3, 2019, 3:32pm UTC](https://forum.opennebula.io/t/hostname-configuration/7417/4 "2019-07-03T15:32:35Z")

</div>

Pefectly working, thank you again 😃
