# ONE 5.0.1 - Is it possible to change context variables after VM creation?

**URL:** <https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577>\
**Category:** Product Support\
**Created:** [July 15, 2016, 6:09am UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577 "2016-07-15T06:09:30Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![heathen](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/heathen/32/4720_2.png) [@heathen](https://forum.opennebula.io/u/heathen)\
**Post date:** [July 15, 2016, 6:09am UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577/1 "2016-07-15T06:09:30Z")

</div>

Hi!

I’ve created a VM and set IP address. But I can’t change another network options, like gateway, netmask and DNS as well as another interface options. If I shutdown VM and try to change the context with Sunstone - it just doesn’t save changes. I can change ssh keys but that’s all.  
Is there any way to change the context after VM creation available?

Thanks!

Best regards,  
Vladimir

---

<div class="post-metadata">

**Author:** ![heathen](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/heathen/32/4720_2.png) [@heathen](https://forum.opennebula.io/u/heathen)\
**Post date:** [July 15, 2016, 9:05am UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577/2 "2016-07-15T09:05:35Z")

</div>

Ok,

I’ve done it with detach NICs and attach it again with editing Advanced options. Hope it helps somebody.

---

<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:** [July 15, 2016, 9:20am UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577/3 "2016-07-15T09:20:53Z")

</div>

When the VM is poweroff you can also use updateconf to change the context  
variables, or the values associated with a Virtual Network. For example y  
you change the gateway attribute in a network in the next poeroff cycle  
will be updated. Cheers

---

<div class="post-metadata">

**Author:** ![heathen](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/heathen/32/4720_2.png) [@heathen](https://forum.opennebula.io/u/heathen)\
**Post date:** [July 15, 2016, 9:30am UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577/4 "2016-07-15T09:30:39Z")

</div>

Ruben,

thanks for the answer!

I’ve tried to update VM’s context in poweroff state but without success - it just doesn’t save changes: I use Update button in (Sunstone) VM properties, change fields, press Update button again to save and automatically return to the properties screen; but if I’ll go with Update again - the fields I’ve changed before are empty.

Best regards,  
Vladimir

---

<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:** [July 18, 2016, 8:49am UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577/5 "2016-07-18T08:49:24Z")

</div>

Make sure you have not checked the “Generate Network Context”, if that’s  
the case the variables are re-generated with the network attributes (in  
case they are updated).

---

<div class="post-metadata">

**Author:** ![heathen](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/heathen/32/4720_2.png) [@heathen](https://forum.opennebula.io/u/heathen)\
**Post date:** [July 18, 2016, 5:33pm UTC](https://forum.opennebula.io/t/one-5-0-1-is-it-possible-to-change-context-variables-after-vm-creation/2577/6 "2016-07-18T17:33:31Z")

</div>

Ruben,

thanks a lot, it was my case!

Best regards,  
Vladimir
