|
|
|
@ -388,7 +388,7 @@ class LinuxHardware(Hardware):
|
|
|
|
|
|
|
|
|
|
def get_mount_facts(self):
|
|
|
|
|
self.facts['mounts'] = []
|
|
|
|
|
mtab = get_file_content('/etc/mtab')
|
|
|
|
|
mtab = get_file_content('/etc/mtab', '')
|
|
|
|
|
for line in mtab.split('\n'):
|
|
|
|
|
if line.startswith('/'):
|
|
|
|
|
fields = line.rstrip('\n').split()
|
|
|
|
@ -967,6 +967,7 @@ class LinuxVirtual(Virtual):
|
|
|
|
|
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):
|
|
|
|
|
self.facts['virtualization_type'] = 'linux_vserver'
|
|
|
|
@ -976,6 +977,7 @@ class LinuxVirtual(Virtual):
|
|
|
|
|
self.facts['virtualization_role'] = 'guest'
|
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
if os.path.exists('/proc/cpuinfo'):
|
|
|
|
|
for line in open('/proc/cpuinfo').readlines():
|
|
|
|
|
if re.match('^model name.*QEMU Virtual CPU', line):
|
|
|
|
|
self.facts['virtualization_type'] = 'kvm'
|
|
|
|
|