A method and apparatus are presented for allocating at least one virtual resource to a physical and/or software resource from a plurality of physical and/or software resources considering affinity information, which specifies whether or not a requested virtual resource may be collocated on the same physical and/or software resource with one or more virtual resources of tenants different from a first tenant.