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

pci passthrough possible for smbus? #239

Closed
squont opened this issue Mar 9, 2024 · 1 comment
Closed

pci passthrough possible for smbus? #239

squont opened this issue Mar 9, 2024 · 1 comment

Comments

@squont
Copy link

squont commented Mar 9, 2024

tldr

can I pass through pci devices such as the SMBus to the guest? If so how? I am getting errors trying to do that(failed to open /dev/vfio/5: No such file or directory).

PS: Thanks a bunch for this container - so very convenient! Heard about it from my spirit guide, Wolfgang

goal

unsure if possible. To run bios update software that is wndows only in a kvm windows guest with archlinux host.

I've tried with, and without adding /dev/vfio to the devices section in the compose file and it didn't seem to make any difference. Not sure that it should or not. Just trying things.

environment

  • Archlinux
  • z1 extreme apu
  • amd_iommu=on param set
lspci | grep SMBus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 71)
 sudo dmesg | grep -i group\ 5
[    0.815400] pci 0000:00:14.0: Adding to iommu group 5
[    0.815436] pci 0000:00:14.3: Adding to iommu group 5
sudo dmesg | grep IOMMUv2
[    0.878446] AMD-Vi: AMD IOMMUv2 loaded and initialized
version: "3"
services:
  windows:
    image: dockurr/windows
    container_name: windows
    environment:
      ARGUMENTS: "-device vfio-pci,host=00:14.0 -device usb-host,vendorid=0x17ef,productid=0x6182"
    devices:
      - /dev/kvm
      - /dev/bus/usb
    cap_add:
      - NET_ADMIN
    ports:
      - 8006:8006
      - 3389:3389/tcp
      - 3389:3389/udp
    stop_grace_period: 2m
    restart: on-failure
    volumes:
      - ./data:/storage

Compose log / error log

[+] Running 2/0
 ✔ Network windows_default  Created                                                                                  0.0s
 ✔ Container windows        Created                                                                                  0.0s
Attaching to windows
windows  | ❯ Starting Windows for Docker v2.04...
windows  | ❯ For support visit https://github.com/dockur/windows
windows  |
windows  | ❯ Booting Windows using QEMU emulator version 8.2.1 ...
windows  | ❯ ERROR: qemu-system-x86_64: -device vfio-pci,host=00:14.0: vfio 0000:00:14.0: failed to open /dev/vfio/5: No such file or directory
@kroese
Copy link
Contributor

kroese commented Mar 10, 2024

It looks like you did everything right, so I am not sure why it says failed to open /dev/vfio/5. But I never tried PCI passthrough myself, so maybe there is a missing step or parameter.

But in Wolfgangs video he also says: if you need to do advanced stuff like PCI passthrough, it makes more sense to use a "real" VM. And I agree with him, because software like Proxmox has much more features, this is just a very basic container.

@squont squont closed this as completed Mar 11, 2024
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