Detecting xen

Jeremy Katz katzj at redhat.com
Wed Jun 4 20:48:07 UTC 2008


On Wed, 2008-06-04 at 14:19 -0600, Ed Brown wrote:
> > just check for the /proc/xen/capabilities file.
> 
> Sounds like the OP is looking to distinguish xen guests.  The file 
> above is also present on hosts, or any system running a xen kernel I'd 
> guess.  

Well, anaconda doesn't run with the xen host kernel, so ... :)

> Can this file also be used to reliably distinguish between 
> guests and non-guests?  On the few systems I've got to check against, 
>   the capabilities file contains: "control_d" on hosts, while on all 
> (pv) guests, the file is empty.

control_d should imply a dom0, yes

> Also I don't know how reliable, this is, or will remain, but xen 
> guests are the only systems I've got where 'lspci' returns nothing 
> (successfully).

The likely won't remain reliable -- you can do pci passthrough to a
guest

Jeremy




More information about the Kickstart-list mailing list