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

kvm2: 'Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied #6468

Closed
Amanymous opened this issue Feb 2, 2020 · 10 comments
Labels
co/kvm2-driver KVM2 driver related issues kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.

Comments

@Amanymous
Copy link

The exact command to reproduce the issue:

The full output of the command that failed:

The output of the minikube logs command:

The operating system version:

@tstromberg
Copy link
Contributor

Do you mind adding some additional details? Here is additional information that would be helpful:

  • The exact minikube start command line used
  • The full output of the minikube start command, preferably with --alsologtostderr -v=1 for extra logging.

Thank you for sharing your experience!

@tstromberg tstromberg added co/kvm2-driver KVM2 driver related issues kind/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it. labels Feb 5, 2020
@tstromberg tstromberg changed the title Error: [KVM_CONNECTION_ERROR] Error getting state for host: getting connection: getting domain: error connecting to libvirt socket.: virError(Code=38, Domain=7, Message='Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied') 💡 Suggestion: Have you set up libvirt correctly? kvm2: 'Failed to connect socket to '/var/run/libvirt/libvirt-sock': Permission denied Feb 5, 2020
@LasseJacobs
Copy link

I had the same issue after just installing kvm. I think the KVM module (running for my user) did not have permission to the libvirt-sock which caused the error even though my user should have the correct permission. Since it was a fresh install my user group was added but for that to take effect you have to log out and log back in. Once I did that everything worked fine.

@josedonizetti
Copy link
Member

Had the same problem that @LasseJacobs mentioned in a recent installation. I added my user to the libvirt group in ubuntu, but it only took effect after log out/log in.

Maybe we can do a check for this in minikube. 🤔

@sharifelgamal
Copy link
Collaborator

There seems to be a solution here, so I'm going to go ahead and close this issue for now. Feel free to reopen if you need any more assistance.

@AurelienGasser
Copy link

Logging out/in didn't fix it for me on Ubuntu 19.10. However, it worked after a reboot.

@fzyzcjy
Copy link

fzyzcjy commented Apr 22, 2020

Logging out/in works for me!

@raoofnaushad
Copy link

Faced the same issue with recent installation. Logging out/in didn't fix it for me on Ubuntu 18.04. However, it worked after a reboot.

@lsamayoa
Copy link

lsamayoa commented Aug 19, 2020

Had the same issue on Ubuntu 20.04, log out/log in did not work had to reboot my vm.

@inventfossil
Copy link

I had the same issue after just installing kvm. I think the KVM module (running for my user) did not have permission to the libvirt-sock which caused the error even though my user should have the correct permission. Since it was a fresh install my user group was added but for that to take effect you have to log out and log back in. Once I did that everything worked fine.

This works on Pop!_OS 20.10, I feel so stupid I didn't think of this before lmao

@disorder75
Copy link

Hi, had the same issue on Ubuntu 22.10, a reboot was required, after that everything worked ok.

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/support Categorizes issue or PR as a support question. triage/needs-information Indicates an issue needs more information in order to work on it.
Projects
None yet
Development

No branches or pull requests