VMware {code} Community
workvmware
Contributor
Contributor

HostSystemPowerState for ESX 3.0

Hello, I am trying to get the power state for EX 3.0 host, but a null pointer is returned for HostSystemPowerState object. However, the hosts are up and running. Can we retrieve power state for ESX 3.0 or it is not supported by the SDK? It seems to work for ESX 3.5 and above and I am using 2.5 SDK.

Here is the snippet that I used to get power state:

HostSystemPowerState hsps = hls.getRuntime().getPowerState();

where hls is HostListSummary type and hsps is null.

Any answer is much appreciated.

Thank you,

Sushant Dhakal

0 Kudos
1 Reply
lamw
Community Manager
Community Manager

If the powerState property is not exposed in the API documentation, then you will not be able to retrieve it. You can easily verify this by looking at the API docs for ESX 3.0

=========================================================================

William Lam

VMware vExpert 2009,2010

VMware scripts and resources at:

Twitter: @lamw

Getting Started with the vMA (tips/tricks)

Getting Started with the vSphere SDK for Perl

VMware Code Central - Scripts/Sample code for Developers and Administrators

VMware Developer Community

If you find this information useful, please award points for "correct" or "helpful".

0 Kudos