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

qemu driver with KVM accelerator fails with "Could not access KVM kernel module: Permission denied" #650

Closed
pka opened this issue Jan 5, 2016 · 6 comments

Comments

@pka
Copy link

pka commented Jan 5, 2016

Job spec:

driver = "qemu"
config {
      artifact_source = "file:///tmp/debian8.img"
      accelerator = "kvm"
}

Job stderr:

Could not access KVM kernel module: Permission denied
failed to initialize KVM: Permission denied

Direct execution of same qemu-system-x86_64 command works.

@diptanu
Copy link
Contributor

diptanu commented Jan 5, 2016

@pka What user is the Nomad client running as?

@pka
Copy link
Author

pka commented Jan 5, 2016

Nomad client is running as root.

@dadgar
Copy link
Contributor

dadgar commented Jan 7, 2016

Should be fixed by #656.

@dadgar dadgar closed this as completed Jan 7, 2016
@vhosakot
Copy link

I was able to resolve the failed to initialize KVM: Permission denied error after doing the following:

rmmod kvm_intel
rmmod kvm
modprobe kvm
modprobe kvm_intel

The above commands reload the kvm_intel and kvm kernel modules.

@Zelda00
Copy link

Zelda00 commented May 25, 2020

to fix this issue you need to adduser to kvm to work fine ,give permission to solve it.

sudo adduser "youaccount" kvm

https://ccdtt.com/solved-could-not-access-kvm-kernel-module-permission-denied/

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

I'm going to lock this issue because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants