Hi all, I''ve got a few questions : - can xend be started inside a modified guest? - can xend be started inside an unmodified guest? - what would be a simple way from a shell script to detect wether we''re inside a domU or a dom0? (taking into account the fact that the same kernel as reported, say, by "uname -a", could be running in the dom0 and the domUs) Thanks in advance for any infos/tips, Jean ___________________________________________________________________________ Découvrez un nouveau moyen de poser toutes vos questions quel que soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. http://fr.answers.yahoo.com _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Andrew Ross
2006-Oct-04 03:20 UTC
[Xen-users] Programatically checking if we''re in a domU or dom0
Lutrin Jean wrote:> - what would be a simple way from a shell script > to detect wether we''re inside a domU or a dom0?The mere existence of /proc/xen is enough to infer that you''re in a paravirtualized Xen domain (as opposed to running under a regular Linux kernel, for example). 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 Cheers Andrew _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users