Merge pull request #9381 from debfx/facts_virt_kvm
Detect kvm guests through sys_vendor.
This commit is contained in:
commit
efb40969b3
1 changed files with 5 additions and 0 deletions
|
@ -2206,6 +2206,11 @@ class LinuxVirtual(Virtual):
|
|||
self.facts['virtualization_role'] = 'guest'
|
||||
return
|
||||
|
||||
if sys_vendor == 'QEMU':
|
||||
self.facts['virtualization_type'] = 'kvm'
|
||||
self.facts['virtualization_role'] = 'guest'
|
||||
return
|
||||
|
||||
if os.path.exists('/proc/self/status'):
|
||||
for line in open('/proc/self/status').readlines():
|
||||
if re.match('^VxID: \d+', line):
|
||||
|
|
Loading…
Reference in a new issue