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

ERROR: Timeout while waiting for QEMU to boot the machine! #149

Open
rogerdk opened this issue Jun 7, 2024 · 3 comments
Open

ERROR: Timeout while waiting for QEMU to boot the machine! #149

rogerdk opened this issue Jun 7, 2024 · 3 comments

Comments

@rogerdk
Copy link

rogerdk commented Jun 7, 2024

Operating system

Debian 12 on Orange Pi 5 Plus

Description

When starting docker I see the following error and it dies.

[···]
windows  | ❯ Booting Windows using QEMU v8.2.4...
windows  | ❯ ERROR: Timeout while waiting for QEMU to boot the machine!
windows  | qemu-system-aarch64: terminating on signal 15 from pid 203 (bash)
windows  | ❯ Shutdown completed!
windows exited with code 0

I was following the #37 issue but could not get past this timeout. however since version 2.09 it now dies after giving timeout. before it would hang with some CPU usage.

Docker compose


version: '3.8'

services:
  windows:
    image: dockurr/windows-arm:2.10
    container_name: windows
    environment:
      VERSION: "win11"
      KEYBOARD: "es-ES"
      KVM: "Y"
      DEBUG: "Y"
      CPU_CORES: "2"
      RAM_SIZE: "4G"
      CPU_TASK_SET: "0,1,2,3"
    devices:
      - /dev/kvm
    volumes:
      - ./storage2:/storage
      - ./iso/win11arm64.iso:/custom.iso

    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
      - 5901-5909:5901-5909
    stop_grace_period: 2m
    networks:
      - windows

networks:
  windows:
    name: windows
    ipam:
      config:
        - subnet: '172.17.12.0/24'

Docker log

windows  | ❯ Starting Windows for Docker v2.10...
windows  | ❯ For support visit https://github.com/dockur/windows-arm
windows  | ❯ CPU: Cortex A55 | RAM: 9/16 GB | DISK: 206 GB (ext4) | HOST: 5.10.110-rockchip-rk3588...
windows  |
windows  | ❯ Host: 0bf665e41008  IP: 172.17.12.2  Gateway: 172.17.12.1  Interface: eth0  MAC: 02:D0:B1:0D:0B:02
windows  | nameserver 127.0.0.11
windows  |
windows  | ++ /usr/sbin/dnsmasq --dhcp-range=20.20.20.21,20.20.20.21 --dhcp-host=02:D0:B1:0D:0B:02,,20.20.20.21,QEMU,infinite --dhcp-option=option:netmask,255.255.255.0 --dhcp-option=option:dns-server,20.20.20.1 --dhcp-option=option:router,20.20.20.1 --address=/host.lan/20.20.20.1
windows  |
windows  | Arguments:
windows  |
windows  | -nodefaults
windows  | -cpu host
windows  | -smp 2,sockets=1,dies=1,cores=2,threads=1
windows  | -m 4G
windows  | -machine type=virt,secure=off,dump-guest-core=off,accel=kvm
windows  | -enable-kvm
windows  | -display vnc=:0,websocket=5700
windows  | -device virtio-gpu
windows  | -monitor telnet:localhost:7100,server,nowait,nodelay
windows  | -daemonize
windows  | -D /run/shm/qemu.log
windows  | -pidfile /run/shm/qemu.pid
windows  | -name windows,process=windows,debug-threads=on
windows  | -serial pty
windows  | -device qemu-xhci,id=xhci
windows  | -device usb-kbd
windows  | -device usb-tablet
windows  | -netdev tap,ifname=qemu,script=no,downscript=no,id=hostnet0
windows  | -device virtio-net-pci,romfile=,netdev=hostnet0,mac=02:D0:B1:0D:0B:02,id=net0
windows  | -drive file=/storage/windows.5916098560.iso,id=cdrom0,format=raw,readonly=on,media=cdrom,if=none
windows  | -device virtio-scsi-pci,id=cdrom0b,bus=pcie.0,addr=0x5,iothread=io2
windows  | -device scsi-cd,drive=cdrom0,bus=cdrom0b.0,bootindex=10
windows  | -drive file=/storage/data.img,id=data3,format=raw,cache=none,aio=native,discard=on,detect-zeroes=on,if=none
windows  | -device virtio-scsi-pci,id=data3b,bus=pcie.0,addr=0xa,iothread=io2
windows  | -device scsi-hd,drive=data3,bus=data3b.0,channel=0,scsi-id=0,lun=0,rotation_rate=1,bootindex=3
windows  | -object iothread,id=io2
windows  | -rtc base=localtime
windows  | -drive file=/storage/windows.rom,if=pflash,unit=0,format=raw,readonly=on
windows  | -drive file=/storage/windows.vars,if=pflash,unit=1,format=raw
windows  | -object rng-random,id=objrng0,filename=/dev/urandom
windows  | -device virtio-rng-pci,rng=objrng0,id=rng0,bus=pcie.0,addr=0x1c
windows  | ❯ Booting Windows using QEMU v8.2.4...
windows  | ❯ ERROR: Timeout while waiting for QEMU to boot the machine!
windows  | qemu-system-aarch64: terminating on signal 15 from pid 203 (bash)
windows  | ❯ Shutdown completed!
windows exited with code 0

Screenshots (optional)

No response

@kroese
Copy link
Contributor

kroese commented Jun 7, 2024

Strange.. I thought we had confirmation in #37 now that it works in Pi 5.

But this timeout is maybe a different issue, because that other one produced an error message about registers.

I dont have a clue why it hangs unfortunately :( I only tested this container on the Raspberry Pi 5 and there it worked fine.

@rogerdk
Copy link
Author

rogerdk commented Jun 7, 2024

At the beginning of #37 I was able to solve the:
❯ ERROR: qemu-system-aarch64: Failed to put registers after init: Invalid argument
but then I had the timout error.

I started the docker with bash as entrypoint and ran step by step the /run/entry.sh to debug.
It seems to fail to start the tty for the vnc but I couldn't find any other log even though there was some CPU usage.
Although in the last 2 versions, after the timeout the container died.

bad luck I guess...

@kroese
Copy link
Contributor

kroese commented Jun 7, 2024

Yes, because I added this line to kill QEMU when there is no output for 15 seconds:

{ kill -15 "$pid" || true; } 2>/dev/null

How did you find that it fails to start the TTY?

Because all that complicated code with pseudo-terminals is just so that I can launch QEMU in the background to be able to do graceful shutdown when the container stops. It can technically all be removed if needed.

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

2 participants