I am now using the VM webservice SDK 4.1,axis1.4 and jdk 1.5.0.08 to migrating the Virtual Machine,the samples was included in a java project and the "jar" for axis was attached to the project,when I sent the argument to the vMotion.java.it failed with the warning of "Fault {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException"!
Is there any one has the same fault?
I am waiting for your help sincerely..
thomaswei
Don't know what happened. As an alternative, you can try the vijava API with the following sample code included:
5 minute vijava tutorial: http://vijava.sourceforge.net/doc/getstarted/tutorial.htm
Good luck!
Steve
thank you for your reply!
I tried to use your code to migrate the vm,but I can not found the class which is imported to your code.
It seems that the code on the website is different from that of vmware
thomaswei
It's an open source project: http://vijava.sf.net
Check out the 5 minute tutorial first: http://vijava.sourceforge.net/doc/getstarted/tutorial.htm
Good luck!
Steve
Hi Steve
I download your SDK and sample code,and tried to migrate a vm
I set the arguments as "https://59.64.136.244/sdk root 123456 vMotion 59.64.136.283"
but It failed with the warning of
"Exception in thread "main" java.lang.NullPointerException
"
so what is the correct arguments?
thanks
thomaswei
Hi Tom,
The program parameters are like this:
java MigrateVM <url> <username> <password> <vmname> <newhostname>
Your VM is named as "vMotion?" and your new host name is 59.64.136.283 as shown in vSphere Client? You can use new host IP, but need to tweak code a bit.
Thanks!
Steve
Hi Steve
thank you for your help very much.
vMtion is the vm which I wanted to migrate, 59.64.137.388 is the Host IP,and that is the mistake I made.
but I have a new problem now.
I want to query and refresh the resource status of a host ,such as the CPU usage and the mem usage.It seems that GetUpdate.java can make it.
but I find it can only query a vm' resource. so how can I get the hardware usage of a host.
Thanks
Thomaswei!
Hi Steve
I have another problem now,I want know what the url in the parameter of migrate is.
Is it the address of the source host or the addess of the vCenter?
I tried both of them,but all failed
Thank you
Thomaswei