Unable to access the DRS feature on vCenter Server in cluster.
search cancel

Unable to access the DRS feature on vCenter Server in cluster.

book

Article ID: 377753

calendar_today

Updated On:

Products

VMware vCenter Server VMware vCenter Server 7.0 VMware vCenter Server 8.0

Issue/Introduction

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"])"

Environment

vCenter Server 7.0

vCenter Server 8.0

 

Cause

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"])

Resolution

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 :

    • Locate the hosts on which the vCenter Server Virtual Machine.
    • Navigate to the hosts UI client.
    • Power off all the vCenter Servers in Linked mode.
    • Take snapshots of the vCenter VM when all the vCenter Servers are powered off.
    • Power on the vCenter Servers.
  • Connect to the vCenter Server using PowerCLI.
     
  • Run the command to update the MaxVCPUsPerCore for the cluster in the following format : New-AdvancedSetting -Type "ClusterDRS" -Entity <cluster-name> -Name 'MaxVCPUsPerCore' -Value '1'
  • The DRS page should be accessible after the execution of the command.

Additional Information

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