Hello,
we are using Foreman with Xen Orchestra to manage our infra. Right now we are creating our VMs through the GUI which does a good job. Now I was tasked to automate the process. While the api doc has (nearly) all the info, I could not find out how to decide where to put the new VM. We have multiple pools, the obvious choice is to place the new one on the least used pool for example. Inside the GUI the user has to select inside which pool to place the new VM. The VM seems to be then automagicaly placed on a server inside this pool. This is what my question is about: how does foreman makes this decision ?
The api seems to not expose resource usage information on any level, which does not seems to be exposed by Xen Orchestra either except on the host level. Using my knowledge it would mean that I am going to need check all hosts in all pools and compare the usage to make a decision.
Am I correct ? Does Foreman even makes this decision or is this actually made by Xen Orchestra itself ?
Should I find new info I will post it here. Thanks in advance.
Best regards.