Symptoms:
java.lang.IllegalArgumentException: object is not an instance of declaring class
/var/log/vmware/vsphere-ui/logs/vsphere_client_virgo.log contains the following error stack:[<timestamp>] [ERROR] http-nio-5090-exec-227 ######## ###### ###### com.vmware.vsphere.client.vm.impl.VmMutationProvider Could not reconfigure VM urn:vmomi:VirtualMachine:vm-###:########-####-####-####-############# com.vmware.vim.vmomi.client.exception.InternalException: java.lang.IllegalArgumentException: object is not an instance of declaring class
at com.vmware.vim.vmomi.core.types.impl.ComplexTypeFieldImpl.get(ComplexTypeFieldImpl.java:103)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalSubFields(MarshallerImpl.java:617)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalComplexField(MarshallerImpl.java:601)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalFault(MarshallerImpl.java:348)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalField(MarshallerImpl.java:315)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalSubFields(MarshallerImpl.java:631)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalComplexField(MarshallerImpl.java:601)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalField(MarshallerImpl.java:309)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalSubFields(MarshallerImpl.java:631)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalComplexField(MarshallerImpl.java:601)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshalField(MarshallerImpl.java:309)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl$MarshalContext.marshal(MarshallerImpl.java:194)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl.marshal(MarshallerImpl.java:139)
at com.vmware.vim.vmomi.core.soap.impl.marshaller.MarshallerImpl.marshal(MarshallerImpl.java:113)
at com.vmware.vim.vmomi.client.common.impl.RequestImpl.writeRequestBody(RequestImpl.java:63)
(..)
Caused by: java.lang.IllegalArgumentException: object is not an instance of declaring class
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.vmware.vim.vmomi.core.types.impl.ComplexTypeFieldImpl.get(ComplexTypeFieldImpl.java:101)
... 280 common frames omitted
This issue occurs when there was a failed attempt to upgrade the virtual machines hardware version in the past.
During to the failed upgrade an informational line was added to the .vmx configuration file of the VM:
virtualHW.scheduledUpgrade.state = "failed"
The VM reconfiguration API used by vSphere Client to edit the virtual machines settings tries to handle this as a configuration setting and fails, leading to the error mentioned above.
This issue is fixed in vCenter Server 7.0 Update 3i.
If an update is currently not possible, as a workaround manually remove the problematic line for the .vmx configuration file of the virtual machine:
root account.# cd /vmfs/volumes/<datastore>/<vm_name>
<vm_name>.vmx using the VI text editor:# vi <vm_name>.vmx
virtualHW.scheduledUpgrade.state = "failed"
Note: For more information on using VI see Modifying host entry in /etc/hosts file for vCenter or ESXi host using vi editor.
# vim-cmd vmsvc/getallvms
# vim-cmd vmsvc/reload <ID>For example:
# vim-cmd vmsvc/reload 14
If the issue is seen with a vCenter version newer than 7.0 Update 3i, contact Broadcom support for assistance.