|
|
|
|
|
|
|
|
|
|
xen-users
Re: [Xen-users] Am I running under Xen?
Fajar A. Nugraha wrote:
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
Also, if you have a well-defined practice of using the Xen-provided
prefix in your MAC addresses, you can identify them that way, at least
on localhost.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
|
|
|
|