Add xen guest detection on FreeBSD

This commit is contained in:
Michael Scherer 2016-11-06 12:27:45 +01:00 committed by Brian Coca
parent bc6c1afb1e
commit 12354869b9

View file

@ -3325,6 +3325,16 @@ class FreeBSDVirtual(Virtual):
"""
platform = 'FreeBSD'
def get_virtual_facts(self):
# Set empty values as default
self.facts['virtualization_type'] = ''
self.facts['virtualization_role'] = ''
if os.path.exists('/dev/xen/xenstore'):
self.facts['virtualization_type'] = 'xen'
self.facts['virtualization_role'] = 'guest'
class DragonFlyVirtual(FreeBSDVirtual):
platform = 'DragonFly'