Issue #8210 has been updated by Andreas Ntaflos.

As reported some time ago in #16559 when copying the physical host's CPU 
configuration into the KVM guest, `facter is_virtual` reports `false` and 
`facter virtual` reports `phyical`, even though it indeed is a virtual machine. 
This happens with Facter 1.6.17 and Puppet 3.1.0 on Ubuntu 12.04 (x86_64) both 
as host and guest, using KVM (currently 1.0+noroms-0ubuntu14.7) and Libvirt 
(0.9.8-2ubuntu17.7). In `/proc/cpuinfo` this looks as follows on the virtual 
machine/guest:

    processor       : 0
    vendor_id       : GenuineIntel
    cpu family      : 6
    model           : 15
    model name      : Intel(R) Core(TM)2 Duo CPU     T7700  @ 2.40GHz
    stepping        : 11
    microcode       : 0x1
    cpu MHz         : 3058.998
    cache size      : 4096 KB
    fpu             : yes
    fpu_exception   : yes
    cpuid level     : 10
    wp              : yes
    flags           : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm 
constant_tsc rep_good nopl pni vmx ssse3 cx16 sse4_1 sse4_2 popcnt aes 
hypervisor lahf_lm
    bogomips        : 6117.99
    clflush size    : 64
    cache_alignment : 64
    address sizes   : 40 bits physical, 48 bits virtual

So it seems this the fix that made it into Facter 1.6.14 does not work 
universally. Can I provide anything to help debug and fix this further?
----------------------------------------
Bug #8210: virtual fact should work for EL kvm guests
https://projects.puppetlabs.com/issues/8210#change-86927

Author: Markus Falb
Status: Closed
Priority: Normal
Assignee: 
Category: library
Target version: 1.6.14
Keywords: 
Branch: https://github.com/puppetlabs/facter/pull/340
Affected Facter version: 1.6.2


The Output from /proc/cpuinfo can not used reliable for telling that it is a 
kvm virtual machine.
On a CentOS 5.6 kvm Host with CentOS guests /proc/cpuinfo tells me:

for a smp guest
    model name  : QEMU Virtual CPU version 0.9.1

with only one cpu in the guest:
    model name  : Pentium II (Klamath)

but in both cases:
    $ dmidecode -t 4
    ...
    Manufacturer: QEMU
    ...

I believe it is possible to specify what cpu is used so on the commandline, so 
relying on the model name is not always working

For more information please also have a look at 
<br>[https://bugzilla.redhat.com/show_bug.cgi?id=707523](https://bugzilla.redhat.com/show_bug.cgi?id=707523)


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/puppet-bugs?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to