VmAffinityRuleType

Element:
VmAffinityRule
Type:
VmAffinityRuleType
Namespace:
http://www.vmware.com/vcloud/v1.5
Description:
A VM Affinity rule to be applied to two or more VMs. A VM-VM affinity rule specifies whether selected individual virtual machines should run on the same host or be kept on separate hosts. An affinity rule tries to keep the specified virtual machines together on the same host while an anti-affinity rule tries to keep the specified virtual machines apart.
Since:
20.0
Schema:
vmAffinityRule.xsd
Media type(s):
application/vnd.vmware.vcloud.vmaffinityrule+xml
Extends:
IdentifiableResourceType
XML Representation:
<VmAffinityRule xmlns="http://www.vmware.com/vcloud/v1.5" href="xs:anyURI" type="xs:string" id="xs:string" operationKey="xs:string">
    <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
            rel="xs:string"/>
    <Name> xs:string </Name>
    <IsEnabled> xs:boolean </IsEnabled>
    <IsMandatory> xs:boolean </IsMandatory>
    <Polarity> VmAffinityRuleType/Polarity </Polarity>
    <Scope> VmAffinityRuleType/Scope </Scope>
    <VmReferences href="xs:anyURI" type="xs:string">
        <Link href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"
                rel="xs:string"/>
        <VmReference href="xs:anyURI" id="xs:string" type="xs:string" name="xs:string"/>
    </VmReferences>
</VmAffinityRule>

Attributes

Attribute Type Required Modifiable Since Deprecated Description
href anyURI No always 20.0 The URI of the entity.
type string No always 20.0 The MIME type of the entity.
id string No none 20.0 The entity identifier, expressed in URN format. The value of this attribute uniquely identifies the entity, persists for the life of the entity, and is never reused.
operationKey string No create 5.1 Optional unique identifier to support idempotent semantics for create and delete operations.

Elements

Element Type Required Modifiable Since Deprecated Description
IsEnabled boolean Yes always 20.0 True if the VM Affinity rule is enabled.
IsMandatory boolean Yes always 20.0 True if this VM affinity rule is mandatory. If a rule is specified as mandatory, a host failover will not power on the VM if doing so would violate the rule.
Link LinkType No none 20.0 A reference to an entity or operation associated with this object.
Name string Yes always 20.0 The name of this VM Affinity rule.
Polarity VmAffinityRuleType/Polarity Yes always 20.0 The polarity of this rule. One of:
Affinity
Anti-Affinity
Scope VmAffinityRuleType/Scope Yes always 20.0 This defines whether the rule can be applied on the basis of host or other group One of:
Host
VCloudExtension VCloudExtensionType No always 20.0 An optional extension element that can contain an arbitrary number of elements and attributes. Not related to extension services.
VmReferences VmsType Yes always 20.0 A list of VMs under a specific VM Affinity rule.

Operations

CRUD Operation Description Since Deprecated
read GET /vdc/{id}/vmAffinityRules/{ruleId} Retrieves the specified VM affinity rule
update PUT /vdc/{id}/vmAffinityRules/{ruleId} Updates the specified VM affinity/anti-affinity rule.
delete DELETE /vdc/{id}/vmAffinityRules/{ruleId} Deletes the specified VM affinity/anti-affinity rule
as input POST /vdc/{id}/vmAffinityRules Creates a new VM affinity rule.This operation is asynchronous and returns a task that you can monitor to track the progress of the request.