akrasnov-drv opened a new issue, #11606: URL: https://github.com/apache/cloudstack/issues/11606
### problem I tried to use userdispersing algorithm for volumes and VMs, still I've got numerous VMs starting on the same host. See https://github.com/apache/cloudstack/discussions/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 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 1. Confiugre CS to use userdispersing algorithm (volumes and VMs) 2. 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 if 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 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: commits-unsubscr...@cloudstack.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org