From: David Mair Subject: Re: KVM Guest detection Date: Wed, 13 Aug 2008 12:40:58 -0600 Message-ID: <48A32ABA.2060003@mair-family.org> References: <173499.50107.qm@web35806.mail.mud.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: KVM List To: jdsw2002@yahoo.com Return-path: Received: from nobody.sfcn.org ([160.7.248.25]:44024 "EHLO mail.mair-family.org" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1750953AbYHMSlI (ORCPT ); Wed, 13 Aug 2008 14:41:08 -0400 In-Reply-To: <173499.50107.qm@web35806.mail.mud.yahoo.com> Sender: kvm-owner@vger.kernel.org List-ID: jd wrote: > 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 ] You can generally infer the presence of qemu hosting based on the device name for certain devices. On a Linux guest for example: # hwinfo --all | grep -i qemu AFAIK, it can't tell you if it is a kvm accelerated guest though. FWIW, it isn't really an interface to qemu or kvm so you probably can't guarantee it will continue to work or that the device strings can't be masked by something else on the host or guest. The same method is often suggested as a cheap (sleazy) way of detecting VMware hosting. -- David.