fix new EC2 C5 instance virtualization_type identification (#35063)
* fix new EC2 C5 instance virtualization_type identification Fixes #35051 Signed-off-by: Adam Miller <admiller@redhat.com>
This commit is contained in:
parent
bda2f42f97
commit
f95adcce8e
1 changed files with 10 additions and 0 deletions
|
@ -114,6 +114,11 @@ class LinuxVirtual(Virtual):
|
|||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if bios_vendor == 'Amazon EC2':
|
||||
virtual_facts['virtualization_type'] = 'kvm'
|
||||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
sys_vendor = get_file_content('/sys/devices/virtual/dmi/id/sys_vendor')
|
||||
|
||||
# FIXME: This does also match hyperv
|
||||
|
@ -142,6 +147,11 @@ class LinuxVirtual(Virtual):
|
|||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if sys_vendor == 'Amazon EC2':
|
||||
virtual_facts['virtualization_type'] = 'kvm'
|
||||
virtual_facts['virtualization_role'] = 'guest'
|
||||
return virtual_facts
|
||||
|
||||
if os.path.exists('/proc/self/status'):
|
||||
for line in get_file_lines('/proc/self/status'):
|
||||
if re.match(r'^VxID: \d+', line):
|
||||
|
|
Loading…
Reference in a new issue