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

[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

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
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®.