VMware {code} Community
Thomaswei
Contributor
Contributor

axis Fault {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException

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

0 Kudos
7 Replies
Steve_Jin
Expert
Expert

Don't know what happened. As an alternative, you can try the vijava API with the following sample code included:

http://vijava.svn.sourceforge.net/viewvc/vijava/trunk/src/com/vmware/vim25/mo/samples/vm/MigrateVM.j...

5 minute vijava tutorial: http://vijava.sourceforge.net/doc/getstarted/tutorial.htm

Good luck!

Steve

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
Thomaswei
Contributor
Contributor

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

0 Kudos
Steve_Jin
Expert
Expert

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

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
Thomaswei
Contributor
Contributor

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

at com.vmware.vim25.mo.samples.vm.MigrateVM.main(MigrateVM.java:75)

"

so what is the correct arguments?

thanks

thomaswei

0 Kudos
Steve_Jin
Expert
Expert

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

Steve JIN Author of VMware VI and vSphere SDK; Creator of open source VI Java API (http://vijava.sf.net); Blogger at http://www.doublecloud.org
0 Kudos
Thomaswei
Contributor
Contributor

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!

0 Kudos
Thomaswei
Contributor
Contributor

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

0 Kudos