1. A method of placing virtual machines, comprising: representing physical entities upon which the virtual machines are to be placed as a hierarchical tree of bins; receiving one or more virtual machine-to-physical entity constraints on a placement scheme for the virtual machines; and using information derived from the hierarchical tree and the virtual machine-to-physical entity constraints to define, for each level of the hierarchical tree, a placement solution that associates given virtual machines to given physical entities by solving, within a computing machine having a hardware element, a bin packing problem, wherein the bin packing problem is solved at a given level of the hierarchical tree using a placement algorithm, together with a placement solution from a prior level.