Skip to contentSkip to conversation

detecting a xen environment easily

DISCUSSION Guillaume Rousse 3 participants 3 messages Apr 10, 2008

lore
Share & tools
lore
#1 lore raw
In reply to Guillaume Rousse

Hi,

Am Donnerstag, 10. April 2008 18:36 schrieb Guillaume Rousse:
[..]

Quoted 5 lines

So far, I found the presence of a /proc/xen directory indicated either a paravirtualized host, or a dom0 native host, with the additional presence of /proc/xen/xsd_* files distinguishing between the two last ones. However, I didn't found any way to distinguish between other native host (non dom0 ones), and hardware virtualized hosts.

you could look on the hardware (video card, pci bus, ..) to identify a hvm!?

Signature · 3 lines
greetings

eMHa

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#0 lore raw

Hello list.

I'm looking for a way to easily segregate paravirtualized hosts, hardware virtualized hosts, and native hosts for sysadmin purpose (installing specific software or configuration files through cfengine).

So far, I found the presence of a /proc/xen directory indicated either a paravirtualized host, or a dom0 native host, with the additional presence of /proc/xen/xsd_* files distinguishing between the two last ones. However, I didn't found any way to distinguish between other native host (non dom0 ones), and hardware virtualized hosts.

In "Definitive guide to the xen hypervisor" book from D. Chisnall, i found some C code allowing to do it, based on CPUID cpu instruction usage. I didn't tried it yet, but isn't it any way to do something similar with non-compiled code, for portability issues (distributing a python script is far easier than providing as much different binaries than monitored platform) ?

Also, is there any better way to achieve what I'm currently trying to do ?

Signature · 3 lines
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62
#2 lore raw
Quoted 12 lines · Guillaume Rousse

Hello list.

I'm looking for a way to easily segregate paravirtualized hosts, hardware virtualized hosts, and native hosts for sysadmin purpose (installing specific software or configuration files through cfengine).

So far, I found the presence of a /proc/xen directory indicated either a paravirtualized host, or a dom0 native host, with the additional presence of /proc/xen/xsd_* files distinguishing between the two last ones. However, I didn't found any way to distinguish between other native host (non dom0 ones), and hardware virtualized hosts.

Quoted 8 lines

In "Definitive guide to the xen hypervisor" book from D. Chisnall, i found some C code allowing to do it, based on CPUID cpu instruction usage. I didn't tried it yet, but isn't it any way to do something similar with non-compiled code, for portability issues (distributing a python script is far easier than providing as much different binaries than monitored platform) ?

Also, is there any better way to achieve what I'm currently trying to do ?

Take a look here:

http://xen.markmail.org/search/?q=Shell%20test%20for%20pv%20vs%20hvm#query:Shell%20test%20for%20pv%20vs%20hvm+page:1+mid:xurts65ly6b3xlch+state:results

Not sure if it is exactly what you are looking for, but maybe some ideas...

The markmail search is pretty good, by the way.

Regards,
Todd

Quoted 10 lines

--
Guillaume Rousse
Moyens Informatiques - INRIA Futurs
Tel: 01 69 35 69 62

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel