VM Scheduling Policy
VM scheduling policies define affinity or anti-affinity relationships between VMs, or between VMs and hosts. Administrators can use scheduling policies to control where VMs run and meet requirements such as service isolation, fault domain planning, performance optimization, and deployment on specific hosts.
Core Components
- Scheduling policy
- Defines the policy type and execution mechanism for VM scheduling.
- VM Scheduling Group
- The basic unit for associating VMs with scheduling policies.
- A VM can join only one VM scheduling group. After a VM joins a group, the VM is assigned to a host according to the scheduling policy associated with the group.
- A VM scheduling group can be associated with one or more scheduling policies.
- A scheduling policy can be associated with one VM scheduling group.
- Deleting a VM scheduling group also deletes the associated VM scheduling policies.
- Host Scheduling Group
- The basic unit for associating hosts with scheduling policies. Host scheduling groups are used only by VMs-exclusive-from-hosts and VMs-affinitive-to-hosts policies.
- A host can join only one host scheduling group. After a host joins a group, the host is scheduled according to the scheduling policy associated with the group.
- A host scheduling group can be associated with one or more scheduling policies.
- A scheduling policy can be associated with one host scheduling group.
- Deleting a host scheduling group also deletes the associated VM scheduling policies.
Policy Types and Execution Mechanisms
| Type | Description |
|---|---|
| VM Exclusive from Each Other | VMs in the same VM scheduling group should not or must not run on the same host. |
| VM Affinitive to Each Other | VMs in the same VM scheduling group should or must run on the same host. |
| VMs Exclusive from Hosts | VMs in a VM scheduling group should not or must not run on hosts in a host scheduling group. |
| VMs Affinitive to Hosts | VMs in a VM scheduling group should or must run on hosts in a host scheduling group. |
Each scheduling policy type supports the Hard and Soft execution mechanisms.
- The Hard mechanism requires VMs to be assigned to hosts strictly according to the policy. If no host satisfies the policy, VM startup fails.
- The Soft mechanism prioritizes host assignment according to the policy. If no host satisfies the policy, the VM can attempt to run on another host with sufficient resources.
How It Works
After a VM joins a VM scheduling group, the scheduling policy associated with the group affects host assignment for the VM.
- VM-exclusive-from-each-other and VM-affinitive-to-each-other policies do not require a host scheduling group. VMs are assigned to hosts according to the policy and its execution mechanism.
- VMs-exclusive-from-hosts and VMs-affinitive-to-hosts policies require both a VM scheduling group and a host scheduling group. VMs are assigned to hosts according to the policy and its execution mechanism.
Typical Scenarios
Different scheduling policies apply to different service isolation, resource aggregation, and host constraint scenarios.
- VM-exclusive-from-each-other policies are suitable for active/standby databases, distributed application nodes, and other scenarios where a single host failure must not affect multiple service instances.
- VM-affinitive-to-each-other policies are suitable for scenarios where multiple VMs are expected to run on the same host as much as possible to reduce communication latency.
- VMs-exclusive-from-hosts policies are suitable for scenarios where VMs need to avoid specified hosts, host groups, or fault domains.
- VMs-affinitive-to-hosts policies are suitable for scenarios where VMs need to be constrained to specified hardware specifications, rack locations, or host groups.
Create Mutually Exclusive/Affinitive VM Scheduling Policies
Before you begin
Mutually exclusive or affinitive VM scheduling policies must be associated with a VM scheduling group before they can take effect on VMs in the group.Procedure
- In the navigation pane, choose .
-
Click New VM Scheduling Group to create a VM scheduling group.
Option Description Name Specifies the VM scheduling group name, for example, VM Scheduling Group A1. Description Enter a brief description for the VM scheduling group. Virtual Machine Selects one or more target VMs to join the scheduling group. - Click OK.
- On the VM Scheduling Policy page, click New VM Scheduling Policy.
-
Create a mutually exclusive or affinitive VM scheduling policy.
Option Description Name Specifies the VM scheduling policy name, for example, VM Scheduling Policy A1. Description Enter a brief description for the VM scheduling policy. Type Select VM Exclusive from Each Other or VM Affinitive to Each Other. Execution Mechanism - Hard: VMs are forcibly assigned to hosts based on the associated VM scheduling policies. If no host satisfies the policy, the VM fails to start.
- Soft: VMs are preferentially assigned to hosts based on the associated VM scheduling policies. If no host satisfies the policy, the VM can attempt to run on another host with sufficient resources.
Associate VM Scheduling Group After the policy is associated with a VM scheduling group, it takes effect on all VMs in the group. You can associate the policy with an existing scheduling group or create a scheduling group. - Click OK.
Create VMs Exclusive from/Affinitive to Hosts Scheduling Policies
Before you begin
VMs exclusive from hosts or VMs affinitive to hosts scheduling policies must be associated with both a VM scheduling group and a host scheduling group before they can take effect.Procedure
- In the navigation pane, choose .
-
Click New VM Scheduling Group to create a VM scheduling group.
Option Description Name Specifies the VM scheduling group name, for example, VM Scheduling Group A2. Description Enter a brief description for the VM scheduling group. Virtual Machine Selects one or more target VMs to join the scheduling group. -
On the Host Scheduling Group page, click New Host Scheduling Group.
Option Description Name Specifies the host scheduling group name, for example, Host Scheduling Group A2. Description Enter a brief description for the host scheduling group. Host Selects one or more hosts to join the scheduling group. - On the VM Scheduling Policy page, click New VM Scheduling Policy.
-
Create a VMs exclusive from hosts or VMs affinitive to hosts scheduling policy.
Option Description Name Specifies the VM scheduling policy name, for example, VM Scheduling Policy A2. Description Enter a brief description for the VM scheduling policy. Type Select VMs Exclusive from Hosts or VMs Affinitive to Hosts. Execution Mechanism - Hard: VMs are forcibly assigned to hosts based on the associated VM scheduling policies. If no host satisfies the policy, the VM fails to start.
- Soft: VMs are preferentially assigned to hosts based on the associated VM scheduling policies. If no host satisfies the policy, the VM can attempt to run on another host with sufficient resources.
Associate VM Scheduling Group After the policy is associated with a VM scheduling group, it takes effect on all VMs in the group. Associate Host Scheduling Group After the policy is associated with a host scheduling group, it applies the exclusive or affinitive rule based on the hosts in the group. - Click OK.
Manage VM Scheduling Policies and Related Resources
About this task
After creating VM scheduling policies, VM scheduling groups, or host scheduling groups, you can adjust the enablement status, basic information, and group resources as needed.

Note: