parent
74679a5f4b
commit
360701ea43
1 changed files with 3 additions and 1 deletions
4
setup
4
setup
|
@ -713,10 +713,12 @@ class LinuxVirtual(Virtual):
|
|||
if os.path.exists("/proc/xen"):
|
||||
self.facts['virtualization_type'] = 'xen'
|
||||
self.facts['virtualization_role'] = 'guest'
|
||||
if os.path.exists('/proc/xen/capabilities'):
|
||||
try:
|
||||
for line in open('/proc/xen/capabilities'):
|
||||
if "control_d" in line:
|
||||
self.facts['virtualization_role'] = 'host'
|
||||
except IOError:
|
||||
pass
|
||||
return
|
||||
|
||||
if os.path.exists('/proc/vz'):
|
||||
|
|
Loading…
Add table
Reference in a new issue