Upon trying to access the DRS page in the cluster in the vCenter Server, encountering an error with the string :
"Could not write JSON: For input string: "1.5"; nested exception is com.fasterxml.jackson.databind.JsonMappingException: For input string: "1.5" (through reference chain: com.vmware.vsphere.client.clusterui.model.services.DrsConfigData["cpuOverCommitmentPercent"])"
vCenter Server 7.0
vCenter Server 8.0
The DRS page was not working because the MaxVCPUsPerCore was having the corrupted value of 1.5 ( Any number with decimal digit).
Could not write JSON: For input string: "1.5"; nested exception is com.fasterxml.jackson.databind.JsonMappingException: For input string: "1.5" (through reference chain: com.vmware.vsphere.client.clusterui.model.services.DrsConfigData["cpuOverCommitmentPercent"])
java.lang.NumberFormatException: For input string: "1.5"
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
at java.lang.Integer.parseInt(Integer.java:580)
at java.lang.Integer.valueOf(Integer.java:766)
at com.vmware.vsphere.client.clusterui.model.services.DrsConfigData.getCpuOverCommitmentPercent(DrsConfigData.java:127)
at sun.reflect.GeneratedMethodAccessor12820.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.fasterxml.jackson.databind.ser.BeanPropertyWriter.get(BeanPropertyWriter.java:916)
at com.vmware.vise.util.i18n.json.BeanPropertyWriterEx.serializeAsField(BeanPropertyWriterEx.java:69)
at com.fasterxml.jackson.databind.ser.std.BeanSerializerBase.serializeFields(BeanSerializerBase.java:774)
[wrapped] com.fasterxml.jackson.databind.JsonMappingException: For input string: "1.5" (through reference chain: com.vmware.vsphere.client.clusterui.model.services.DrsConfigData["cpuOverCommitmentPercent"])
NOTE : Please do not make these changes on the vCenter Server without Broadcom Support engaged as incorrect execution may corrupt the vCenter Server.
NOTE : Take snapshot of the vCenter Server. (Offline snapshot in case of vCenter Server in Linked mode).
Procedure of taking offline snapshot :
In some scenarios, the command needs an additional force flag to work, in these sceenarios, we get the following error :
Command with force flag is : New-AdvancedSetting -Type "ClusterDRS" -Entity <cluster-name> -Name 'MaxVCPUsPerCore' -Value '1' -force