# OneFlow vm\_template\_contents values are not taken into account

**URL:** <https://forum.opennebula.io/t/oneflow-vm-template-contents-values-are-not-taken-into-account/4444>\
**Category:** Product Support\
**Created:** [June 13, 2017, 11:12am UTC](https://forum.opennebula.io/t/oneflow-vm-template-contents-values-are-not-taken-into-account/4444 "2017-06-13T11:12:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [June 13, 2017, 11:12am UTC](https://forum.opennebula.io/t/oneflow-vm-template-contents-values-are-not-taken-into-account/4444/1 "2017-06-13T11:12:25Z")

</div>

Hi all

We are using OneFlow to start a virtual cluster, in our workers VMs we need a contextualization variable to set the master ip called `MASTER_IP` . To avoid to include this variable hardcoded in our VM template we use the oneflow template instead, so it looks like this:

```
    ...
    {
      "name": "Worker",
      "cardinality": 2,
      "vm_template": 1,
      "shutdown_action": "terminate",
      "parents": [
        "Master"
      ],
      "vm_template_contents": "MASTER_IP=\"10.0.1.1\"",
      "elasticity_policies": [],
      "scheduled_policies": []
    },
    ...

```

The problem is that `vm_template_contents` only is included when you instantiate the oneflow service the first time, if you scale the cluster or if you add a new Worker the MASTER\_IP does not appear within the user VM section after instantiation, only the `ROLE_NAME` .

Someone else has found the same issue? we are using OpenNebula 5.2.1 at this moment

Cheers  
Alvaro

---

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [June 13, 2017, 1:09pm UTC](https://forum.opennebula.io/t/oneflow-vm-template-contents-values-are-not-taken-into-account/4444/2 "2017-06-13T13:09:26Z")

</div>

Hi

I’m not sure if this is related with this problem but if you create several onflow roles, each one with different `vm_template_contents` variables, you only see from Suntone (via “Advanced Role Parameters” option) the values from the last role. It looks that from suntone only are visible the `vm_template_contents` from the last role. The “advanced role parameters” looks empty for the rest (but the values are displayed correctly running `oneflow-template show` command)

---

<div class="post-metadata">

**Author:** ![alvaro\_simongarcia](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alvaro_simongarcia/32/4178_2.png) [@alvaro\_simongarcia](https://forum.opennebula.io/u/alvaro_simongarcia)\
**Post date:** [June 15, 2017, 11:40am UTC](https://forum.opennebula.io/t/oneflow-vm-template-contents-values-are-not-taken-into-account/4444/3 "2017-06-15T11:40:04Z")

</div>

Hi

I think that I found the issue, in fact there are 2 different issues.

The first problem (I don’t know if this is fixed in the latest ONE version) is if you use the oneflow wizard from suntone and you reload a oneflow service template the wizard only reloads the latest Role `VM template content` params, so it wipes the first roles `vm_template_contents` if you do not notice this and you save the changes.

The second problem is if you modify the `vm_template_contents` values that is not taken into account if the oneflow service is already running and you add more VMs or you resize a role, the new VMs will still use the old service template. (maybe this is done on purpose).

I will update to the latest OpenNebula version (I’m still using 5.2.1) just to see if I get the same results…

Cheers  
Álvaro
