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

[BUG] virtual grains fails to detect some Parallels VM's #63181

Open
gvengel opened this issue Dec 2, 2022 · 0 comments
Open

[BUG] virtual grains fails to detect some Parallels VM's #63181

gvengel opened this issue Dec 2, 2022 · 0 comments
Labels
Bug broken, incorrect, or confusing behavior Grains needs-triage Platform Relates to OS, containers, platform-based utilities like FS, system based apps

Comments

@gvengel
Copy link
Contributor

gvengel commented Dec 2, 2022

Description
The core grain virtual fails to properly detect some VM's running under Parallels and instead reports them as physical.

This is caused by the dmidecode command on Linux returning a manufacture slightly differently than salt expects.

Setup

I'm not entirely sure which are the important bits that cause dmidecode to return the new manufacture, but I'm able to reproduce the problem with Parallels version 18.1.0 on MacOS 13.0 under Apple Silicon, using a VM running Ubuntu 22.04. Salt 3005 was installed using the Debian 11 classic packages, since Ubuntu 22.04 packages are not available for arm64.

Steps to Reproduce the behavior

brew install vagrant  # or your preferred method
vagrant init gvengel/salt-jammy-arm64
vagrant up
vagrant ssh -- salt-call --local grains.get virtual

Behavior

~/dev/salt % vagrant ssh -- sudo salt-call --local grains.get virtual
/usr/local/lib/python3.10/dist-packages/_distutils_hack/__init__.py:33: UserWarning: Setuptools is replacing distutils.
  warnings.warn("Setuptools is replacing distutils.")
local:
    physical
~/dev/salt %

Expected behavior
Should return "Parallels"

@gvengel gvengel added Bug broken, incorrect, or confusing behavior needs-triage labels Dec 2, 2022
@OrangeDog OrangeDog added Platform Relates to OS, containers, platform-based utilities like FS, system based apps Grains labels Dec 2, 2022
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 Grains needs-triage Platform Relates to OS, containers, platform-based utilities like FS, system based apps
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants