There is actually already a scheduler that does it, it uses the "packing policy": Packing Policy
Target: Minimize the number of cluster nodes in use Heuristic: Pack the VMs in the cluster nodes to reduce VM fragmentation Implementation: Use those nodes with more VMs running first RANK = RUNNING_VMS ( http://archives.opennebula.org/documentation:rel4.4:schg#packing_policy ) cheers, Carlo Daffara ----- Messaggio originale ----- Da: "Marco Fanti" <marco.fa...@studenti.polito.it> A: "Users OpenNebula" <users@lists.opennebula.org> Inviato: Lunedì, 14 aprile 2014 14:54:11 Oggetto: [one-users] How to interrogate the scheduler I'm writing a program that has to minimize the number of running hosts. I need to know, before that I command a VM reschedule or a template instantiation, if it is possible to ask to the scheduler which will be the selected host. Kind regards, Marco Fanti _______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org _______________________________________________ Users mailing list Users@lists.opennebula.org http://lists.opennebula.org/listinfo.cgi/users-opennebula.org