Yes, you can install all components of EventSentry, including the agents, on supported versions of Windows. It does not matter to EventSentry whether a supported version of Windows is running virtualized, or on physical hardware. (EventSentry versions 2.91 and newer)
The Hardware Inventory feature will, in most cases, detect that EventSentry is running inside a virtual machine. This allows you to query your installed hardware and filter results based on whether machines are physical or virtual machines.
You can also inventory the VMWare or Hyper-V host itself. For the Hyper-V host, deploy the agent to it. For the VMWare host, it must be present as a Network Device in EventSentry, and also requires additional configuration steps within ESXi:
https://www.eventsentry.com/kb/269.