Performing the analysis manually
If you selected automatic mode for a resource policy, the cluster workload will be analyzed automatically and recommendations on VM migrations will be applied as soon as they are found. With manual mode, however, you will need to manually start the analysis and apply pending recommendations, if any.
When applying recommendations in manual mode, you can cancel them at any time. In this case, VMs that have already been migrated will not be moved back to their source nodes, ongoing migrations will be finished, and pending recommendations will be discarded.
Limitations
- Recommendations are only provided when applicable. For example, if a VM is expected to migrate from a node but no other nodes have sufficient resources to host it, no recommendation will be shown.
- You cannot cancel recommendations in automatic mode.
Prerequisites
- The resource policy is enabled, as described in Enabling and disabling resource policies.
To start the analysis manually
Admin panel
- On the Compute > Resource policies > Policies screen, click the line with the required policy.
- On the policy right pane, click Analyze now.
Once the analysis is complete, the recommendations found will appear in the Recommendations section on the policy right pane. You can click the line with a recommendation to view its details.
Command-line interface
Use the following command:
vinfra service compute resource-policies policy analyze <policy>
<policy>- Policy name or ID
For example, to start the analysis for dynamic distribution, run:
# vinfra service compute resource-policies policy analyze "Dynamic distribution"
You can check the recommendations found in the vinfra service compute resource-policies action list output:
# vinfra service compute resource-policies recommendation list "Dynamic distribution" +--------------------------------------+-------------+----------------------------------+ | id | state | created_at | +--------------------------------------+-------------+----------------------------------+ | 7f8dd1fe-5634-4e1e-ad9c-e6d9db47a33b | RECOMMENDED | 2025-03-21T16:28:54.626936+00:00 | +--------------------------------------+-------------+----------------------------------+ # vinfra service compute resource-policies action list 7f8dd1fe-5634-4e1e-ad9c-e6d9db47a33b +-------------+---------+----------------------------------------+------------------------------------------+ | id | state | description | input_parameters | +-------------+---------+----------------------------------------+------------------------------------------+ | 23f2fb03<…> | PENDING | Moving a VM instance from source_node | destination_node: node001.vstoragedomain | | | | to destination_node | migration_type: auto | | | | | order: 0 | | | | | resource_id: 156022cf<…> | | | | | resource_name: vm8 | | | | | source_node: node002.vstoragedomain | | 8ae480bf<…> | PENDING | Moving a VM instance from source_node | destination_node: node003.vstoragedomain | | | | to destination_node | migration_type: auto | | | | | order: 1 | | | | | resource_id: 4eda1661<…> | | | | | resource_name: vm2 | | | | | source_node: node002.vstoragedomain | | 66f30e05<…> | PENDING | Moving a VM instance from source_node | destination_node: node001.vstoragedomain | | | | to destination_node | migration_type: auto | | | | | order: 2 | | | | | resource_id: 331ba64c<…> | | | | | resource_name: vm6 | | | | | source_node: node002.vstoragedomain | +-------------+---------+----------------------------------------+------------------------------------------+
To apply recommendations
Admin panel
- On the Compute > Resource policies > Policies screen, click the line with the required policy.
- On the policy right pane, review the list of pending recommendations and click Apply.
You can check the history of applied recommendations on the Compute > Resource policies > Actions screen.
Command-line interface
Use the following command:
vinfra service compute resource-policies recommendation apply <recommendation>
<recommendation>- Recommendation ID
For example, to apply the recommendation with the ID 7f8dd1fe-5634-4e1e-ad9c-e6d9db47a33b, run:
# vinfra service compute resource-policies recommendation apply 7f8dd1fe-5634-4e1e-ad9c-e6d9db47a33b
To cancel recommendations
Admin panel
- On the policy right pane, click Cancel.
- In the confirmation window, click Confirm.
You can check the history of canceled recommendations on the Compute > Resource policies > Actions screen.
Command-line interface
Use the following command:
vinfra service compute resource-policies recommendation cancel <recommendation>
<recommendation>- Recommendation ID
For example, to cancel the recommendation with the ID 7f8dd1fe-5634-4e1e-ad9c-e6d9db47a33b, run:
# vinfra service compute resource-policies recommendation cancel 7f8dd1fe-5634-4e1e-ad9c-e6d9db47a33b