# OpenNebula attribute

**URL:** <https://forum.opennebula.io/t/opennebula-attribute/8778>\
**Category:** Integration Support\
**Created:** [September 2, 2020, 9:41am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778 "2020-09-02T09:41:01Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Said\_Hassani](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/said_hassani/32/6665_2.png) [@Said\_Hassani](https://forum.opennebula.io/u/Said_Hassani)\
**Post date:** [September 2, 2020, 9:41am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/1 "2020-09-02T09:41:01Z")

</div>

Hello  
I want to know the meaning of the ATT attribute. For example in this expression:  
“Elasticity\_policy” : [  
{  
“expression” : “ATT=60” ,  
.  
.  
}  
]

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 3, 2020, 7:04am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/2 "2020-09-03T07:04:01Z")

</div>

Hello @Said_Hassani

That attribute is set in the **USER\_TEMPLATE** or **TEMPLATE** of the VM. ATT is just an example used in documentation, for example you can use real attributes like **CPU** in your elasticity rules.

You can also use [**OneGate**](https://docs.opennebula.io/5.12/advanced_components/application_insight/onegate_usage.html) service to update the USER\_TEMPLATE from the VM to outside and the OneFlow can evaluate those attributes you set.

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![Said\_Hassani](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/said_hassani/32/6665_2.png) [@Said\_Hassani](https://forum.opennebula.io/u/Said_Hassani)\
**Post date:** [September 3, 2020, 12:23pm UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/3 "2020-09-03T12:23:28Z")

</div>

Hello Alex.  
Thanks for your assistance and for your receptivity…!

---

<div class="post-metadata">

**Author:** ![Alan\_Piterson](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alan_piterson/32/6604_2.png) [@Alan\_Piterson](https://forum.opennebula.io/u/Alan_Piterson)\
**Post date:** [September 3, 2020, 1:35pm UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/4 "2020-09-03T13:35:30Z")

</div>

Hi. I would like to ask in continuation of the Elasticity\_policy topic. Is it possible to set such a condition to add another virtual machine after a user has connected to the first one? Thank you in advance

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 4, 2020, 7:55am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/5 "2020-09-04T07:55:57Z")

</div>

Hello @Alan_Piterson

To do that you can create an script of first VM that execute a VM template update using OneGate when user logins. So when OneFlow detects that attribute, it will scale the service and deploy another VM.

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![Alan\_Piterson](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alan_piterson/32/6604_2.png) [@Alan\_Piterson](https://forum.opennebula.io/u/Alan_Piterson)\
**Post date:** [September 4, 2020, 9:28am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/6 "2020-09-04T09:28:18Z")

</div>

Thanks for the answer. I am just learning OneFlow. And if you have the opportunity, could you please write an example of such a script.

---

<div class="post-metadata">

**Author:** ![Said\_Hassani](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/said_hassani/32/6665_2.png) [@Said\_Hassani](https://forum.opennebula.io/u/Said_Hassani)\
**Post date:** [September 6, 2020, 8:27am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/7 "2020-09-06T08:27:55Z")

</div>

Hello @ahuertas  
I have a problem to contextualize a vm and extract its disk.  
I don’t know exactly how to extract the disk.  
Thanks for your receptivity in advance!

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 7, 2020, 6:59am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/8 "2020-09-07T06:59:42Z")

</div>

Hello @Alan_Piterson

You have an example about how to update the VM template [here](https://docs.opennebula.io/5.12/advanced_components/application_insight/onegate_usage.html#updating-the-vm-information).

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 7, 2020, 7:00am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/9 "2020-09-07T07:00:50Z")

</div>

Hello @Said_Hassani

> I have a problem to contextualize a vm

What kind of problem do you have?

> I don’t know exactly how to extract the disk.

To extract a disk you have the detach operation.

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![Alan\_Piterson](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alan_piterson/32/6604_2.png) [@Alan\_Piterson](https://forum.opennebula.io/u/Alan_Piterson)\
**Post date:** [September 10, 2020, 10:49am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/10 "2020-09-10T10:49:25Z")

</div>

Hey @ahuertas. A couple more questions arose. Is it possible, after shutting down the OneFlow service virtual machine, to delete it and deploy a new one, and is it possible to connect to the OneGate server from the outside. Sorry if the questions seem silly, I’m just learning. Thank you in advance.

---

<div class="post-metadata">

**Author:** ![Said\_Hassani](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/said_hassani/32/6665_2.png) [@Said\_Hassani](https://forum.opennebula.io/u/Said_Hassani)\
**Post date:** [September 13, 2020, 6:54pm UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/11 "2020-09-13T18:54:38Z")

</div>

Hello  
I want to know if it is possible to do auto-scaling with the same content in all vms.  
For example, i can adjust manually the cardinality to 2 , i want that the new vm has the same content(file, documents, application) as the first vm.  
Best,  
Said.

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 14, 2020, 7:11am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/12 "2020-09-14T07:11:27Z")

</div>

Hello @Alan_Piterson

> Is it possible, after shutting down the OneFlow service virtual machine, to delete it and deploy a new one

This has to be done manually, you delete it and then deploy a new one.

> is it possible to connect to the OneGate server from the outside

OneGate server is listenning on IP and port you have configured on `/etc/one/onegate-server.conf`, check the variables **:host** and **:port**. So, if the IP is reachable from outside you can connect to it and make HTTP request.

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 14, 2020, 7:12am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/13 "2020-09-14T07:12:36Z")

</div>

Hello @Said_Hassani

No, the new VM will be created from the VM template the first one was created.

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![Alan\_Piterson](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alan_piterson/32/6604_2.png) [@Alan\_Piterson](https://forum.opennebula.io/u/Alan_Piterson)\
**Post date:** [September 14, 2020, 8:03am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/14 "2020-09-14T08:03:45Z")

</div>

@ahuertas Thank you very much for your answer. And the last question: how can I properly log in to the onegate if I make a request from the outside and I do not have a token?

---

<div class="post-metadata">

**Author:** ![Said\_Hassani](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/said_hassani/32/6665_2.png) [@Said\_Hassani](https://forum.opennebula.io/u/Said_Hassani)\
**Post date:** [September 14, 2020, 10:11am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/15 "2020-09-14T10:11:33Z")

</div>

Is there a way to do or simulate this scenario ?

---

<div class="post-metadata">

**Author:** ![Said\_Hassani](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/said_hassani/32/6665_2.png) [@Said\_Hassani](https://forum.opennebula.io/u/Said_Hassani)\
**Post date:** [September 16, 2020, 12:44am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/16 "2020-09-16T00:44:58Z")

</div>

Hello  
Thanks for your assistance!  
How to upload the contextualization scripts ( `onegate_init.sh` , `onegate_publisher.sh` ) to the OpenNebula “Files & Kernels” section?  
I have a problem to run opennebula(version 5.12.x) with cloudvamp.  
Thanks for your help!

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 16, 2020, 7:06am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/17 "2020-09-16T07:06:45Z")

</div>

Hello @Alan_Piterson

You can take the token from the VM, it’s on `/var/run/one-context/one_env`, in the attribute **TOKENTXT**. Then you can make an HTTP request with `--header "X-ONEGATE-TOKEN: 5WBxKP7GS2ysf3WHeRAIaw=="` this header.

Best,  
Álex.

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 16, 2020, 7:07am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/18 "2020-09-16T07:07:14Z")

</div>

No, there is no way.

---

<div class="post-metadata">

**Author:** ![ahuertas](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ahuertas/32/7487_2.png) [@ahuertas](https://forum.opennebula.io/u/ahuertas)\
**Post date:** [September 16, 2020, 7:07am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/19 "2020-09-16T07:07:35Z")

</div>

In sunstone go to files, click on **+** button and upload it as a context file.

---

<div class="post-metadata">

**Author:** ![Alan\_Piterson](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alan_piterson/32/6604_2.png) [@Alan\_Piterson](https://forum.opennebula.io/u/Alan_Piterson)\
**Post date:** [September 24, 2020, 8:06am UTC](https://forum.opennebula.io/t/opennebula-attribute/8778/20 "2020-09-24T08:06:23Z")

</div>

@ahuertas

> This has to be done manually, you delete it and then deploy a new one.

Greetings again. This solution does not work, or I am doing something wrong, as soon as I turn off the virtual machine, it goes into a warning state, then I destroy it, and as a result, after the destruction of the first one, the service starts to destroy all the others. Please tell me how to fix this. Thank you in advance.  
 ![Screenshot](https://canada1.discourse-cdn.com/flex031/uploads/opennebula/original/2X/0/0a28224215a47944eebeccb926f29a0050faa45e.png)

Best,  
Álex.  
[/quote]

[Next page](https://forum.opennebula.io/t/opennebula-attribute/8778.md?page=2)
