VMware Cloud Community
abdulhussein
Enthusiast
Enthusiast
Jump to solution

shutdown esxi

can we use java api to shutdown, power on , suspended esxi

Reply
0 Kudos
1 Solution

Accepted Solutions
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

This method can be used to shutDown the host:

ShutdownHost_Task

Below method can used to reboot the host.

RebootHost_Task

Refer:VMware vSphere API Reference

Note: I have not used these methods yet. I will try this during this week. 


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

View solution in original post

Reply
0 Kudos
3 Replies
Anjani_Kumar
Commander
Commander
Jump to solution

I believe the JAVA API works on the VM level, host cant be manage.

if you are talking about vm then its possible to do the same.. there are many scripts are over the internet .

Please consider marking this answer "correct" or "helpful" if you found it useful. Anjani Kumar | VMware vExpert 2014-2015-2016 | Infrastructure Specialist Twitter : @anjaniyadav85 Website : http://www.Vmwareminds.com
Reply
0 Kudos
abdulhussein
Enthusiast
Enthusiast
Jump to solution

U mean we cannot use any java code to shutdown esxi?

Reply
0 Kudos
vThinkBeyondVM
VMware Employee
VMware Employee
Jump to solution

This method can be used to shutDown the host:

ShutdownHost_Task

Below method can used to reboot the host.

RebootHost_Task

Refer:VMware vSphere API Reference

Note: I have not used these methods yet. I will try this during this week. 


----------------------------------------------------------------
Thanks & Regards
Vikas, VCP70, MCTS on AD, SCJP6.0, VCF, vSphere with Tanzu specialist.
https://vThinkBeyondVM.com/about
-----------------------------------------------------------------
Disclaimer: Any views or opinions expressed here are strictly my own. I am solely responsible for all content published here. Content published here is not read, reviewed or approved in advance by VMware and does not necessarily represent or reflect the views or opinions of VMware.

Reply
0 Kudos