# Updating the context data?

**URL:** <https://forum.opennebula.io/t/updating-the-context-data/2137>\
**Category:** Product Support\
**Created:** [April 21, 2016, 4:20pm UTC](https://forum.opennebula.io/t/updating-the-context-data/2137 "2016-04-21T16:20:07Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [April 21, 2016, 4:20pm UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/1 "2016-04-21T16:20:07Z")

</div>

When I modify user’s parameters (e.g. SSH keys, the CRYPTED\_PASSWORD attribute), is there any way how to recreate the context CDROM without deleting the VM and deploying it again from the template?

I tried “Undeply hard” and start the VM again - the VM with non-persistent disk returned to its original state, but the contextualization CDROM contained the original content (i.e. old SSH keys). With “Delete recreate” the situation was the same.

Is it possible to modify the context at all after the VM is deployed? Thanks!

---

<div class="post-metadata">

**Author:** ![timm](https://avatars.discourse-cdn.com/v4/letter/t/8e8cbc/32.png) [@timm](https://forum.opennebula.io/u/timm)\
**Post date:** [April 22, 2016, 3:06am UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/2 "2016-04-22T03:06:27Z")

</div>

I have never tried it myself but if you manually destroy the VM out of band of OpenNebula, create the ISO image and replace it in the cached directory, then onevm resume the VM, it should pick up the new context. Very hacky but it would work.

---

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [April 22, 2016, 6:50am UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/3 "2016-04-22T06:50:48Z")

</div>

Well, it would be sufficient to just shutdown the machine, replace the ISO, and boot it again - the deployment directory is AFAIK not recreated during shutdown/resume cycle. This is however not what am I looking for. I need something that works for ordinary users, without access to the physical infrastructure.

I _think_ the underlying problem is that the data from the template is fixed during instantiation, and it is not updated ever since, including the variable substitution ($USER[CRYPTED\_PASSWORD], for example). So in fact the ISO probably gets recreated during delete/recreate cycle, but from the same old data.

---

<div class="post-metadata">

**Author:** ![cmartin](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/cmartin/32/4278_2.png) [@cmartin](https://forum.opennebula.io/u/cmartin)\
**Post date:** [April 22, 2016, 7:50am UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/4 "2016-04-22T07:50:53Z")

</div>

You are right.

The existing VM will not process again those variables. Your users would need to create a new VM instance from the same source template.

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [April 22, 2016, 9:45am UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/5 "2016-04-22T09:45:24Z")

</div>

Hi,

Just a quick note, in 5.0 this has been implemented. There is a new  
updateconf operation for VMs in poweroff-like states. You can take a look  
to the CLI interface to get an overview of the new feature:

> <https://github.com/OpenNebula/one/blob/master/src/cli/onevm#L932>

Cheers

Ruben

---

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [April 22, 2016, 11:15am UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/6 "2016-04-22T11:15:42Z")

</div>

Hello,

it looks as a nice start. However, I suppose that the notion of CRYPTED\_PASSWORD attribute of the VM being in fact generated from $USER[CRYPTED\_PASSWORD] user attribute is still not there. So there is probably no simple way of telling the VM “update the context according to current user settings, whatever it is”. I am thinking about lost ssh key or lost password, and having to fix all my VMs.

Anyway, it looks that ONe 5.0 will get many features I would like to use. In which phase the development is? Would it be feasible to test in on my cluster? Are there e.g. nightly builds or something? I don’t know ruby enough to do development, but I might help with testing, provided the code is at least marginally usable/stable (stable as in “in case of problems, just revert to the yesterday’s build” instead of “we do not expect the code to build at all for at least the next three months” :-).

---

<div class="post-metadata">

**Author:** ![ruben](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/ruben/32/19_2.png) [@ruben](https://forum.opennebula.io/u/ruben)\
**Post date:** [April 22, 2016, 12:54pm UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/7 "2016-04-22T12:54:07Z")

</div>

Hi,

DONE! I’ve just added the parsing of context variables to accommodate your  
use case.

Regarding 5.0, we want to enter feature-freeze next week. I’d say there are  
many rough edges here and there, so it’s better to wait for the beta do the  
testing. Once we get the beta, your testing would be more than welcome

Cheers and thanks for the feedback

Ruben

---

<div class="post-metadata">

**Author:** ![Yenya](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/yenya/32/4624_2.png) [@Yenya](https://forum.opennebula.io/u/Yenya)\
**Post date:** [April 22, 2016, 1:01pm UTC](https://forum.opennebula.io/t/updating-the-context-data/2137/8 "2016-04-22T13:01:34Z")

</div>

Thanks! I will wait for the beta.
