1. A non-transitory computer readable medium comprising instructions which, when executed by one or more hardware processors, causes performance of operations comprising: identifying a plurality of applications, each application of the plurality of applications being grouped into a respective group of a set of groups; identifying a plurality of candidate virtual machines (VMs), each candidate VM of the plurality of candidate VMs being executed by a respective machine of a set of machines; specifying a set of one or more constraints that: limits assignment of any particular application, of the plurality of applications, to a candidate VM corresponding to a tenant associated with the particular application; limits assignment of a subset of the plurality of applications corresponding to a same group to candidate VMs executing on a same machine; storing a data model, applicable to a constraint programming solver, comprising: a first plurality of data model elements corresponding respectively to the plurality of applications; a second plurality of data model elements corresponding respectively to the plurality of candidate VMs; a third plurality of data model elements corresponding respectively to a plurality of machines configured for executing one or more of the candidate VMs; and the set of constraints.