VMware {code} Community
jwahler
Contributor
Contributor

How to start a virtual machine with java sdk?

Hi

I want to start (and shutdown) a virtual machine with java sdk. Has someone an example for me?

Just now I have a method to get all virtual machines installed on ESXi and I can read the power flag from each vm.

But I want to start the virtual machine...

2 Replies
Thomaswei
Contributor
Contributor

Hi, jwahler

I think you can do it with the VMpowerOps.java to reboot|poweron|poweroff|reset|standby|suspend|shutdown the virtual machiens

Thomaswei

Steve_Jin
Expert
Expert

Much simpler and shorter version:

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

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
Reply
0 Kudos