Re: [Puppet Users] Facter does not recognise Xen HVM DomU
On 11 August 2010 03:26, Rein Henrichs wrote: > Jean, > > Thanks for the info, I'll add it to the ticket. Note that the "supported" way in terms of hardware is via the cpuid Hypervisor present leaf and Hypervisor CPUID Information Leaf See eg http://git.annexia.org/?p=virt-what.git;a=blob;f=virt-what-cpuid-helper.c;h=3024c375cb7b71142ded2a6a5836574d5b21f2f5;hb=HEAD http://micky.ibh.net/~liske/imvirt.html But that would involve making part of facter C and would probably break jruby support, unless we used ffi somehow Paul -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Facter does not recognise Xen HVM DomU
Jean, Thanks for the info, I'll add it to the ticket. -- Rein Henrichs http://puppetlabs.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Facter does not recognise Xen HVM DomU
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 -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Facter does not recognise Xen HVM DomU
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 -- Rein Henrichs http://puppetlabs.com -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
Re: [Puppet Users] Facter does not recognise Xen HVM DomU
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 > 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 ? this could be a bug, actually a missing recognition due to the difference of HVM domU (I guess). Can you file a bugreport? thanks pete -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAkxhkH4ACgkQbwltcAfKi38kqQCeL98TAoppPtxueNXNx2u9kxeA mJkAn2TtCPPgM4cayG24A7l/dCb+3Yjq =BEhX -END PGP SIGNATURE- -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
[Puppet Users] Facter does not recognise Xen HVM DomU
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: # 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 ? Regards, JB Here's my diff: # diff -C 10 /usr/lib/ruby/1.8/facter/virtual.rb /usr/lib/ruby/1.8/facter/virtual.rb.xen *** /usr/lib/ruby/1.8/facter/virtual.rb 2010-08-07 14:20:31.0 +0200 --- /usr/lib/ruby/1.8/facter/virtual.rb.xen 2010-08-07 14:20:09.0 +0200 *** *** 34,53 --- 34,54 end end if result == "physical" output = Facter::Util::Resolution.exec('lspci') if not output.nil? output.each_line do |p| # --- look for the vmware video card to determine if it is virtual => vmware. # --- 00:0f.0 VGA compatible controller: VMware Inc [VMware SVGA II] PCI Display Adapter result = "vmware" if p =~ /VM[wW]are/ + result = "xenhvm" if p =~ /XenSource/ end else output = Facter::Util::Resolution.exec('dmidecode') if not output.nil? output.each_line do |pd| result = "vmware" if pd =~ /VMware|Parallels/ end else output = Facter::Util::Resolution.exec('prtdiag') if not output.nil? -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-us...@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.