# Override context disk TARGET attribute for a host or template

**URL:** <https://forum.opennebula.io/t/override-context-disk-target-attribute-for-a-host-or-template/3422>\
**Category:** Product Support\
**Created:** [December 7, 2016, 2:45pm UTC](https://forum.opennebula.io/t/override-context-disk-target-attribute-for-a-host-or-template/3422 "2016-12-07T14:45:38Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sulaweyo](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/sulaweyo/32/4708_2.png) [@sulaweyo](https://forum.opennebula.io/u/sulaweyo)\
**Post date:** [December 7, 2016, 2:45pm UTC](https://forum.opennebula.io/t/override-context-disk-target-attribute-for-a-host-or-template/3422/1 "2016-12-07T14:45:38Z")

</div>

Hi,

we have been very successful so far with integrating a powerkvm (ppc64 arch) into our OpenNebula infrastructure. (Upstream of addon will follow when we have it fully working)

We now ran into one issue that i could not fix so far. The emulator does not support the IDE bus (at least not in the last available version from redhat) and so we were searching for a way to override the target device of the context cdrom from hda to sda. I’m aware that i can set the default in oned.conf but that would be system wide and i just need it for vms that go to this host.  
Could this be done in a template somehow or can i patch a template or anything?

Thx  
Georg

---

<div class="post-metadata">

**Author:** ![atodorov\_storpool](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/atodorov_storpool/32/5327_2.png) [@atodorov\_storpool](https://forum.opennebula.io/u/atodorov_storpool)\
**Post date:** [December 7, 2016, 5:24pm UTC](https://forum.opennebula.io/t/override-context-disk-target-attribute-for-a-host-or-template/3422/2 "2016-12-07T17:24:35Z")

</div>

Hi Sulaweyo,

Did you try setting DEV\_PREFIX to ‘sd’ in the custom context vars?

You should have something like:

> CONTEXT = [  
> DEV\_PREFIX = “sd”,  
> NETWORK = “YES”,  
> SSH\_PUBLIC\_KEY = “$USER[SSH\_PUBLIC\_KEY]” ]

In sunstone: tempaltes → VMs → update VM template → context tab → Custom Vars …

Kind Regards,  
Anton Todorov

---

<div class="post-metadata">

**Author:** ![esukram](https://yyz1.discourse-cdn.com/flex031/user_avatar/forum.opennebula.io/esukram/32/4969_2.png) [@esukram](https://forum.opennebula.io/u/esukram)\
**Post date:** [December 9, 2016, 10:11am UTC](https://forum.opennebula.io/t/override-context-disk-target-attribute-for-a-host-or-template/3422/3 "2016-12-09T10:11:35Z")

</div>

Hi Anton,

that definitely worked for us!!

Thanks a lot,  
the context plugin is just amazing 😉

Best,  
Markus
