vmware/pyvmomi-community-samples

Set Affinity rule on a particular VM to stop DRS

Open

#53 aberto em 4 de jun. de 2014

Ver no GitHub
 (2 comments) (0 reactions) (0 assignees)Python (914 forks)batch import
help wantedsample request

Métricas do repositório

Stars
 (972 stars)
Métricas de merge de PR
 (Nenhuma PRs mesclada em 30d)

Description

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.

Guia do colaborador