dockur / windows

Windows inside a Docker container.
MIT License
17.03k stars 1.45k forks source link

Forcefully terminating Windows, reason: 0.. #538

Open lasharor opened 3 months ago

lasharor commented 3 months ago

Is there no existing issue for this?

Machine specifications

13th Gen Intel Core TM i5 13500 | RAM: 11/32 GB | DISK: 119 GB (zfs) | HOST:

Operating system

6.5.13-5-pve, docker on LXC Debian, KVM passthrough enabled and verified

Docker version

Docker version 20.10.24+dfsg1, build 297e128

Description

Trying to run this on my config. I tried many different things including many of those that are listed in the issues here on github. I tried enabled "CONSOLE" but it doesn't give any additional information. So, I don't know what to change.

Tried: enabled/disabling GPU, enabling/disabling KVM, changing from windows 11 to 11. enabled passhtrough of vhost-net, verified kvm via kvm-ok, installed relevant KVM/qemu packages, enabling previliged mode etc

Docker compose

services: windows: image: dockurr/windows container_name: windows environment: VERSION: "win10" GPU: "Y" CONSOLE: "Y" devices:

Docker log

❯ Starting Windows for Docker v3.10... ❯ For support visit https://github.com/dockur/windows ❯ CPU: 13th Gen Intel Core TM i5 13500 | RAM: 11/32 GB | DISK: 119 GB (zfs) | HOST: 6.5.13-5-pve... ❯ Installing Intel GPU drivers... ❯ Installing OpenGL module... ❯ Booting Windows... 3h3h3hBdsDxe: failed to load Boot0002 "UEFI QEMU QEMU HARDDISK " from PciRoot(0x0)/Pci(0xA,0x0)/Scsi(0x0,0x0): Not Found BdsDxe: loading Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0) BdsDxe: starting Boot0001 "UEFI QEMU QEMU CD-ROM " from PciRoot(0x0)/Pci(0x5,0x0)/Scsi(0x0,0x0) ❯ ERROR: Forcefully terminating Windows, reason: 0... 3h❯ Shutdown completed!

Screenshots (optional)

No response

kroese commented 3 months ago

Please try

environment:
  HV: "N"

And remove the "GPU" and "CONSOLE" stuff.

lasharor commented 3 months ago

Like this compose file:

services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "win11"
      HV: "N"
    devices:
      - /dev/kvm
    cap_add:
      - NET_ADMIN
    ports:
      - 8033:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    volumes:
    - /docker/windows:/storage
    sysctls:
    - net.ipv4.ip_forward=1

Still the same problem, builds the images. Seems to boot and then immediatly shutsdown.

kroese commented 3 months ago

Can you try if it makes a difference if you select "win7" or "xp" as the VERSION for example?

lasharor commented 3 months ago

win7:

❯ Extracting Windows 7 image... ❯ Adding win7x64-enterprise.xml for automatic installation... ❯ Building Windows 7 image... ❯ Creating a 64G growable disk image in raw format... ❯ Booting Windows (legacy)... SeaBIOS (version 1.16.3-debian-1.16.3-2) Booting from Hard Disk... Boot failed: not a bootable disk Booting from DVD/CD... ❯ ERROR: Forcefully terminating Windows, reason: 0... ❯ Shutdown completed!

Winxp has some trouble building the image. But actually stays running:

image

kroese commented 3 months ago

Very strange problem.. If I had to guess I still think it has something to do with that KVM passthrough.

Im not sure if its possible for you to run the container on the host instead of inside a VM, just to see if it makes a difference?

Also, run this command on the host:

echo 1 > /sys/module/kvm/parameters/ignore_msrs

and see if it helps.

Another thing worth trying is to add privileged: true to the compose file.