From: "pradeep singh rautela" Subject: Re: Shell test for pv vs hvm (vs dom0) Date: Sat, 23 Feb 2008 11:06:48 +0530 Message-ID: <6bc632150802222136g315c33d0w174cd6c51cc10175@mail.gmail.com> References: <20080222153812765.00000003172@djm-pc> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20080222153812765.00000003172@djm-pc> Content-Disposition: inline List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: "dan.magenheimer@oracle.com" Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org I don't know, but does libvirt API has any xen compatible methods for your requirements? Just guessing, please feel free to correct me. Thanks, --Pradeep On 23/02/2008, Dan Magenheimer wrote: > Thanks for pointing this tool out! Looks useful. > > Unfortunately, for it to be broadly useful, it would have > to ship with all distros as compiling it "on demand" on > the guest is often not an option. > > Porting xen-detect to shell script doesn't look possible since > it uses inline assembly. > > Any other ideas? > > > > -----Original Message----- > > From: Keir Fraser [mailto:Keir.Fraser@cl.cam.ac.uk] > > Sent: Friday, February 22, 2008 2:18 PM > > To: dan.magenheimer@oracle.com; xen-devel@lists.xensource.com > > Subject: Re: [Xen-devel] Shell test for pv vs hvm (vs dom0) > > > > > > It's not a shell script, but tools/misc/xen-detect.c will do > > what you want > > on x86 platforms. To detect a Linux dom0 you can check for > > 'control_d' in > > /proc/xen/capabilities. > > > > -- Keir > > > > On 22/2/08 20:58, "Dan Magenheimer" > > wrote: > > > > > Is there an "officially sanctioned" method for a shell script to > > > test whether it is running on a native OS vs pv OS vs hvm OS > > > (and possibly also dom0 OS)? > > > > > > I know there are lots of different ways to determine this but > > > am wondering if any one will work across all (recent and future) > > > implementations of Xen and across multiple (at least Linux-based) > > > distros. > > > > > > If not, perhaps there could/should be a C/python tool in > > the Xen tree > > > that does this? > > > > > > =================================== > > > If Xen could save time in a bottle / then clocks wouldn't > > virtually skew / > > > It would save every tick / for VMs that aren't quick / > > > and Xen then would send them anew > > > (with apologies to the late great Jim Croce) > > > _______________________________________________ > > > Xen-devel mailing list > > > Xen-devel@lists.xensource.com > > > http://lists.xensource.com/xen-devel > > > > > > > > > _______________________________________________ > Xen-devel mailing list > Xen-devel@lists.xensource.com > http://lists.xensource.com/xen-devel > -- Pradeep Singh Rautela http://eagain.wordpress.com http://emptydomain.googlepages.com