Retrieving Information About ESXi Hosts

You retrieve information about the ESXi hosts running in a vCenter Server instance by listing only the ESXi hosts that you are interested in.

To filter the ESXi hosts on a vCenter Server instance and get only the ones you want, call the list function and pass your criteria with a HostTypes.FilterSpec instance. Use the HostTypes.FilterSpec instance to combine several filter criteria by including one or more of the following properties:
  • The name or unique identifier of the host.
  • Clusters, data centers, or folders that contain the host.
  • Connection state of the host which can be one of the following: CONNECTED, DISCONNECTED, or NOT_RESPONDING.
  • Power state of the host which can be one of the following: POWERED_OFF, POWERED_ON, or STANDBY.

The function returns a list of com.vmware.vcenter.HostTypes.Summary objects that contain information about up to 2500 hosts that match all specified criteria. You can use the list to retrieve information about the returned ESXi hosts.