dockur / windows

Windows inside a Docker container.
MIT License
29.21k stars 1.99k forks source link

Not being able to make USB passtrough to work with 8Bit Do Ultimate Controller #714

Closed WilsonNet closed 2 months ago

WilsonNet commented 2 months ago

Operating system

Arch Linux

Description

I'm trying to upgrade the firmware on my 8bit do ultimate controllers, but I have not been able to make the VM detect the controllers.

Here are how lsusb output them

Bus 003 Device 120: ID 2dc8:3106 8BitDo 8BitDo Ultimate wireless Controller for PC
Bus 007 Device 014: ID 2dc8:3106 8BitDo 8BitDo Ultimate Controller

Here is how it is in the yaml:

    environment:
      VERSION: "win10"
      ARGUMENTS: "-device usb-host,vendorid=0x2dc8,productid=0x3106"

I can't find the issue

Docker compose

services:
  windows:
    build: .
    image: dockurr/windows
    container_name: windows
    environment:
      VERSION: "win10"
      ARGUMENTS: "-device usb-host,vendorid=0x2dc8,productid=0x3106"
    devices:
      - /dev/kvm
      - /dev/bus/usb
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    volumes:
      - /home/wilsonn/windows-docker:/data
      - /home/wilsonn/windows-docker:/storage  # Add this line

Docker log

❯ Starting Windows for Docker v3.13...
❯ For support visit https://github.com/dockur/windows
❯ CPU: AMD Ryzen 7 6800H with Radeon Graphics | RAM: 11/15 GB | DISK: 296 GB (ext4) | HOST: 6.10.6-arch1-1...

❯ Requesting Windows 10 from Microsoft server...
❯ Failed to download Windows 10, will try a diferent method now...
❯ Downloading product information from Microsoft server...
❯ Downloading Windows 10...
❯ Extracting Windows 10 bootdisk...
❯ Extracting Windows 10 environment...
❯ Extracting Windows 10 setup...
❯ Extracting Windows 10 image...
❯ Adding drivers to image...
❯ Adding win10x64.xml for automatic installation...
❯ Building Windows 10 image...
❯ Creating a 64G growable disk image in raw format...
❯ Booting Windows using QEMU v9.0.2...
[=3h[=3h[=3hBdsDxe: 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)
[=3h❯ Windows started succesfully, visit http://localhost:8006/ to view the screen...
[=3h[=3h[=3hBdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,9F8367E9-F6EF-40AE-A994-8A870B17E37F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,9F8367E9-F6EF-40AE-A994-8A870B17E37F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
[=3h[=3h[=3hBdsDxe: loading Boot0004 "Windows Boot Manager" from HD(1,GPT,9F8367E9-F6EF-40AE-A994-8A870B17E37F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
BdsDxe: starting Boot0004 "Windows Boot Manager" from HD(1,GPT,9F8367E9-F6EF-40AE-A994-8A870B17E37F,0x800,0x40000)/\EFI\Microsoft\Boot\bootmgfw.efi
qemu-system-x86_64: libusb_release_interface: -4 [NO_DEVICE]

Screenshots (optional)

Some screenshots of the problem (tried to re-plug the USB):

image

image

It doesn't seem to detect it.

WilsonNet commented 2 months ago

Turns out I needed to passtrough the usb hub also