VMware Cloud Community
anba89
Enthusiast
Enthusiast
Jump to solution

Apply DRS Recommendations by vRO Workflow

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

Tags (3)
0 Kudos
1 Solution

Accepted Solutions
anba89
Enthusiast
Enthusiast
Jump to solution

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.

View solution in original post

0 Kudos
2 Replies
filosmith
Enthusiast
Enthusiast
Jump to solution

Try

drsCluster.refreshRecommendation()

, where drsCluster is a VC:ClusterComputeResource.

anba89
Enthusiast
Enthusiast
Jump to solution

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.

0 Kudos