Selecting a cluster node for the virtual machine
When creating a VM, you can specify the cluster node to host it or choose to assign a node automatically. The node selection algorithm depends on the cluster settings.
When you create a cluster, you choose the principle of VM distribution on nodes — homogeneous or successive. In successive distribution, VMs are created on the cluster node that is filled up the most, in homogeneous distribution — on the most vacant node.
To select the most vacant or the most filled up node in a cluster, VMmanager calculates the available resources rate for each node.
The rate is calculated as follows: (T−U)÷T.
T — total mount or resources on the cluster node, taking into account overselling;
U — actual resource usage.
How the system selects a node:
- Calculates the rate for every node:
- the rate by resource types: CPU number, RAM, and disk space.
- chooses the smallest result of three.
- Groups the cluster nodes by the rates. In successive distribution — the lower the rate, the higher the priority of node selection. In homogeneous distribution — the higher the rate, the higher the priority of node selection.
- Checks that a VM can be located on the cluster node. If the node has insufficient resources, the system will check the next one by priority.
- The process will stop when the system finds the node with sufficient resources.