Quantcast
Channel: VMware Communities : All Content - VMware vCenter™
Viewing all articles
Browse latest Browse all 24426

Set Affinity Rule using pyVmomi

$
0
0

I want to set Affinity Rule on a particular VM using pyVmomi. I am taking the help from Steve's sample example DrsAffRule.java. Now I am stuck in this specific line :

 

//create the MOR object for DRS cluster
ManagedObjectReference mref_drs = createMOR("ClusterComputeResource", drs_obj_id);
ClusterComputeResource ccr = (ClusterComputeResource )
  MorUtil.createExactManagedEntity(si.getServerConnection(), mref_drs);

 

Didn't find any ManagedObjectReference class in pyVmomi. The createMOR() and createExactManagedEntity() methods are in util package I tried to mimic the same in pyVmomi but without the MOR class I'm not able to do that.

 

Any idea how to do that ????

 

Thanks,

Reuben


Viewing all articles
Browse latest Browse all 24426

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>