Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(FACT-700) Detect KVM even when generic CPU Model Name is used. #774

Closed
wants to merge 2 commits into from

Conversation

Freeaqingme
Copy link

We recently changed our VPS's CPU models from "QEMU Virtual CPU version 1.7.1"
to "Westmere E56xx/L56xx/X56xx (Nehalem-C)". This led to facter
errorenously detecting a physical environment rather than a virtualized one.

This commit checks both pciconf and dmidecode for any signs of a virtualized.
environment. KVM relies on bochs for emulating its BIOS. But if there's no
virtio device and no telling CPU Model Name there is no way to distinct
between plain Bochs and Bochs used together with KVM (at least not that I'm
aware of). Therefore, I added an extra virtual type called 'bochs'. At least
it will result either way in is_virtual=true.

I'm not sure if I've ever signed a CLA. I do however consider this patch to be a trivial one.

Edit: Just signed a CLA

We recently changed our VPS's CPU models from "QEMU Virtual CPU version 1.7.1"
to "Westmere E56xx/L56xx/X56xx (Nehalem-C)". This led to facter
errorenously detecting a physical environment rather than a virtualized one.

This commit checks both pciconf and dmidecode for any signs of a virtualized.
environment. KVM relies on bochs for emulating its BIOS. But if there's no
virtio device and no telling CPU Model Name there is no way to distinct
between plain Bochs and Bochs used together with KVM (at least not that I'm
aware of). Therefore, I added an extra virtual type called 'bochs'. At least
it will result either way in is_virtual=true.
@puppetcla
Copy link

CLA signed by all contributors.

@Freeaqingme
Copy link
Author

@kylog Is there anything we can do to move this PR forward?

@Iristyle
Copy link

Iristyle commented Sep 3, 2014

@Freeaqingme Thanks for the contribution! Would you be able to create a ticket in the Facter project within JIRA at https://jira.puppetlabs.com/browse/FACT so that we can properly track this issue?

@kylog
Copy link

kylog commented Sep 3, 2014

Minor: can you squash the commits?

@Freeaqingme
Copy link
Author

Jira issue is here: https://tickets.puppetlabs.com/browse/FACT-700

@Freeaqingme Freeaqingme changed the title Detect KVM even when generic CPU Model Name is used. (FACT-700) Detect KVM even when generic CPU Model Name is used. Sep 4, 2014
@kylog
Copy link

kylog commented Oct 1, 2014

Closing this in favor of #795 which simply squashes and cleans up white space. Thanks for the contribution!

@kylog kylog closed this Oct 1, 2014
@kylog
Copy link

kylog commented Oct 1, 2014

@Freeaqingme this was merged in 7d2520e and will be released in facter 2.3.0.

Thanks for the contribution!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants