Hi all,
I created a pre provisioning workflow which places a VM in a DRS group.
The problem is now that the customer set DRS to manual instead of automatic.
Therefore, it is now possible that the VM is deployed on a host in the wrong datacenter and is not moved, because of the DRS setting (manual).
Is there a way to apply DRS recommendations with a vRO Workflow?
Thanks.
Andi
drsCluster.refreshRecommendation() was not working. But thanks for your answer. That led me to the solution.
I solved it with this:
var ClusterRecommendations = cluster.drsRecommendation;
for each ( CLRec in ClusterRecommendations){
System.log(CLRec.key);
cluster.applyRecommendation(CLRec.key);
}
cluster is a VC:ClusterComputeResource.
Try
drsCluster.refreshRecommendation()
, where drsCluster is a VC:ClusterComputeResource.
drsCluster.refreshRecommendation() was not working. But thanks for your answer. That led me to the solution.
I solved it with this:
var ClusterRecommendations = cluster.drsRecommendation;
for each ( CLRec in ClusterRecommendations){
System.log(CLRec.key);
cluster.applyRecommendation(CLRec.key);
}
cluster is a VC:ClusterComputeResource.