vmware/pyvmomi-community-samples

Set Affinity rule on a particular VM to stop DRS

Open

#53 geöffnet am 4. Juni 2014

Auf GitHub ansehen
 (2 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)Python (914 Forks)batch import
help wantedsample request

Repository-Metriken

Stars
 (972 Stars)
PR-Merge-Metriken
 (Keine gemergten PRs in 30 T)

Beschreibung

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.

Contributor Guide