[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • 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=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.