Sample program: https://sourceforge.net/p/vijava/code/HEAD/tree/trunk/src/com/vmware/vim25/mo/samples/vm/CreateVM.java .
I downloaded VI Java API (2 jars) from https://sourceforge.net/projects/vijava/files/ and added to my build path.
My vSphere vCenter Server version is 6.0.0. I use Java 1.8. Problem is, I am not able to run the sample program successfully. I get the output: "VM could not be created.". This is because result variable (as in the snippet below from the sample program) is not equal to success.
Task task = vmFolder.createVM_Task(vmSpec, rp, null);
String result = task.waitForMe();
Is VI Java API still compatible with vcenter 6.0?
Any help to resolve this problem is greatly appreciated.
Thank you