Hello,
Using Vijava, I want to add a new vnic on an existing VM, assign a specific portgroup to it and then set a static IP to it.
Adding a new vnic and assign a portgroup to it works fine. But when trying to set a static IP to the vNic I get the following error:
java.rmi.RemoteException: VI SDK invoke exception:com.vmware.vim25.InvalidRequest at com.vmware.vim25.ws.WSClient.invoke(WSClient.java:122)
at com.vmware.vim25.ws.VimStub.checkCustomizationSpec(VimStub.java:1956)
at com.vmware.vim25.mo.VirtualMachine.checkCustomizationSpec(VirtualMachine.java:172)
at ReconfigVMnicToDVS.assignStaticIp(ReconfigVMnicToDVS.java:151)
at ReconfigVMnicToDVS.main(ReconfigVMnicToDVS.java:119)
Clearly the request is wrong but I don't know how to find what is missing. I searched on the forums, I tried different combinations but got the same result.
I attached the complete Vijava code here. Also I attached a picture with the details of the request.
I'm using Vijava 5.5
I would appreciate any help.
Thank you,
Costin