Add xen guest detection on FreeBSD
This commit is contained in:
parent
bc6c1afb1e
commit
12354869b9
1 changed files with 10 additions and 0 deletions
|
@ -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'
|
||||
|
||||
|
|
Loading…
Reference in a new issue