[libvirt-users] Check whether we are runnig on a KVM guest

Hi, How may I , via a C program , check whether I'm running on a KVM guest ? May I use the same API on Windows and Linux Guest ? Regards, J.P. Ribeauville P: +33.(0).1.47.17.27.87 Puteaux 3 Etage 5 Bureau 4 jpribeauville@axway.com<mailto:jpribeauville@axway.com> http://www.axway.com<http://www.axway.com/> P Pensez à l'environnement avant d'imprimer.

On 25.08.2015 11:53, Jean-Pierre Ribeauville wrote:
Hi,
How may I , via a C program , check whether I'm running on a KVM guest ?
May I use the same API on Windows and Linux Guest ?
I don't think there's gonna be a single API. After all, hypervisors tend to hide the fact that you're running in virtualized environment. But fortunately, Rich has written a script just for what you're asking: http://people.redhat.com/~rjones/virt-what/ Michal
participants (2)
-
Jean-Pierre Ribeauville
-
Michal Privoznik