dockur / windows

Windows inside a Docker container.
MIT License
16.95k stars 1.44k forks source link

Installation failing because of "KVM acceleration not available" #667

Open PierreV23 opened 1 month ago

PierreV23 commented 1 month ago

Operating system

Debian 12 bookworm

Description

getting "WinApps | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance." error

pierrev@pierrevd:~$ sudo kvm-ok
INFO: /dev/kvm exists
KVM acceleration can be used
pierrev@pierrevd:~$ 

Docker compose

pierrev@pierrevd:~$ cat  ~/.config/winapps/compose.yaml
# For documentation, FAQ, additional configuration options and technical help, visit: https://github.com/dockur/windows

name: "winapps" # Docker Compose Project Name.
volumes:
  # Create Volume 'data'.
  # Located @ '/var/lib/docker/volumes/winapps_data/_data' (Docker).
  # Located @ '/var/lib/containers/storage/volumes/winapps_data/_data' or '~/.local/share/containers/storage/volumes/winapps_data/_data' (Podman).
  data:
services:
  windows:
    image: dockurr/windows # https://hub.docker.com/r/dockurr/windows
    container_name: WinApps # Created Docker VM Name.
    environment:
      # Version of Windows to configure. For valid options, visit:
      # https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-select-the-windows-version
      # https://github.com/dockur/windows?tab=readme-ov-file#how-do-i-install-a-custom-image
      VERSION: "tiny11"
      RAM_SIZE: "4G" # RAM allocated to the Windows VM.
      CPU_CORES: "4" # CPU cores allocated to the Windows VM.
      DISK_SIZE: "64G" # Size of the primary hard disk.
      #DISK2_SIZE: "32G" # Uncomment to add an additional hard disk to the Windows VM. Ensure it is mounted as a volume below.
      #USERNAME: "Docker" # Uncomment to set a custom Windows username. The default is 'Docker'.
      #PASSWORD: "" # Uncomment to set a password for the Windows user. There is no default password.
      HOME: "${HOME}" # Set path to Linux user home folder.
    privileged: true # Grant the Windows VM extended privileges.
    ports:
      - 8006:8006 # Map '8006' on Linux host to '8006' on Windows VM --> For VNC Web Interface @ http://127.0.0.1:8006.
      - 3389:3389/tcp # Map '3389' on Linux host to '3389' on Windows VM --> For Remote Desktop Protocol (RDP).
      - 3389:3389/udp # Map '3389' on Linux host to '3389' on Windows VM --> For Remote Desktop Protocol (RDP).
    stop_grace_period: 120s # Wait 120 seconds before sending SIGTERM when attempting to shut down the Windows VM.
    restart: on-failure # Restart the Windows VM if the exit code indicates an error.
    volumes:
      - data:/storage # Mount volume 'data' to use as Windows 'C:' drive.
      - ${HOME}:/shared # Mount Linux user home directory @ '\\host.lan\Data'.
      #- /path/to/second/hard/disk:/storage2 # Uncomment to mount the second hard disk within the Windows VM. Ensure 'DISK2_SIZE' is specified above.
      - ./oem:/oem # Enables automatic post-install execution of 'oem/install.bat', applying Windows registry modifications contained within 'oem/RDPApps.reg'.
      - /home/pierrev/Downloads/tiny11_23H2_x64.iso:/custom.iso # Uncomment to use a custom Windows ISO. If specified, 'VERSION' (e.g. 'tiny11') will be ignored.
    devices:
      - /dev/kvm # Enable KVM.
      #- /dev/sdX:/disk1 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk1' will be mounted as the main drive).
      #- /dev/sdY:/disk2 # Uncomment to mount a disk directly within the Windows VM (Note: 'disk2' and higher will be mounted as secondary drives).

Docker log

pierrev@pierrevd:~$ docker compose --file ~/.config/winapps/compose.yaml up
[+] Running 2/2
 ✔ Network winapps_default  Created                                                                                                                               0.1s 
 ✔ Container WinApps        Created                                                                                                                               0.2s 
Attaching to WinApps
WinApps  | ❯ Starting Windows for Docker v3.12...
WinApps  | ❯ For support visit https://github.com/dockur/windows
WinApps  | ❯ CPU: Intel Core TM i5 4300M CPU | RAM: 5/6 GB | DISK: 57 GB (ext4) | HOST: 6.6.32-linuxkit...
WinApps  | 
WinApps  | ❯ Extracting local ISO image...
WinApps  | ❯ Adding drivers to image...
WinApps  | ❯ Adding OEM folder to image...
WinApps  | ❯ Adding win11x64.xml for automatic installation...
WinApps  | ❯ Building Windows 11 image...
WinApps  | ❯ ERROR: KVM acceleration not available (device file missing), this will cause a major loss of performance.
WinApps  | ❯ ERROR: See the FAQ on how to diagnose the cause, or continue without KVM by setting KVM=N (not recommended).
WinApps exited with code 0
pierrev@pierrevd:~$

Screenshots (optional)

No response

MMaaxx3253 commented 1 month ago

try add KVM: "N" to your compose file (environment part) but you will lose big part of performance and there is nothing else...