-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Here are a couple of potentials that I found sniffing around. You'd have to 
ruby-ify them if you wanted them native though.

http://micky.ibh.net/~liske/imvirt.html
http://people.redhat.com/~rjones/virt-what/

Unfortunately, that seemed to be about it.

Also, the dmidecode material may not work if someone is spoofing the hardware 
using options passed to QEMU. There are various legitimate reasons to do
this and rewrites the options that have been posted.

Trevor


On 08/29/2011 04:46 PM, Adrien Thebo wrote:
> For determining the manufacturer name itself that works - however, I need to
> know what manufacturers can be inferred as a KVM guest, since qemu isn't the
> only possible manufacturer value.
> 
> On Mon, Aug 29, 2011 at 1:37 PM, Trevor Vaughan <[email protected]>wrote:
> 
>> dmidecode -t 1 | grep 'Product Name:'
>>
>> Seems to work pretty well for me.
>>
>> Trevor
>>
>> On Mon, Aug 29, 2011 at 3:41 PM,  <[email protected]> wrote:
>>> Issue #8210 has been updated by Adrien Thebo.
>>>
>>> Relying on dmidecode would be a better way of handling this sort of
>> lookup,
>>> but the manufacturer name is not guaranteed to be ‘QEMU’. I’ve found the
>>> following on a kvm hypervisor:
>>>
>>> ~# dmidecode -t 4
>>> dmidecode 2.9
>>> SMBIOS 2.4 present.
>>>
>>> Handle 0x0401, DMI type 4, 32 bytes
>>> Processor Information
>>>         Socket Designation: CPU01
>>>         Type: Central Processor
>>>         Family: Other
>>>         Manufacturer: Bochs
>>>         ID: 33 06 00 00 FD AB 81 07
>>>         Version: Not Specified
>>>         Voltage: Unknown
>>>         External Clock: Unknown
>>>         Max Speed: 2000 MHz
>>>         Current Speed: 2000 MHz
>>>         Status: Populated, Enabled
>>>         Upgrade: Other
>>>         L1 Cache Handle: Not Provided
>>>         L2 Cache Handle: Not Provided
>>>         L3 Cache Handle: Not Provided
>>>
>>> We’ll need better detection of the manufacturer regardless of the BIOS
>> used.
>>>
>>> ________________________________
>>>
>>> Bug #8210: virtual => physical for kvm guests
>>>
>>> Author: Markus Falb
>>> Status: Investigating
>>> Priority: Normal
>>> Assignee: Adrien Thebo
>>> Category: library
>>> Target version:
>>> Keywords:
>>> Branch:
>>> Affected Facter version:
>>>
>>> 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
>>> 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 post to this group, send email to [email protected].
>>> To unsubscribe from this group, send email to
>>> [email protected].
>>> For more options, visit this group at
>>> http://groups.google.com/group/puppet-bugs?hl=en.
>>>
>>
>>
>>
>> --
>> Trevor Vaughan
>> Vice President, Onyx Point, Inc
>> (410) 541-6699
>> [email protected]
>>
>> -- This account not approved for unencrypted proprietary information --
>>
> 
> 
> 

- -- 
Trevor Vaughan
 Vice President, Onyx Point, Inc.
 email: [email protected]
 phone: 410-541-ONYX (6699)
 pgp: 0x6C701E94

- -- This account not approved for unencrypted sensitive information --
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)

iQEcBAEBAgAGBQJOXELZAAoJECNCGV1OLcypVgEIAKMeM7KH0p8PK0FDgx7lconq
WtYoi9NjPd6ZNzrZvBClmWHHJGUpbHyBbwXma9BR9Gy7peJg5vJaSD5xMbDQ3zQM
2oeiWRbsqDAEZJaZHXaccSEGiLv4abT4ExsfDUmuufOXUVULzcsyOlf8ZJXapDIc
CJFSCjvYuWzdCJhj1Ntp55jJ9M2jDj0EexNBgnp/UEu/roWgKJaTXzKfPTKwAEuM
cCXeYg7+qUGCVE7mqV4BrJmUdlZ2WMC1aheMgVXkF+YKxuxORpRX+LjAHo/mYJ21
CLpRX88D7uVvxKd2onFs76ii4XDOHuiqvNEaKYwb9W7jbK2R0qYZaw+98kByiSg=
=1T30
-----END PGP SIGNATURE-----

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

<<attachment: tvaughan.vcf>>

Reply via email to