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

Minikube fail to start with KVM2 on Slackware with "PR_KVM_USER_PERMISSION: libvirt group membership check failed" #11630

Closed
eshkinkot opened this issue Jun 10, 2021 · 2 comments · Fixed by #11842
Labels
co/kvm2-driver KVM2 driver related issues kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@eshkinkot
Copy link

Steps to reproduce the issue:

  1. minikube start --driver=kvm2

By default libvirt build with users group in Slackware (see https://slackbuilds.org/repository/14.2/libraries/libvirt/), also see #10712

Full output of minikube logs command:

* * ==> Audit <== * |---------|--------|----------|--------|---------|-------------------------------|-------------------------------| | Command | Args | Profile | User | Version | Start Time | End Time | |---------|--------|----------|--------|---------|-------------------------------|-------------------------------| | start | --help | minikube | sergey | v1.20.0 | Fri, 11 Jun 2021 01:24:13 MSK | Fri, 11 Jun 2021 01:24:13 MSK | |---------|--------|----------|--------|---------|-------------------------------|-------------------------------|
  • ==> Last Start <==

  • Log file created at: 2021/06/11 01:38:25
    Running on machine: seb
    Binary: Built with gc go1.16.1 for linux/amd64
    Log line format: [IWEF]mmdd hh:mm:ss.uuuuuu threadid file:line] msg
    I0611 01:38:25.467127 1082 out.go:291] Setting OutFile to fd 1 ...
    I0611 01:38:25.467244 1082 out.go:338] TERM=xterm,COLORTERM=, which probably does not support color
    I0611 01:38:25.467246 1082 out.go:304] Setting ErrFile to fd 2...
    I0611 01:38:25.467249 1082 out.go:338] TERM=xterm,COLORTERM=, which probably does not support color
    I0611 01:38:25.467357 1082 root.go:316] Updating PATH: /home/sergey/.minikube/bin
    I0611 01:38:25.467377 1082 oci.go:558] shell is pointing to dockerd inside minikube. will unset to use host
    I0611 01:38:25.467552 1082 out.go:298] Setting JSON to false
    I0611 01:38:25.468604 1082 start.go:108] hostinfo: {"hostname":"seb","uptime":223449,"bootTime":1623141257,"procs":347,"os":"linux","platform":"slackware","platformFamily":"slackware","platformVersion":"14.2","kernelVersion":"4.4.261","kernelArch":"x86_64","virtualizationSystem":"kvm","virtualizationRole":"host","hostId":"7a74f947-483a-4011-b1ce-a34256248b2b"}
    I0611 01:38:25.468654 1082 start.go:118] virtualization: kvm host
    I0611 01:38:25.473357 1082 out.go:170] * minikube v1.20.0 on Slackware 14.2
    I0611 01:38:25.476708 1082 out.go:170] - MINIKUBE_ACTIVE_DOCKERD=minikube
    I0611 01:38:25.476911 1082 driver.go:322] Setting default libvirt URI to qemu:///system
    I0611 01:38:25.480852 1082 out.go:170] * Using the kvm2 driver based on user configuration
    I0611 01:38:25.480872 1082 start.go:276] selected driver: kvm2
    I0611 01:38:25.480879 1082 start.go:718] validating driver "kvm2" against
    I0611 01:38:25.480895 1082 start.go:729] status for kvm2: {Installed:true Healthy:false Running:true NeedsImprovement:false Error:libvirt group membership check failed:
    user is not a member of the appropriate libvirt group Reason:PR_KVM_USER_PERMISSION Fix:Check that libvirtd is properly installed and that you are a member of the appropriate libvirt group (remember to relogin for group changes to take effect!) Doc:https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/}
    I0611 01:38:25.490475 1082 out.go:170]
    W0611 01:38:25.490599 1082 out.go:235] X Exiting due to PR_KVM_USER_PERMISSION: libvirt group membership check failed:
    user is not a member of the appropriate libvirt group
    W0611 01:38:25.490731 1082 out.go:424] no arguments passed for "* Suggestion: Ensure that you are a member of the appropriate libvirt group (remember to relogin for group changes to take effect!)\n" - returning raw string
    W0611 01:38:25.490742 1082 out.go:235] * Suggestion: Ensure that you are a member of the appropriate libvirt group (remember to relogin for group changes to take effect!)
    W0611 01:38:25.490824 1082 out.go:235] * Documentation: https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/
    W0611 01:38:25.490853 1082 out.go:424] no arguments passed for "* Related issues:\n" - returning raw string
    W0611 01:38:25.490861 1082 out.go:235] * Related issues:
    W0611 01:38:25.490947 1082 out.go:235] - kvm2 driver: check if user in "libvirt" group and exit if they are not #5617
    W0611 01:38:25.490996 1082 out.go:235] - kvm add solution message for when user needs to reload the terminal to get libvirt permissions #10070

  • Profile "minikube" not found. Run "minikube profile list" to view all profiles.
    To start a cluster, run: "minikube start"

Full output of failed command:

I0611 01:42:01.133737 1259 out.go:291] Setting OutFile to fd 1 ... I0611 01:42:01.133804 1259 out.go:338] TERM=xterm,COLORTERM=, which probably does not support color I0611 01:42:01.133808 1259 out.go:304] Setting ErrFile to fd 2... I0611 01:42:01.133812 1259 out.go:338] TERM=xterm,COLORTERM=, which probably does not support color I0611 01:42:01.133910 1259 root.go:316] Updating PATH: /home/sergey/.minikube/bin I0611 01:42:01.133938 1259 oci.go:558] shell is pointing to dockerd inside minikube. will unset to use host I0611 01:42:01.134130 1259 out.go:298] Setting JSON to false I0611 01:42:01.135209 1259 start.go:108] hostinfo: {"hostname":"seb","uptime":223664,"bootTime":1623141257,"procs":345,"os":"linux","platform":"slackware","platformFamily":"slackware","platformVersion":"14.2","kernelVersion":"4.4.261","kernelArch":"x86_64","virtualizationSystem":"kvm","virtualizationRole":"host","hostId":"7a74f947-483a-4011-b1ce-a34256248b2b"} I0611 01:42:01.135268 1259 start.go:118] virtualization: kvm host I0611 01:42:01.139970 1259 out.go:170] * minikube v1.20.0 on Slackware 14.2 * minikube v1.20.0 on Slackware 14.2 I0611 01:42:01.146279 1259 out.go:170] - MINIKUBE_ACTIVE_DOCKERD=minikube - MINIKUBE_ACTIVE_DOCKERD=minikube I0611 01:42:01.146481 1259 driver.go:322] Setting default libvirt URI to qemu:///system I0611 01:42:01.150546 1259 out.go:170] * Using the kvm2 driver based on user configuration * Using the kvm2 driver based on user configuration I0611 01:42:01.150566 1259 start.go:276] selected driver: kvm2 I0611 01:42:01.150575 1259 start.go:718] validating driver "kvm2" against I0611 01:42:01.150613 1259 start.go:729] status for kvm2: {Installed:true Healthy:false Running:true NeedsImprovement:false Error:libvirt group membership check failed: user is not a member of the appropriate libvirt group Reason:PR_KVM_USER_PERMISSION Fix:Check that libvirtd is properly installed and that you are a member of the appropriate libvirt group (remember to relogin for group changes to take effect!) Doc:https://minikube.sigs.k8s.io/docs/reference/drivers/kvm2/} I0611 01:42:01.160177 1259 out.go:170]

W0611 01:42:01.160261 1259 out.go:235] X Exiting due to PR_KVM_USER_PERMISSION: libvirt group membership check failed:
user is not a member of the appropriate libvirt group
X Exiting due to PR_KVM_USER_PERMISSION: libvirt group membership check failed:
user is not a member of the appropriate libvirt group
W0611 01:42:01.160339 1259 out.go:424] no arguments passed for "* Suggestion: Ensure that you are a member of the appropriate libvirt group (remember to relogin for group changes to take effect!)\n" - returning raw string
W0611 01:42:01.160352 1259 out.go:235] * Suggestion: Ensure that you are a member of the appropriate libvirt group (remember to relogin for group changes to take effect!)

@eshkinkot
Copy link
Author

Possible workaround:

  • create dummy group with prefix "libvirt"
  • add self to it
  • relogin

Something like that:

sudo groupadd libvirt4minikube
sudo usermod -a -G libvirt4minikube $USER

@afbjorklund
Copy link
Collaborator

There is no support in minikube for making all users root-equivalent like that, it is expected that "libvirt" or "docker" is used.

But most likely there should be a "force" flag for this check, since some systems have other solutions (e.g. PolKit) than groups.

@afbjorklund afbjorklund added co/kvm2-driver KVM2 driver related issues kind/feature Categorizes issue or PR as related to a new feature. labels Jun 11, 2021
@spowelljr spowelljr added the priority/backlog Higher priority than priority/awaiting-more-evidence. label Jun 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
co/kvm2-driver KVM2 driver related issues kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants