kvm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* KVM Guest Detection
@ 2015-02-06 20:08 Chris J Arges
  2015-02-09 13:26 ` Paolo Bonzini
  0 siblings, 1 reply; 8+ messages in thread
From: Chris J Arges @ 2015-02-06 20:08 UTC (permalink / raw)
  To: kvm

Is there a architecture and machine type independent way to detect that
one is running inside a KVM guest? I've noticed the following systemd
code which does this detection and it seems to be very architecture
dependent for KVM:
https://github.com/systemd/systemd/blob/master/src/shared/virt.c

In addition one could grep for strings in the kernel log or CPU types if
using QEMU CPU model.

Given the many ways to do this, would it make sense to create a sysfs
entry (similar to how Xen does this with /sys/hypervisor/type), so that
one can easily tell they are running in a KVM guest?

I can work on a patch, but initial feedback would be helpful.

Thanks,
--chris j arges

^ permalink raw reply	[flat|nested] 8+ messages in thread
* KVM  Guest detection
@ 2008-08-13 17:57 jd
  2008-08-13 18:40 ` David Mair
  2008-08-13 18:59 ` Anthony Liguori
  0 siblings, 2 replies; 8+ messages in thread
From: jd @ 2008-08-13 17:57 UTC (permalink / raw)
  To: KVM List

Hi

Is there a way to detect if a particular machine is a VM running on KVM hypervisor or not. i.e from within a guest can one figure out if it is running on top of a hypervisor and not physical machine ? [For both Linux guests and Windows guests ]

/Jd



      

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2015-02-09 16:12 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-06 20:08 KVM Guest Detection Chris J Arges
2015-02-09 13:26 ` Paolo Bonzini
2015-02-09 14:37   ` Chris J Arges
2015-02-09 16:12     ` Paolo Bonzini
  -- strict thread matches above, loose matches on Subject: below --
2008-08-13 17:57 KVM Guest detection jd
2008-08-13 18:40 ` David Mair
2008-08-13 18:59 ` Anthony Liguori
2008-08-13 21:05   ` jd

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).