@ -92,12 +92,22 @@ class LinuxVirtual(Virtual):
virtual_facts [ ' virtualization_role ' ] = ' guest '
virtual_facts [ ' virtualization_role ' ] = ' guest '
product_name = get_file_content ( ' /sys/devices/virtual/dmi/id/product_name ' )
product_name = get_file_content ( ' /sys/devices/virtual/dmi/id/product_name ' )
sys_vendor = get_file_content ( ' /sys/devices/virtual/dmi/id/sys_vendor ' )
product_family = get_file_content ( ' /sys/devices/virtual/dmi/id/product_family ' )
if product_name in ( ' KVM ' , ' KVM Server ' , ' Bochs ' , ' AHV ' ) :
if product_name in ( ' KVM ' , ' KVM Server ' , ' Bochs ' , ' AHV ' ) :
virtual_facts [ ' virtualization_type ' ] = ' kvm '
virtual_facts [ ' virtualization_type ' ] = ' kvm '
return virtual_facts
return virtual_facts
if product_name == ' RHEV Hypervisor ' :
if sys_vendor == ' oVirt ' :
virtual_facts [ ' virtualization_type ' ] = ' oVirt '
return virtual_facts
if sys_vendor == ' Red Hat ' :
if product_family == ' RHV ' :
virtual_facts [ ' virtualization_type ' ] = ' RHV '
return virtual_facts
elif product_name == ' RHEV Hypervisor ' :
virtual_facts [ ' virtualization_type ' ] = ' RHEV '
virtual_facts [ ' virtualization_type ' ] = ' RHEV '
return virtual_facts
return virtual_facts
@ -123,9 +133,7 @@ class LinuxVirtual(Virtual):
virtual_facts [ ' virtualization_type ' ] = ' kvm '
virtual_facts [ ' virtualization_type ' ] = ' kvm '
return virtual_facts
return virtual_facts
sys_vendor = get_file_content ( ' /sys/devices/virtual/dmi/id/sys_vendor ' )
KVM_SYS_VENDORS = ( ' QEMU ' , ' Amazon EC2 ' , ' DigitalOcean ' , ' Google ' , ' Scaleway ' , ' Nutanix ' )
KVM_SYS_VENDORS = ( ' QEMU ' , ' oVirt ' , ' Amazon EC2 ' , ' DigitalOcean ' , ' Google ' , ' Scaleway ' , ' Nutanix ' )
if sys_vendor in KVM_SYS_VENDORS :
if sys_vendor in KVM_SYS_VENDORS :
virtual_facts [ ' virtualization_type ' ] = ' kvm '
virtual_facts [ ' virtualization_type ' ] = ' kvm '
return virtual_facts
return virtual_facts