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

failed with KVM acceleration not available #220

Open
markintouch opened this issue Nov 12, 2024 · 5 comments
Open

failed with KVM acceleration not available #220

markintouch opened this issue Nov 12, 2024 · 5 comments

Comments

@markintouch
Copy link

Operating system

Ubuntu 22.04

Description

start docker compose and get the error.
ERROR: KVM acceleration not available (no write access), this will cause a major loss of performance.

Here is the output of kvm-ok
$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used

And I tried Priviledged:true, the same. And also I run use sudo.
Are you use a special user to run docker?
This is weird.

Docker compose

services:
windows:
container_name: windows
image: dockurr/windows-arm
environment:
VERSION: "11"
DISK_SIZE: "64G"
RAM_SIZE: "12G"
CPU_CORES: "4"
VGA: "virtio-gpu"
devices:
- /dev/kvm
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
stop_grace_period: 2m
volumes:
- /var/win:/storage

Docker log

ERROR: KVM acceleration not available (no write access), this will cause a major loss of performance.

Screenshots (optional)

No response

@kroese
Copy link
Contributor

kroese commented Nov 12, 2024

The error says no write access so it seems like a permission issue for the /dev/kvm file.

Probably you need to do something like chmod 777 /dev/kvm to give write permission, but I am not sure exactly.

@markintouch
Copy link
Author

I tried chmod 666 /dev/kvm,the same. The current user has write permission. Actually I deployed dockur/mac at the same server before, with no error report about KVM permission.

@kroese
Copy link
Contributor

kroese commented Nov 12, 2024

Very strange! The code is almost identical between both projects.

But I think the current user has nothing to do with it, the Docker engine runs as root, so it is the root user who needs write permissions to the kvm file, not the current user.

@kroese
Copy link
Contributor

kroese commented Nov 12, 2024

@sangriaaa34 Because both depend on https://github.com/qemus/qemu-docker

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@kroese @markintouch and others