Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FreeBSD minions running as Hyper-V virtual machines do not set the virtual grain to "VirtualPC" [patch included] #15594

Closed
xenophonf opened this issue Sep 8, 2014 · 1 comment · Fixed by #15598
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Milestone

Comments

@xenophonf
Copy link
Contributor

Instead, they set the virtual grain to "physical", which is incorrect. The problem is solely a matter of a missing test in salt/grains/core.py. The following patch fixes this issue:

--- salt/grains/core.py.orig    2014-09-08 15:23:05.000000000 -0400
+++ salt/grains/core.py 2014-09-08 15:49:31.000000000 -0400
@@ -573,6 +573,8 @@
             if maker.startswith('Xen'):
                 grains['virtual_subtype'] = '{0} {1}'.format(maker, product)
                 grains['virtual'] = 'xen'
+            if maker.startswith('Microsoft') and product.startswith('Virtual'):
+                grains['virtual'] = 'VirtualPC'
         if sysctl:
             model = __salt__['cmd.run']('{0} hw.model'.format(sysctl))
             jail = __salt__['cmd.run']('{0} -n security.jail.jailed'.format(sysctl))
@basepi
Copy link
Contributor

basepi commented Sep 8, 2014

Awesome! Will be great to have this fixed. Thanks for submitting a pull request.

@basepi basepi added Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists labels Sep 8, 2014
@basepi basepi added this to the Approved milestone Sep 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior severity-low 4th level, cosemtic problems, work around exists
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants