|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Am I running under Xen?
Matthew Haas wrote:
Tom Horsley wrote:
Is there a standard idiom most folks use to ask the
question: Am I a linux that was just booted under Xen?
If there is a nice guaranteed way of detecting a Paravirtualized domU
(or if the machine is acting as a dom0), I would also be interested in
knowing (basing it off strings in the kernel name isn't necessarily
100% guaranteed).
What RH did :
"if [ -e /proc/xen/xsd_kva -o ! -d /proc/xen ]; then"
First part detects a xen dom0, second part detects a native Linux.
To detect domU, you could put the code in the "else" part, or invert the
test, e.g.
"if [ -d /proc/xen -a ! -e /proc/xen/xsd_kva ]; then"
Regards,
Fajar
smime.p7s
Description: S/MIME Cryptographic Signature
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|