Assuming you have the ‘Virtual Machine Guest Information’ analysis activated from the ‘Virtual Endpoint Manager’ site, you should be able to leverage session relevance such as:
(id of it, name of it) of bes computers whose (value of result from (bes property "Virtual Machine UUID") of it = "40116cbc-8fd5-4f76-ffe7-8a7838025y29")