I'm looking for a way to generate, or derive, a unique CPU identifier. For example:
If SERVER_A uses vmotion from HOST_A to HOST_B, I want to be able to tell the differences between the cpus.
What specific information are you seeking?
There has to be a baseline of CPU compatibility in an existing vMotion arrangement. vMotion doesn't function without it. See the descriptions of the Enhanced vMotion Compatibility (EVC) function within VMWare.
With EVC, you can be sure that the CPU capabilities of each host are consistent (or at least a common subset of the available features).
CPU information is also available within the guest operating system.
At the ESXi host level,
If the goal is to tell the difference between host servers, this would be very easy if the CPU's are different. At that point, something like the suggestions above would work.
If the hosts are identical, you either need to tap into the VMWare API, or use the suggestion from Stack Overflow, which involves disabling a VMWare security setting and establishing a unique identifier for the host.
You can set