dockur / windows

Windows inside a Docker container.
MIT License
29.92k stars 2.04k forks source link

windows 2022 vm is really slow and cpu is 100% pinned #848

Open MindlessGamingDE opened 3 weeks ago

MindlessGamingDE commented 3 weeks ago

Operating system

ubuntu 24.04

Description

the windows vm is really slow and the cpu cores of the vm are 100% all the time even im idle

Docker compose

GNU nano 7.2 docker-compose.yml services: windows: image: dockurr/windows container_name: windows environment: VERSION: "2022" VMX: "Y" DISK_SIZE: "50G" RAM_SIZE: "6G" CPU_CORES: "2" devices:

Docker log

❯ Starting Windows for Docker v4.00... ❯ For support visit https://github.com/dockur/windows ❯ CPU: AMD Ryzen 7 2700X Eight Core Processor | RAM: 7/8 GB | DISK: 42 GB (ext4) | HOST: 6.8.0-48...

❯ Warning: your configured RAM_SIZE of 6 GB is very close to the 7 GB of memory available, please consider a lower value. ❯ Booting Windows using QEMU v9.1.0... BdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,7CCD9614-2FC1-4769-8343-4017DD677380,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,7CCD9614-2FC1-4769-8343-4017DD677380,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi ❯ Windows started succesfully, visit http://localhost:8006/ to view the screen... root@ubuntu:~/windows#

Screenshots (optional)

grafik grafik

abbbi commented 3 weeks ago

not sure if passed, but there could be the possibilty to add the hyperv extensios to the -cpu call that often seem to help: https://www.qemu.org/docs/master/system/i386/hyperv.html

try something like:

     environment:
       VERSION: "win11"
       ARGUMENTS: "-cpu host,hv_relaxed,hv_vpindex,hv_time"
kroese commented 3 weeks ago

@abbbi Hyper-V extensions are already enabled by default. You can see the flags that are passed by setting:

     environment:
       DEBUG: "Y"

so the only thing worth trying might be to disable Hyper-V, which can be done like this:

     environment:
       HV: "N"
MindlessGamingDE commented 3 weeks ago

Hey sorry for the late response..

Ill try it out.. thank you