PAPITopics:PAPI on VMware
ESXi provides guest OS virtual performance counters.
Please refer to the vSphere documentation on how to enable virtual cpu performance counters using the vSphere Web Client. Instructions are duplicated below:
Pick up a tarball from our download page. Please refer to README.txt and INSTALL.txt in the root directory for instructions on compiling PAPI on your system. Note that no special flags should be required for running on the virtual machine. Proceed with building as if on a bare metal machine.
If you are using vMotion, be aware that according to this VMWare kb article vMotion will only migrate virtual machine hosts between machines which have the same list of available performance monitoring events.
Check out PAPITopics:Virtual PAPI Performance for comparisons of event counts on VMware and bare metal.