[GH-ISSUE #26] Exclude VM from migration if it is the only VM on a node #16

Open
opened 2026-02-26 17:46:08 +03:00 by kerem · 2 comments
Owner

Originally created by @mjolnirgs on GitHub (Apr 29, 2024).
Original GitHub issue: https://github.com/cvk98/Proxmox-load-balancer/issues/26

I have a large cluster of 10 nodes, that is sometimes very lightly loaded with less than 10 VMs. Then we will provision a large number of temporary VMs that require balancing. This is part of an automated provisioning system, so we are not always aware that we need to turn on the load-balancer.

Currently the script will endlessly migrate VMs from one host to another when the cluster has fewer than 1 VM per host.

We can set the memory percentage very high, but then that would defeat the purpose of the load balancer, and starting and stopping the script manually would be less than ideal. We could also manually exclude the long running VMs from migration, but then they might require migration in the future and it would be better not to have to manually manage the load-balancer like that.

In all use cases, I cannot see any value at all in the load balancer migrating a VM away from a node when it is the only VM on the node.

Originally created by @mjolnirgs on GitHub (Apr 29, 2024). Original GitHub issue: https://github.com/cvk98/Proxmox-load-balancer/issues/26 I have a large cluster of 10 nodes, that is sometimes very lightly loaded with less than 10 VMs. Then we will provision a large number of temporary VMs that require balancing. This is part of an automated provisioning system, so we are not always aware that we need to turn on the load-balancer. Currently the script will endlessly migrate VMs from one host to another when the cluster has fewer than 1 VM per host. We can set the memory percentage very high, but then that would defeat the purpose of the load balancer, and starting and stopping the script manually would be less than ideal. We could also manually exclude the long running VMs from migration, but then they might require migration in the future and it would be better not to have to manually manage the load-balancer like that. In all use cases, I cannot see any value at all in the load balancer migrating a VM away from a node when it is the only VM on the node.
Author
Owner

@cvk98 commented on GitHub (May 2, 2024):

I absolutely agree with you. It was this logic that I put into my program. If this is not the case, then something did not go according to plan =)

<!-- gh-comment-id:2090041356 --> @cvk98 commented on GitHub (May 2, 2024): I absolutely agree with you. It was this logic that I put into my program. If this is not the case, then something did not go according to plan =)
Author
Owner

@mjolnirgs commented on GitHub (May 8, 2024):

I can confirm it is definitely endlessly migrating a VM around the empty nodes in the cluster.

<!-- gh-comment-id:2100584515 --> @mjolnirgs commented on GitHub (May 8, 2024): I can confirm it is definitely endlessly migrating a VM around the empty nodes in the cluster.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Proxmox-load-balancer#16
No description provided.