Fix GCE and scaleway VM detection (#47193)

* Fix Google cloud engine & Scaleway VM detection
pull/44428/head
Lex Rivera 6 years ago committed by John R Barker
parent 0dbac3f3b8
commit aa484c0835

@ -0,0 +1,2 @@
bugfixes:
- "facts - detect VMs from google cloud engine and scaleway"

@ -152,6 +152,16 @@ class LinuxVirtual(Virtual):
virtual_facts['virtualization_role'] = 'guest'
return virtual_facts
if sys_vendor == 'Google':
virtual_facts['virtualization_type'] = 'kvm'
virtual_facts['virtualization_role'] = 'guest'
return virtual_facts
if sys_vendor == 'Scaleway':
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:\s+\d+', line):

Loading…
Cancel
Save