Smart rescheduling in case of absent free resources

I wonder if one knows if it is possible to somehow rearrange VMs if any host doesn’t has enough resources to start a new VM but cluster does.

For example, if we have 3 hosts with 8 cores each. We have 2 VMs with 2CPUs each running on every host. So each and every host has 4CPUs free. And now we need to run a VM with 6CPUs. Of course this VM will never deployed until we migrate at least one VM to other host.

Is there any solution to do this automatically? May be current scheduler already able to do it and it is necessary to enable this feature? And yes, I know about scheduling policy, so I can tightly pack VMs at their start. But in case of a big cluster and many deploys\terminations there will be holes and fragmentation.

Thanks!

Hi

You are right currently there is no automatic “defragmentation” option for
the scheduler. You can trigger a manual reschedule, this will move a VM to
another host (preserving any scheduling constraint) so you can make room
for the new ones.

1 Like