Bug #4508

Facter does not recognise Xen HVM DomU

Added by Rein Henrichs over 1 year ago. Updated 5 months ago.

Status:Closed Start date:08/10/2010
Priority:Normal Due date:
Assignee:Michael Kincaid % Done:

0%

Category:library
Target version:1.6.1
Keywords: Affected Facter version:
Branch:https://github.com/mkincaid/facter/tree/ticket/next/4508
Votes: 1

Description

While discovering puppet, I just figured out that facter does not
recognise my server as Xen HVM DomU, at least not in virtual fact:

# facter
facterversion => 1.5.1
manufacturer => Xen
operatingsystem => Debian
operatingsystemrelease => 5.0.5
productname => HVM domU
puppetversion => 0.25.4
rubyversion => 1.8.7
type => Other
virtual => physical

My dom0 is ok: virtual => xen0

The problem is that I want to use virtual fact to manage grub menu.lst options related to xen. For the moment, I’m trying to use virtual fact.

A quick look into virtual.rb, and a dirty hack later, I can see my HVM domU as what they are. Now I wonder to know if I use the right fact ?

virtual.rb.diff - patch against virtual.rb to detect Xen HVM DomU (279 Bytes) Jean Baptiste Favre, 08/11/2010 05:35 pm


Related issues

related to Facter - Bug #2747: the virtual fact and xen Closed 10/22/2009
related to Facter - Bug #2169: xen domu/dom0 fact broken on new xen kernels Closed 04/17/2009
related to Facter - Bug #1558: factor 1.5.1 virtual fact not correct for a xen dom0 Closed 09/04/2008

History

Updated by Jean Baptiste Favre over 1 year ago

As far as I can see, they are not duplicates with mine: #2169 and #1558 are definitely dom0 related, not only domU.

For me, dom0 is perfectly detected. I can’t say for PV domU as I don’t use them but reading virtual.rb code, I guess they’ll.

My problem is that xen domU detection is currently based on some /proc or /sys files presence: – /proc/sys/xen/independent_wallclock – /sys/bus/xen

These pseudo files appear only in PV domU as they’re kernel related. HVM DomU does not know they’re running in a virtualized environment. Therefore, their kernel does not expose these pseudo-files.

I made few other modifications to virtual.rb so that I can use other ways to detect xen HVM DomU (lspci, dmidecode) as it’s done for other virtualisation systems (all based on this page: http://www.dmo.ca/blog/detecting-virtualization-on-linux/).

Updated by Rein Henrichs over 1 year ago

  • Status changed from Unreviewed to Accepted

Thanks for clarifying, Jean.

Updated by James Turnbull 12 months ago

  • Assignee set to Michael Kincaid

Updated by Michael Kincaid 9 months ago

  • Status changed from Accepted to In Topic Branch Pending Review
  • Assignee changed from Michael Kincaid to James Turnbull
  • Branch set to https://github.com/mkincaid/facter/tree/ticket/next/4508

Fixed in dca9863.

Updated by Jean Baptiste Favre 9 months ago

Tests are OK.

You can consider this bug as closed.

Thansk, JB

Updated by James Turnbull 9 months ago

  • Status changed from In Topic Branch Pending Review to Ready For Checkin
  • Assignee changed from James Turnbull to Michael Kincaid

Michael – please get merged.

Updated by James Turnbull 9 months ago

  • Category set to library
  • Target version set to 1.6.0

Updated by James Turnbull 8 months ago

  • Status changed from Ready For Checkin to In Topic Branch Pending Review

Updated by Michael Stahnke 8 months ago

  • Target version changed from 1.6.0 to 1.6.x

Updated by Adrien Thebo 5 months ago

  • Status changed from In Topic Branch Pending Review to Merged - Pending Release

Merged in commit:efbb6aff4eb8a95ba6b676a235472de4d3622502

Updated by Matthaus Litteken 5 months ago

  • Status changed from Merged - Pending Release to Closed
  • Target version changed from 1.6.x to 1.6.1

Released in 1.6.1rc2

Also available in: Atom PDF