Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory
1.When I enter"docker compose up -d",An error has occurred: "Error response from daemon: error gathering device information while adding custom device "/dev/kvm": no such file or directory"
2.My docker-compse.yml: version: "3" services: windows: image: dockurr/windows container_name: windows devices: - /dev/kvm cap_add: - NET_ADMIN ports: - 8006:8006 - 3389:3389/tcp - 3389:3389/udp volumes: - ./win:/storage
stop_grace_period: 2m
restart: on-failure
root@vmi1439075:~# sudo apt install cpu-checker sudo kvm-ok Reading package lists... Done Building dependency tree... Done Reading state information... Done The following additional packages will be installed: msr-tools The following NEW packages will be installed: cpu-checker msr-tools 0 upgraded, 2 newly installed, 0 to remove and 26 not upgraded. Need to get 18.8 kB of archives. After this operation, 69.6 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://asi-fs-d.contabo.net/debian bookworm/main amd64 msr-tools amd64 1.3-5 [10.1 kB] Get:2 http://asi-fs-d.contabo.net/debian bookworm/main amd64 cpu-checker amd64 0.7-1.3+b1 [8,764 B] Fetched 18.8 kB in 0s (641 kB/s) Selecting previously unselected package msr-tools. (Reading database ... 41090 files and directories currently installed.) Preparing to unpack .../msr-tools_1.3-5_amd64.deb ... Unpacking msr-tools (1.3-5) ... Selecting previously unselected package cpu-checker. Preparing to unpack .../cpu-checker_0.7-1.3+b1_amd64.deb ... Unpacking cpu-checker (0.7-1.3+b1) ... Setting up msr-tools (1.3-5) ... Setting up cpu-checker (0.7-1.3+b1) ... Processing triggers for man-db (2.11.2-2) ... INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used root@vmi1439075:~# sudo apt install cpu-checker sudo kvm-ok Reading package lists... Done Building dependency tree... Done Reading state information... Done cpu-checker is already the newest version (0.7-1.3+b1). 0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded. INFO: Your CPU does not support KVM extensions KVM acceleration can NOT be used
What CPU do you have?
AMD EPYC 7282 16-Core Processor
As far as I can find that CPU supports hardware virtualization just fine, so KVM should be no problem for this processor.
What OS are you using? Because either the OS did not install the KVM software or otherwise you have the virtualization features of your processor disabled in the BIOS.
i have same error and use ubuntu server
modify the docker-compose.yml file with this and it should work, well it works for me
version: "3"
services:
windows:
image: dockurr/windows
container_name: windows
environment:
KVM: "N" # Disable KVM acceleration
cap_add:
- NET_ADMIN
ports:
- 8006:8006
- 3389:3389/tcp
- 3389:3389/udp
stop_grace_period: 2m
restart: on-failure
Never run it with docker-desktop! I had the same issue, after I read this post, I realized I should run it with local docker engine, instead of docker-desktop.
Have anyone solved it? I'm using Windows 10 system, with an i7-10700 CPU, and hardware virtualization is enabled. I'm encountering the same issue.
modify the docker-compose.yml file with this and it should work, well it works for me
version: "3" services: windows: image: dockurr/windows container_name: windows environment: KVM: "N" # Disable KVM acceleration cap_add: - NET_ADMIN ports: - 8006:8006 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m restart: on-failure
dude... Thank you. I had tough times with this issue. many thanks
modify the docker-compose.yml file with this and it should work, well it works for me
version: "3" services: windows: image: dockurr/windows container_name: windows environment: KVM: "N" # Disable KVM acceleration cap_add: - NET_ADMIN ports: - 8006:8006 - 3389:3389/tcp - 3389:3389/udp stop_grace_period: 2m restart: on-failure
This work for me in a M1, thanks
@fredpena Yes but with it will run in slow-motion, because it needs to emulate a x64 cpu on arm64 hardware. The only real solution is to use the windows-arm container which has the arm64 version of Windows. But it will still be slow because I havent added support for HVF (the macOS variant of KVM) yet.
@fredpena Yes but with it will run in slow-motion, because it needs to emulate a x64 cpu on arm64 hardware. The only real solution is to use the windows-arm container which has the arm64 version of Windows. But it will still be slow because I havent added support for HVF (the macOS variant of KVM) yet.
I'm seeing it to be super slow, now that I'm using it. Do you have any idea when HVF will be available?
@fredpena I dont know if it will ever be available. Because the QEMU version for Debian is compiled without this feature. And even if I go through all the trouble to compile a custom version myself, I have no macOS hardware to perform any testing if it even works. So I guess its better to wait until somebody else adds this feature for us.