Cluster Compute Resource Recommend Hosts For Vm
Deprecated as of VI API 2.5, use PowerOnMultiVM_Task. RecommendHostsForVm cannot make any recommendations if DRS cannot find the specified host in the cluster. With PowerOnMultiVM_Task, DRS attempts to migrate virtual machines and power on hosts in standby mode, given the same conditions.
Gets a recommendation for where to power on, resume, revert from powered-off state to powered on state, or to migrate a specific virtual machine.
If no host is found, an empty list is returned.
The type of operation is implied by the state of the virtual machine. Returned hosts are intended for power-on or resume if the virtual machine is powered-off or suspended. However, if the virtual machine is powered-on, the request is assumed to be for migrating a virtual machine into a DRS enabled cluster. In that case, the ResourcePool argument should be specified and the ResourcePool and the virtual machine cannot be in the same cluster.
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 ClusterComputeResource/{moId}
.
The vSphere release schema. The current specification covers vSphere 8.0.3.0 APIs.
Show optional properties
{
"vm": {}
}
{
"vm": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"pool": {
"_typeName": "string",
"type": "string",
"value": "string"
}
}
An array of HostRecommendation ordered by their rating.
[
{
"_typeName": "string",
"host": {
"_typeName": "string",
"type": "string",
"value": "string"
},
"rating": 0
}
]