# vmware\_guest customvalues

**URL:** <https://forum.ansible.com/t/vmware-guest-customvalues/24660>\
**Category:** Ansible Project\
**Created:** [June 6, 2017, 2:30pm UTC](https://forum.ansible.com/t/vmware-guest-customvalues/24660 "2017-06-06T14:30:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul\_Farrington](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@Paul\_Farrington](https://forum.ansible.com/u/Paul_Farrington)\
**Post date:** [June 6, 2017, 2:30pm UTC](https://forum.ansible.com/t/vmware-guest-customvalues/24660/1 "2017-06-06T14:30:02Z")

</div>

Hi All,

Is anyone using the customvalues option in the vmware\_guest module? if you are, could you please share the syntax definition as i am about to kick my monitors off the desk…

I keep getting the following output from the play:

“msg”: “customvalues items required both ‘key’ and 'value fields.”

The -vvv output shows…

`"customvalues": [ { "ethernet0.startConnected": "true" }, { "vmcpu.hotadd": true }`

And my play currently contains:

`  
customvalues:

- ethernet0.startConnected: “true”
- vmcpu.hotadd: true  
`

i have also tried:

`customvalues: ethernet0.startConnected: "true" vmcpu.hotadd: true`

`customvalues: [{ethernet0.startConnected: "true"}]`

Thanks  
Paul

---

<div class="post-metadata">

**Author:** ![Paul\_Farrington](https://avatars.discourse-cdn.com/v4/letter/p/94ad74/32.png) [@Paul\_Farrington](https://forum.ansible.com/u/Paul_Farrington)\
**Post date:** [June 7, 2017, 9:10am UTC](https://forum.ansible.com/t/vmware-guest-customvalues/24660/2 "2017-06-07T09:10:42Z")

</div>

Ok, after much messing about…

the customvalues appear to set just annotations on the virtual machine. Using the annotation option in vmware\_guest filles in annotation.notes but you can use the customvalues to set additional annotations.

They are specified like this:

`  
customvalues:

- key: myannotation  
value: “myvalue”  
`

If the annotation you are trying to modify, in this case “myannotation” has not been defined as an annotation, you will get the below error.

`"msg": "Failed to set custom value for key='myannotation' and value='myvalue'. Error was: (vmodl.fault.InvalidArgument) {\n dynamicType = <unset>,\n dynamicProperty = (vmodl.DynamicProperty) [],\n msg = 'A specified parameter was not correct: key',\n faultCause = <unset>,\n faultMessage = (vmodl.LocalizableMessage) [],\n invalidProperty = u'key'\n}" }`

If it exists, it will fill it in accordingly.

I have seen a few posts kicking about regarding customvalues and what they do so hopefully this will help some people.

On the other hand, this isnt what i was after, i was trying to set some of the VMX options such as vcpu.hotadd which looks available via vm\_extra\_config in vsphere\_guest, but nothing similar appears to be available in vmware\_guest so if anyone knows how to do this in vmware\_guest please let me know.

Thanks  
Paul

---

<div class="post-metadata">

**Author:** ![rcon\_z](https://avatars.discourse-cdn.com/v4/letter/r/8797f3/32.png) [@rcon\_z](https://forum.ansible.com/u/rcon_z)\
**Post date:** [September 28, 2017, 5:26pm UTC](https://forum.ansible.com/t/vmware-guest-customvalues/24660/3 "2017-09-28T17:26:12Z")

</div>

+1 on this. I would like to be able to add the changeSID to cause a SID regeneration, so i can attempt to auto join this to domain immediately after deployment. Does anyone have that working?
