Retrieving Host Information
You retrieve information about the host by accessing data objects defined for the HostSystem.
- HostSystem.capability is a HostCapability object. The HostCapability properties indicate the features that are supported by the host, for example, maintenanceModeSupported or recursiveResourcePoolsSupported.
- HostSystem.runtimeInfo is a HostRuntimeInfo object that contains several data objects with detailed information about the current state of the host. You can, for example, extract the health status as a HealthSystemRuntime object or the power state as a HostPowerState object.
- HostSystem.hardware is a HostHardwareInfo object that allows you to retrieve the host’s hardware configuration including CPU and NUMA information and memory size.
- HostSystem.config is a HostConfigInfo object. This data object type encapsulates a typical set of host configuration information that is useful for displaying and configuring a host. You can access the HostConfigInfo object only on managed hosts, and only if the host is connected.
HostSystem has several additional properties that allow you to directly access the virtual machines, datastores, and networks associated with that system.
The QueryHostConnectionInfo, QueryMemoryOverhead, and QueryMemoryOverheadEx methods are available for information retrieval.
![](images/GUID-40D018EF-6110-458C-8AF3-B86DE4C0F0E0-high.png)