vSphere Web Services API


Data Object - VmToVmGroupsAntiAffinity(vim.vm.VmToVmGroupsAntiAffinity)

Extends
VmPlacementPolicy
See also
TagId
Since
vSphere API Release 9.1.0.0

Data Object Description

Specification of a placement policy that anti-affines this VM (for which this placement policy is being specified) with multiple groups of VMs.

This policy allows specifying multiple groups of VMs such that this VM is anti-affined with every VM of the other VM groups. Each of these other groups is identified by a unique vSphere tag. Effectively, this VM will be anti-affined with any VM that has any of those other tags.

However, note that while the policy will anti-affine a given VM with multiple "other" groups of VMs, there is no implied affinity or anti-affinity: 1) Within the VMs of any one of those "other" groups. 2) Between the VMs of any two of those "other" groups. Below example will explain this in more detail.

Consider a VM that needs to be anti-affined with a VM that has either tag-2 or tag-3 attached to it. This can be expressed by specifying VmToVmGroupsAntiAffinity policy in this VM's vmPlacementPolicies or vmPlacementPolicies and it would imply: - This VM will be anti-affined with every VM that has tag-2. - This VM will be anti-affined with every VM that has tag-3. - Any VM that has either tag-2 or tag-3 will be anti-affined with this VM. - To enforce the above anti-affinity while placing this VM, or any VM with tag-2 or tag-3, a compute-policy will be automatically created in this vCenter. - To associate the compute-policy representing this VmToVmGroupsAntiAffinity VmPlacementPolicy with this VM, one of the tags associated with this VM will be used. - In this example, one of this VM's tags, let's say tag-1, could be used to link this VM with such a compute-policy. Then this compute- policy would mean that any VM with "tag-1" will be anti-affined with any VM with "tag-2" or "tag-3". - VMs that have "tag-2" will not have any affinity/anti-affinity among themselves. - VMs that have "tag-3" will not have any affinity/anti-affinity among themselves. - VMs that have "tag-2" will not have any affinity/anti-affinity with VMs that have "tag-3". Likewise for VMs with "tag-3".

Note: - This placement policy is different than VmVmAntiAffinity because VmVmAntiAffinity allows specifying only 1 VM group and all the VMs within that group become anti-affined with each other, whereas, this placement policy allows anti-affining a given VM (with a given tag) with multiple groups VMs (represented via different tags).

Properties

Name Type Description
antiAffinedVmGroupTags*TagId[]

Tags identifying the "other" VM groups that need to be anti-affined with this VM.

A VM with any tag from the list of tags in antiAffinedVmGroupTags will be anti-affined with the VM that has selfTag tag. any VM that has any of the other tags in

This field must have at least one value that must be different from the value of selfTag. If this field is left unset or empty, then this VmToVmGroupsAntiAffinity placement policy will be ignored while placing this VM.

policyStrictness*xsd:string

Specifies the strictness of this VmToVmGroupsAntiAffinity placement policy while placing a VM for which this policy has been specified. For details, see VmPlacementPolicyVmPlacementPolicyStrictness

If this field is left unset, then the default value of VmPlacementPolicy.VmPlacementPolicyStrictness#PreferredDuringPlacementPreferredDuringExecution will be assumed.

policyTopology*xsd:string

Specifies the topology for enforcing this VmToVmGroupsAntiAffinity placement policy while placing a VM for which this policy is specified. For possible values, see VmPlacementPolicyVmPlacementPolicyTopology.

For example: - If this is set to VmPlacementPolicy.VmPlacementPolicyTopology#VSphereZone for a VmToVmGroupsAntiAffinity placement, then the groups of VMs anti-affined by this policy should be placed in different vSphere Zones. - If this is set to VmPlacementPolicy.VmPlacementPolicyTopology#Host, for a VmToVmGroupsAntiAffinity placement, then the groups of VMs anti-affined by this policy should be placed on different ESXi hosts.

If this field is left unset, then the default value of VmPlacementPolicy.VmPlacementPolicyTopology#Host will be assumed.

selfTag*TagId

Tag identifying this VM to associate this VmToVmGroupsAntiAffinity placement policy with this VM.

When a VmToVmGroupsAntiAffinity placement policy is specified for a VM, then one of the tags attached to this VM needs to link this VM with the corresponding compute-policy representing this VmToVmGroupsAntiAffinity placement policy. This is needed because when a VM is placed by vSphere DRS or HA, the compute-policies to be enforced are derived from the tag(s) attached to that VM. For example, consider a VM with tag-1 needs to be anti-affined with VMs of tag-2 and tag-3. When this placement policy needs to be specified for this VM, then tag-1 can be used as this VM's tag and the placement policy would say: [tag-1] ANTI-AFFINE [tag-2, tag-3].

If left unset, system will automatically generate a new vSphere tag and attach to this VM.

Properties inherited from VmPlacementPolicy
None
Properties inherited from DynamicData
None
*Need not be set
Show WSDL type definition