Character limit of 4000 characters for setCustomValue method in ManagedObject.
search cancel

Character limit of 4000 characters for setCustomValue method in ManagedObject.

book

Article ID: 312163

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

This article will inform users beforehand that there is a character limit for the setCustomValue method and so that they do not try to add a value greater than 4000 characters.

Symptoms:

When entering a key value pair for the setCustomValue method for a ManagedObject in the vSphere UI, if the value is greater than 4000 characters then an error is shown that says "Method Invocation Result: InvalidArgument"
image.png

/var/log/vmware/vpxd/vpxd.log will also have the following log lines:
```
--> (vmodl.fault.InvalidArgument) {
--> faultCause = (vmodl.MethodFault) null,
--> faultMessage = <unset>,
--> invalidProperty = "value"
--> msg = ""
--> }
--> Args:
-->
--> Arg key:
--> "<customer_entered_key"
--> Arg value:
--> "<customer_entered_value>"

```


Environment

VMware vCenter Server 7.0.3
VMware vCenter Server 6.0.x
VMware vCenter Server 7.0.x
VMware vCenter Server 8.0.x

Cause

This occurs because there is a 4000 character limit on the client side that will throw an exception if the value is greater than 4000 characters. 

Resolution

VMware is aware of this issue and working to resolve this in a future release.


Workaround:
Break down value in chunks of 4000 and enter them as separate key value pairs. Then when needed retrieve all the separate key value pairs and join them together.