# \[SOLVED\] Setting user template on onevm create?

**URL:** <https://forum.opennebula.io/t/solved-setting-user-template-on-onevm-create/7915>\
**Category:** Installation & Configuration\
**Tags:** solved\
**Created:** [December 15, 2019, 10:02am UTC](https://forum.opennebula.io/t/solved-setting-user-template-on-onevm-create/7915 "2019-12-15T10:02:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mzealey](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mzealey](https://forum.opennebula.io/u/mzealey)\
**Post date:** [December 15, 2019, 10:02am UTC](https://forum.opennebula.io/t/solved-setting-user-template-on-onevm-create/7915/1 "2019-12-15T10:02:30Z")

</div>

I’m trying to create a vm with onevm create, but I cannot see any way to set user template variables at that stage? Do I have to create and then onevm update to set the variables or is there a good way to do this at create time?

---

<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:** [December 16, 2019, 8:17am UTC](https://forum.opennebula.io/t/solved-setting-user-template-on-onevm-create/7915/2 "2019-12-16T08:17:51Z")

</div>

Hello @mzealey

You can pass a file to the command `onevm create`:

```auto
$ cat vm
NAME=test
CPU=1
MEMORY=128
USER_TEMPLATE = [
	A = A,
	B = B
]
$ onevm create vm

```

---

<div class="post-metadata">

**Author:** ![mzealey](https://avatars.discourse-cdn.com/v4/letter/m/f9ae1b/32.png) [@mzealey](https://forum.opennebula.io/u/mzealey)\
**Post date:** [December 16, 2019, 11:20am UTC](https://forum.opennebula.io/t/solved-setting-user-template-on-onevm-create/7915/3 "2019-12-16T11:20:53Z")

</div>

Thanks, have just tried this and it mostly works. If you use USER\_TEMPLATE it places the variables under that array so actually the user-defined variables just need putting in with the standard config like:

```
NAME=test
CPU=1
MEMORY=128
A = A
B = B
```
