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

RE: [Xen-users] Programatically checking if we're in a domU or dom0


  • To: "Lutrin Jean" <jeanlutrin@xxxxxxxx>, <xen-users@xxxxxxxxxxxxxxxxxxx>
  • From: Grok Mogger <linuximp@xxxxxxxxx>
  • Date: Wed, 4 Oct 2006 10:07:40 -0400
  • Delivery-date: Wed, 04 Oct 2006 07:08:37 -0700
  • Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:to:subject:date:message-id:mime-version:content-type:content-transfer-encoding:x-priority:x-msmail-priority:x-mailer:in-reply-to:x-mimeole:importance:from; b=PVLRPi0fLywFqDiQbWLmcsuIyl5kGFDXVqQoshxSb6vpzM6S913LtkzHHoEq7XBi/Ps6a8ye3MpVAZH95jUFhF02Ud1FYzD4WNLdyStzPDq54hsqXSa5pO1jj5TKpOEF8UYZjP/+hURkD702CZ9Ibz9vz9Y6ZfXAHwcKHryg+pk=
  • Importance: Normal
  • List-id: Xen user discussion <xen-users.lists.xensource.com>

This might be a somewhat silly way of doing it....  but could you make an
identical copy of your xen kernel for all your DomU's, but rename it to
something else?

Then maybe instead of a 'uname -r' giving you something like...
2.6.16-xen
You could get something like...
2.6.16-xen-DomU

Not sure if that'll help, but maybe...?
- GM

-----Original Message-----
From: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
[mailto:xen-users-bounces@xxxxxxxxxxxxxxxxxxx]On Behalf Of Lutrin Jean
Sent: Wednesday, October 04, 2006 9:52 AM
To: xen-users@xxxxxxxxxxxxxxxxxxx
Subject: Re: [Xen-users] Programatically checking if we're in a domU or
dom0


> Personally, I use the following command in a
> startup script to check if we're in a privileged
> domain:
>
> grep -qsE '^control_d$' /proc/xen/capabilities

Hi Andrew,

thanks for your tip.

Now I can easily determine wether I'm running
on a modified kernel or not (by checking for
the presence of /proc/xen).

However, once I've found that, I'd like to know
if I'm on a priviledged domain or not.

Sadly my /proc/xen/capabilities is only readable
by root.

What would be a clean way to check for this from
a normal user account?








___________________________________________________________________________
Yahoo! Mail réinvente le mail ! Découvrez le nouveau Yahoo! Mail et son
interface révolutionnaire.
http://fr.mail.yahoo.com

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.0.407 / Virus Database: 268.12.12/462 - Release Date: 10/3/2006

--
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.0.407 / Virus Database: 268.12.12/462 - Release Date: 10/3/2006


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


 


Rackspace

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