Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Facter does not recognise Xen HVM DomU

Received: by 10.150.31.15 with SMTP id e15mr10607682ybe.12.1281477520626;
        Tue, 10 Aug 2010 14:58:40 -0700 (PDT)
X-BeenThere: puppet-users@googlegroups.com
Received: by 10.151.28.20 with SMTP id f20ls2784027ybj.1.p; Tue, 10 Aug 2010 
	14:58:37 -0700 (PDT)
Received: by 10.151.15.3 with SMTP id s3mr2385425ybi.11.1281477517908;
        Tue, 10 Aug 2010 14:58:37 -0700 (PDT)
Received: by 10.216.231.21 with SMTP id k21mr267644weq.2.1281466467217;
        Tue, 10 Aug 2010 11:54:27 -0700 (PDT)
Received: by 10.216.231.21 with SMTP id k21mr267643weq.2.1281466467194;
        Tue, 10 Aug 2010 11:54:27 -0700 (PDT)
Return-Path: <jean.baptiste.fa...@gmail.com>
Received: from box02.jbfavre.org (digi00449.digicube.fr [95.130.10.63])
        by gmr-mx.google.com with ESMTP id s70si2346209weq.5.2010.08.10.11.54.27;
        Tue, 10 Aug 2010 11:54:27 -0700 (PDT)
Received-SPF: neutral (google.com: 95.130.10.63 is neither permitted nor denied by domain of jean.baptiste.fa...@gmail.com) client-ip=95.130.10.63;
Authentication-Results: gmr-mx.google.com; spf=neutral (google.com: 95.130.10.63 is neither permitted nor denied by domain of jean.baptiste.fa...@gmail.com) smtp.mail=jean.baptiste.fa...@gmail.com
Received: from [10.0.0.10] (clichy.jbfavre.org [88.160.133.132])
	by box02.jbfavre.org (Postfix) with ESMTPSA id 8466E58E127
	for <puppet-users@googlegroups.com>; Tue, 10 Aug 2010 20:54:26 +0200 (CEST)
X-DKIM: Sendmail DKIM Filter v2.6.0 box02.jbfavre.org 8466E58E127
Message-ID: <4C61A085.4050104@gmail.com>
Date: Tue, 10 Aug 2010 20:55:01 +0200
From: Jean Baptiste FAVRE <jean.baptiste.fa...@gmail.com>
Reply-To: jean.baptiste.fa...@gmail.com
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100713 Lightning/1.0b1 Thunderbird/3.0.6
MIME-Version: 1.0
To: puppet-users@googlegroups.com
Subject: Re: [Puppet Users] Facter does not recognise Xen HVM DomU
References: <4C5D5594.9090400@gmail.com> <1281462679-sup-6969@reinh.local>
In-Reply-To: <1281462679-sup-6969@reinh.local>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Hello Rein,
Strange, my mail took 3 days to be delivered :-/

By the way, I just had a look on the tickets you mentionned.

As far as I can see, they are not duplicates with mine: it's definitelyt
more dom0 detection failure related, not only domU.
In my case, 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/). Please
review my patch below (thanks to be indulgent, it's my first patch more
or less ;-) )

Regards,
JB



# diff virtual.rb.xen virtual.rb
44d43
<                     result = "xenhvm" if p =~ /XenSource/
51d49
<                         result = "xenhvm" if pd =~ /HVM domU/
77c75
<         when "xenu", "openvzve", "vmware", "xenhvm"
---
>         when "xenu", "openvzve", "vmware"



On 10/08/2010 19:58, Rein Henrichs wrote:
> Excerpts from Jean Baptiste FAVRE's message of Sat Aug 07 05:46:12 -0700 2010:
>> Hello everyone,
>>
>> While discovering puppet, I just figured out that facter does not
>> recognise my server as Xen HVM DomU, at least not in virtual fact:
>>
>> [ snip ]
>>
>> 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 ?
> 
> Hi Jean,
> 
> Thanks for reporting this. I've added a ticket [1] to our issue tracker
> so we can follow up on this issue more easily. Your issue seems to be
> related to (or possibly a duplicate of) some existing tickets. I've
> listed them as related in the ticket itself. Would you mind taking a
> look at those to see if your issue is a duplicate? If so, we can assign
> it as such.
> 
> Thanks!
> 
> [1] http://projects.reductivelabs.com/issues/4508