1

It's possible to turn on/off host using vSphere API using vCenter?

I can't find suitable function on VMware API or some example in pythonor other language.

bob_marley
  • 11
  • 3

1 Answers1

1

You can power off the host using the vSphere API using the HostSystem Object.

https://www.vmware.com/support/developer/vc-sdk/visdk41pubs/ApiReference/ → Managed Object Types → Search for Host System → Click Local Methods at the top.

There are methods called ShutdownHost_Task or PowerDownHostToStandby_Task.

bsnchan
  • 276
  • 2
  • 4