Fixed the way dom0/domU xen role is defined in the setup module

reviewable/pr18780/r1
Fabian Arrotin 12 years ago
parent f49d2bc557
commit 1151381ab1

@ -711,11 +711,12 @@ class LinuxVirtual(Virtual):
def get_virtual_facts(self):
if os.path.exists("/proc/xen"):
self.facts['virtualization_type'] = 'xen'
self.facts['virtualization_role'] = 'guest'
if os.path.exists('/proc/xen/capabilities'):
self.facts['virtualization_role'] = 'host'
else:
self.facts['virtualization_role'] = 'guest'
for line in open('/proc/xen/capabilities'):
if "control_d" in line:
self.facts['virtualization_role'] = 'host'
elif os.path.exists('/proc/vz'):
self.facts['virtualization_type'] = 'openvz'
if os.path.exists('/proc/vz/version'):

Loading…
Cancel
Save