vmware/pyvmomi-community-samples
在 GitHub 查看Set Affinity rule on a particular VM to stop DRS
Open
#53 创建于 2014年6月4日
help wantedsample request
仓库指标
- Star
- (972 star)
- PR 合并指标
- (30 天内没有已合并 PR)
描述
Based on: https://github.com/vmware/pyvmomi/issues/25
The equivalent Java Code I found :
ClusterAffinityRuleSpec cars = new ClusterAffinityRuleSpec();
cars.setName("App and DB Appliance Bundle");
cars.setEnabled(Boolean.TRUE);
ManagedObjectReference vm1 = createMOR("VirtualMachine", vm1_oid);
ManagedObjectReference vm2 = createMOR("VirtualMachine", vm2_oid);
cars.setVm(new ManagedObjectReference[] {vm1, vm2});
Author a pyVmomi sample that accomplishes the same or similar.