ennweb / docker-kvm

QEMU/KVM docker image
MIT License
84 stars 47 forks source link

GPU Passthrough #2

Closed ragaar closed 7 years ago

ragaar commented 8 years ago

There's no option, from what I can see, to pass a PCI device to the KVM.

I'm not all that familiar with /usr/bin/kvm, but it appears the commands expected are[1]:

-device vfio-pci,host=01:00.0,x-vga=on \
-device vfio-pci,host=01:00.1

NOTES:

  1. I downloaded ennweb/kvm within the past 2 days (28-Sep-2016).
  2. I have a working VM who's image was setup independently to include the PCI device.
  3. I passed the PCI device, /dev/dri, into the container and it should be ready to pass into the kvm.

FOLLOW-UP: I don't know if I'll be on the computer much this weekend, but I plan on trying to rewrite the dockerfile or maybe running a second instance of qemu-system-x86_64 and pushing the PCI device manually. I'll share my findings, but it would be nice to get some help with investigating this.

Additionally, thanks for the work to put this together. It's a pretty compact image and I like the interface!

REF:

  1. https://ubuntuforums.org/showthread.php?t=2320369&p=13469670#post13469670
ragaar commented 7 years ago

Getting pulled back and forth, and working on this when I can.

Using a fork as a basis to test out some ideas and define the "best" approach.

ragaar commented 7 years ago

The simple -device vfio-pci options did not work for me.

ragaar commented 7 years ago

Waiting on an update scheduled for release on the 29th, my work on this is pending that support.

ragaar commented 7 years ago

Putting this issue on hold, until I can come back to this project.