From: "Todd Deshane" Subject: Re: detecting a xen environment easily Date: Thu, 10 Apr 2008 12:46:48 -0400 Message-ID: <1e16a9ed0804100946j20c87f73k9aaa8d81b1f57e41@mail.gmail.com> References: <47FE4212.5050707@inria.fr> Reply-To: deshantm@gmail.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1087857528==" Return-path: In-Reply-To: <47FE4212.5050707@inria.fr> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Mime-version: 1.0 Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Guillaume Rousse Cc: xen-devel List-Id: xen-devel@lists.xenproject.org --===============1087857528== Content-Type: multipart/alternative; boundary="----=_Part_16290_10435016.1207846008394" ------=_Part_16290_10435016.1207846008394 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Thu, Apr 10, 2008 at 12:36 PM, Guillaume Rousse < Guillaume.Rousse@inria.fr> wrote: > 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 ? Take a look here: http://xen.markmail.org/search/?q=Shell%20test%20for%20pv%20vs%20hvm#query:Shell%20test%20for%20pv%20vs%20hvm+page:1+mid:xurts65ly6b3xlch+state:results Not sure if it is exactly what you are looking for, but maybe some ideas... The markmail search is pretty good, by the way. Regards, Todd > -- > Guillaume Rousse > Moyens Informatiques - INRIA Futurs > Tel: 01 69 35 69 62 > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > ------=_Part_16290_10435016.1207846008394 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline

On Thu, Apr 10, 2008 at 12:36 PM, Guillaume Rousse <Guillaume.Rousse@inria.fr> wrote:
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 ?


Take a look here:

http://xen.markmail.org/search/?q=Shell%20test%20for%20pv%20vs%20hvm#query:Shell%20test%20for%20pv%20vs%20hvm+page:1+mid:xurts65ly6b3xlch+state:results

Not sure if it is exactly what you are looking for, but maybe some ideas...

The markmail search is pretty good, by the way.

Regards,
Todd



--
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

------=_Part_16290_10435016.1207846008394-- --===============1087857528== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1087857528==--