Someone asked a similar question 2 years ago with no responses, so I am going to dip my toe in...
Looking to create dynamic groups that contain the associated VM's from each ESX host in our environment... my thought is to use the dynamic group to mute alerting when the ESX host is down. We have already have a node custom property to identify the common ESX host assignment for each VM, but the continuity is lost when an administrator vMotion's a virtual machine for whatever reason and does not put it back where it normally belongs... so hoping to use a dynamic query to manage the discrepancies with the custom property values.
So far, I cannot find a way to select a VM host and enumerate those currently hosted VM's using a dynamic query.