I think this has been discussed before if you search in that forum.
Obviously I did not find answer otherwise I would not have asked.
Please useing transrate system
With supermetrics it is possible to replicate the vm_remaining concept.
With following fomula you can compute the vm_remaining for each resource type (cpu, mem) and then take the minimum:
vm_remaining_per_resource = (usable_capacity * allocation_ration - amount_of_resources_occupied_by_deployed_vms) / vm_profile_size