Lutrin Jean
2006-Oct-04 13:51 UTC
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/capabilitiesHi 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. fr.mail.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com lists.xensource.com/xen-users
Grok Mogger
2006-Oct-04 14:07 UTC
RE: [Xen-users] Programatically checking if we''re in a domU or dom0
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@lists.xensource.com [mailto:xen-users-bounces@lists.xensource.com]On Behalf Of Lutrin Jean Sent: Wednesday, October 04, 2006 9:52 AM To: xen-users@lists.xensource.com 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/capabilitiesHi 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. fr.mail.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com 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@lists.xensource.com lists.xensource.com/xen-users