# Problem updating templates

**URL:** <https://forum.opennebula.io/t/problem-updating-templates/2156>\
**Category:** Product Support\
**Created:** [April 26, 2016, 3:27pm UTC](https://forum.opennebula.io/t/problem-updating-templates/2156 "2016-04-26T15:27:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![alfeijoo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alfeijoo/32/8586_2.png) [@alfeijoo](https://forum.opennebula.io/u/alfeijoo)\
**Post date:** [April 26, 2016, 3:27pm UTC](https://forum.opennebula.io/t/problem-updating-templates/2156/1 "2016-04-26T15:27:34Z")

</div>

Hi.

I think there are any kind of problem at opennebula when trying to update a template.

We use OpenNebula 4.14.2

If one user create a template like:

> [CONTEXT=[  
> NETWORK=“YES”,  
> SET\_HOSTNAME=“VMDUse$VMID”,  
> SSH\_PUBLIC\_KEY=“$USER[SSH\_PUBLIC\_KEY]” ]  
> CPU=“2”  
> DESCRIPTION="MV "  
> DISK=[  
> IMAGE=“VMDUse”,  
> IMAGE\_UNAME=“xxx” ]  
> DISK=[  
> DEV\_PREFIX=“vdb”,  
> SIZE=“2000”,  
> TYPE=“swap” ]  
> GRAPHICS=[  
> KEYMAP=“es”,  
> LISTEN=“0.0.0.0”,  
> TYPE=“VNC” ]  
> HYPERVISOR=“kvm”  
> LOGO=“images/logos/debian.png”  
> MEMORY=“2048”  
> NIC=[  
> NETWORK=“Private-10.38.2.x”,  
> NETWORK\_UNAME=“oneadmin” ]  
> PCI=[  
> CLASS=“0300”,  
> DEVICE=“11bf”,  
> VENDOR=“10de” ]  
> VCPU=“2”]

After saving that if the user whan to delete the “PCI” entry he will found that is impossible.

user perform:

- onetemplate update XX
- delete the entry:

> PCI=[  
> CLASS=“0300”,  
> DEVICE=“11bf”,  
> VENDOR=“10de” ]

- save.

and now, if perform the “ **onetemplate show 10** ” all are equal… there are no changes in the template.

Any idea?

logs not show any.

> Tue Apr 26 17:03:20 2016 [Z0][ReM][D]: Req:8240 UID:2 TemplateUpdateTemplate invoked , 10, “CONTEXT=[…”, 0  
> Tue Apr 26 17:03:20 2016 [Z0][ReM][D]: Req:8240 UID:2 TemplateUpdateTemplate result SUCCESS, 10

---

<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 26, 2016, 3:50pm UTC](https://forum.opennebula.io/t/problem-updating-templates/2156/2 "2016-04-26T15:50:54Z")

</div>

Hi,

PCI is a [restricted attribute](http://docs.opennebula.org/4.14/administration/references/oned_conf.html#restricted-attributes-configuration).

A regular user is not allowed to create a template with that attribute. In this case, you probably created the template as oneadmin and then changed its ownership. Now OpenNebula is enforcing the existing PCI attribute because the user is not supposed to add/remove/edit it.

If you remove it from oned.conf it should work.

---

<div class="post-metadata">

**Author:** ![alfeijoo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/alfeijoo/32/8586_2.png) [@alfeijoo](https://forum.opennebula.io/u/alfeijoo)\
**Post date:** [April 26, 2016, 4:00pm UTC](https://forum.opennebula.io/t/problem-updating-templates/2156/3 "2016-04-26T16:00:42Z")

</div>

Oh thanks so much! 🙂

maybe an alert in sunstone or similar… because there are no notification about it when user perform a change in the template.

Thanks again @cmartin

---

<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 27, 2016, 8:34am UTC](https://forum.opennebula.io/t/problem-updating-templates/2156/4 "2016-04-27T08:34:13Z")

</div>

You are right, maybe OpenNebula should return a warning.

Thanks for the suggestion, I’ve opened a ticket to consider it in future releases:  
[http://dev.opennebula.org/issues/4434](http://dev.opennebula.org/issues/4434)
