mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Detect bhyve virtual type for freebsd guests
This commit is contained in:
parent
ae05e70e94
commit
a2262097a1
1 changed files with 3 additions and 0 deletions
|
@ -713,10 +713,13 @@ def _virtual(osdata):
|
|||
if maker.startswith('OpenStack'):
|
||||
grains['virtual'] = 'OpenStack'
|
||||
if sysctl:
|
||||
hv_vendor = __salt__['cmd.run']('{0} hw.hv_vendor'.format(sysctl))
|
||||
model = __salt__['cmd.run']('{0} hw.model'.format(sysctl))
|
||||
jail = __salt__['cmd.run'](
|
||||
'{0} -n security.jail.jailed'.format(sysctl)
|
||||
)
|
||||
if 'bhyve' in hv_vendor:
|
||||
grains['virtual'] = 'bhyve'
|
||||
if jail == '1':
|
||||
grains['virtual_subtype'] = 'jail'
|
||||
if 'QEMU Virtual CPU' in model:
|
||||
|
|
Loading…
Add table
Reference in a new issue