Cannot set a static IP to a vNic

This post was originally published on this site



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



at ReconfigVMnicToDVS.assignStaticIp(

at ReconfigVMnicToDVS.main(


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,


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.