WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] simple check for domU?

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-devel] simple check for domU?
From: Chris Bainbridge <chris.bainbridge@xxxxxxxxx>
Date: Fri, 11 Nov 2005 16:21:00 +0000
Delivery-date: Fri, 11 Nov 2005 16:21:06 +0000
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OgsfvHfMELmpqWzdaPyPT6e98L3eZSN3lyvYGOFKNY0I5FS8R5eRqATHIy1iKZcJEZ0BZamArxDUmcTk4EttFnz0xU0fWmdrUWnCwAUx4b42fv6KczTI5tlCs8ckYxS/b8M8gV1S8v4MG4E+gFl3yRZC+SiSLNokh8wjI7ux69s=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <20051111015228.GC3558@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <623652d50511101623q533a8e04r@xxxxxxxxxxxxxx> <20051111015228.GC3558@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On 11/11/05, Karsten M. Self <kself@xxxxxxxxxxxxx> wrote:
> on Fri, Nov 11, 2005 at 12:23:18AM +0000, Chris Bainbridge 
> (chris.bainbridge@xxxxxxxxx) wrote:
> > Hi, is there a simple way to check that we're running under a domU? So
> > far I came up with:
>
> Try:
>
>     uname -r | grep -q -- -xen
>
> ... which generally works.  'test -d /proc/xen' is pretty reliable as
> well.

I'm looking specifically for domU and not dom0 (well, it would be
useful to have a reliable way of identifying both). /proc/xen will be
present in dom0 and uname depends on the kernel EXTRAVERSION which
isn't guaranteed.

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

<Prev in Thread] Current Thread [Next in Thread>