From: Guillaume Rousse Subject: detecting a xen environment easily Date: Thu, 10 Apr 2008 18:36:34 +0200 Message-ID: <47FE4212.5050707@inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel List-Id: xen-devel@lists.xenproject.org Hello list. I'm looking for a way to easily segregate paravirtualized hosts, hardware virtualized hosts, and native hosts for sysadmin purpose (installing specific software or configuration files through cfengine). So far, I found the presence of a /proc/xen directory indicated either a paravirtualized host, or a dom0 native host, with the additional presence of /proc/xen/xsd_* files distinguishing between the two last ones. However, I didn't found any way to distinguish between other native host (non dom0 ones), and hardware virtualized hosts. In "Definitive guide to the xen hypervisor" book from D. Chisnall, i found some C code allowing to do it, based on CPUID cpu instruction usage. I didn't tried it yet, but isn't it any way to do something similar with non-compiled code, for portability issues (distributing a python script is far easier than providing as much different binaries than monitored platform) ? Also, is there any better way to achieve what I'm currently trying to do ? -- Guillaume Rousse Moyens Informatiques - INRIA Futurs Tel: 01 69 35 69 62