You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Userdispersing algorithm does not consider VMs in starting state #11606
I tried to use userdispersing algorithm for volumes and VMs, still I've got numerous VMs starting on the same host. See #11412
In the end it was confirmed that algorithm considers just running VMs.
As VM start takes time, and VMs are started in packs (Jenkins jcloud plugin), all VMs are placed to the same host. Finally I had to switch to random algo that do dispersing a lot better (though not ideal)
I believe that as soon as VM is assigned for start on a host (still in Starting state), it should be already considered by userdispersing algorithm.
versions
CloudStack 4.21.0.0, though I had the same issue with 4.20
KVM
local fat volumes
The steps to reproduce the bug
Confiugre CS to use userdispersing algorithm (volumes and VMs)
Start several VMs via api without waiting for response that VM was started, e.g.
for i in {01..10}; do cloudstack deployVirtualMachine serviceofferingid=XXX templateid=YYY zoneid=ZZZ name=test-${i} & done
in my env all VMs start on the same host, even if I add some delay to the loop, unless the delay is enough to fully start VM
What to do about it?
Algorithm should query both Running and Starting VMs and use that data to decide the next VM placement
Activity
weizhouapache commentedon Oct 2, 2025
fixed by #11751