Codebase list facter / 4b44b79
[virtual] improve detection of proxmox-based KVM virtual machines Lex Rivera authored 11 years ago Adrien Thebo committed 11 years ago
2 changed file(s) with 5 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
8181 Facter::Util::Resolution.exec("/sbin/sysctl -n hw.model")
8282 end
8383 (txt =~ /QEMU Virtual CPU/) ? true : false
84 (txt =~ /Common KVM processor/) ? true : false
8485 end
8586
8687 def self.virtualbox?
121121 # --- look for gmetrics for GCE
122122 # --- 00:05.0 Class 8007: Google, Inc. Device 6442
123123 result = "gce" if p =~ /Class 8007: Google, Inc/
124 # --- look for Red Hat VirtIO drivers. Commonly used in KVM environment
125 # --- 00:03.0 Unclassified device [00ff]: Red Hat, Inc Virtio memory balloon
126 result = "kvm" if p =~ /Red Hat, Inc Virtio/
124127 end
125128 else
126129 output = Facter::Util::Resolution.exec('dmidecode')
133136 result = "hyperv" if pd =~ /Product Name: Virtual Machine/
134137 result = "rhev" if pd =~ /Product Name: RHEV Hypervisor/
135138 result = "ovirt" if pd =~ /Product Name: oVirt Node/
139 result = "kvm" if pd =~ /Product Name: Bochs/
136140 end
137141 elsif Facter.value(:kernel) == 'SunOS'
138142 res = Facter::Util::Resolution.new('prtdiag')