Vsan System Ex Vsan Query Host Drs Stats
Query vSAN DRS stats of this host and all vSAN VMs registered on this host.
Required privileges: System.Read
The unique identifier for the managed object to which the method attaches; the serialized managed object reference for a request has the form moType/moId
, in this case VsanSystemEx/{moId}
.
The vSphere release schema. The current specification covers vSphere 9.0.0.0 APIs.
"VsanQueryHostDrsStatsRequestType Object"
In regular vSAN cluster, it indicates sorted list of vSAN member host Uuid. It is used to determine the full set of vSAN member hosts and the sequence to organize vSAN VM stats. In stretched compute only cluster, it is an array filled by '0' and '1', to indicate the host membership of configured site fault domains, this is to fill in the gap of absence of vSAN host fault domain on vSAN enabled node.
List of VM instance UUID. If specified, only stats of given VMs will be returned, otherwise all vSAN VMs registered on this host will be involved if this parameter is omitted. By default template VM will be ignored unless it is specified by this paramter.
Only applicable to stretched compute only node, to indicate the index of the target host in parameter 'hostUuids'.
"VsanHostDrsStats Object"
vSAN host entity associated to the DRS stats.
Binary value to present vSAN DRS stats in below C struct: typedef VmHostStat uint8; // vSAN VM read locality per host.
// 1 means the host can serve read request // without cross site IO, and 0 means // either the data is inaccessible to this // host or the host needs cross site read // to serve the read request. struct VmStats { Uuid vmUuid; // VM instance UUID; uint32 totalSizeInKb; // Total capacity used by this VM in KB on // vSAN datastore; VmHostStat perHostValue[0]; // Weight of VM active vSAN data contributed // per vSAN host. The order is determined by // host member list specified to API // VsanQueryHostDrsStats, and length is // determined by number of vSAN member hosts; }; struct Stats { uint64 hostCapInKb; // host capacity contributed to vSAN in KB; uint64 hostUsageInKb; // host usage on vSAN datastore in KB; uint32 numVms; // number of vSAN VMs registered on this host; uint32 numHosts; // number of vSAN member hosts; It is determined // by host member list specified to API // VsanQueryHostDrsStats. Any host member change // can be detected by vSAN VC service, and trigger // next stats query to capture the new change. VmStats perVmStats[0];// vSAN VM DRS stats, length is determined by // numVms; And note that size of VmStats struct // itself is dynamic. };
Whether object site read locality is presented in VmStats
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '[{}]' https://{api_host}/sdk/vim25/{release}/vsan/VsanSystemEx/{moId}/VsanQueryHostDrsStats