Multiple GPUs in a single VM?


Recommended Posts

Real basic question:

 

When adding a new VM, I can see both of my Nvidia GTX 970s. Is there any way to pass both to the same VM? What if I use AMD cards? (DUMB question, if only I had read the manual)

 

Real question: I want to pass through two Nvidia GPUs to my gaming VM to run SLI, but anytime I include the primary GPU in passthrough, I just get a black screen and my display goes into power saving mode.

 

Solution:

My motherboard has no onboard graphics, so I had to populate a primary GPU to be able to pass through a second and third GPU. I can pass through any video card that isn't the primary VGA device. The passed through GPUs work great. No SLI capability, since SLI uses a bunch of black magic to work.

Link to comment

Real basic question:

 

When adding a new VM, I can see both of my Nvidia GTX 970s. Is there any way to pass both to the same VM? What if I use AMD cards?

Yes. You can add additional GPUs to a VM by clicking the green plus symbol on the Add or Edit VM pages.

Link to comment

Hey Jon,

 

Feeling really dumb about that question now. It's so simple! That's why nobody else on the internet has had that problem  :-[

 

My real issue after that was that I've been getting absolutely no video as soon as I start the VM. I figured out that I need to have a video card or onboard video for UnRAID, and that I seemingly can't take that over for my VM. I.e., I have an X79 platform (so no onboard video) with two GPUs. Will one of those GPUs have to be dedicated to the UnRAID OS, or is there any way I can take over both for the VM?

 

TL;DR- only two video output devices, can I have both for pass through and zero video for host?

 

Alternatively, will Nvidia SLI definitely not work? I don't know how much of its functality is a motherboard thing.

Link to comment

I'm sure it's something dumb, but I've read the UnRAID 6 manual twice and my inexperienced eyes can't find anything.

 

XML:

<domain type='kvm'>
  <name>WinTest6</name>
  <uuid>a227fb86-bc3e-0546-c385-90e5588e5e36</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
    <loader type='pflash'>/usr/share/qemu/ovmf-x64/OVMF-pure-efi.fd</loader>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='4' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disk1/Test/VM/Gaming/WinTest6/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Test/VM/Gaming/Windows.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Test/VM/Gaming/virtio-win-0.1.96.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:80:5a:92'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/WinTest6.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x03' slot='0x00' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x00' slot='0x1b' function='0x0'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc24d'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc537'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

 

 

lspci -knn:

00:00.0 Host bridge [0600]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 DMI2 [8086:0e00] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 1a [8086:0e02] (rev 04)
Kernel driver in use: pcieport
00:02.0 PCI bridge [0604]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 2a [8086:0e04] (rev 04)
Kernel driver in use: pcieport
00:03.0 PCI bridge [0604]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 PCI Express Root Port 3a [8086:0e08] (rev 04)
Kernel driver in use: pcieport
00:05.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 VTd/Memory Map/Misc [8086:0e28] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
00:05.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 IIO RAS [8086:0e2a] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
00:05.4 PIC [0800]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 IOAPIC [8086:0e2c] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
00:11.0 PCI bridge [0604]: Intel Corporation C600/X79 series chipset PCI Express Virtual Root Port [8086:1d3e] (rev 06)
Kernel driver in use: pcieport
00:16.0 Communication controller [0780]: Intel Corporation C600/X79 series chipset MEI Controller #1 [8086:1d3a] (rev 05)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
00:19.0 Ethernet controller [0200]: Intel Corporation 82579V Gigabit Network Connection [8086:1503] (rev 06)
Subsystem: ASUSTeK Computer Inc. P8P67 Deluxe Motherboard [1043:849c]
Kernel driver in use: e1000e
Kernel modules: e1000e
00:1a.0 USB controller [0c03]: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #2 [8086:1d2d] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ehci-pci
00:1b.0 Audio device [0403]: Intel Corporation C600/X79 series chipset High Definition Audio Controller [8086:1d20] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:84fd]
00:1c.0 PCI bridge [0604]: Intel Corporation C600/X79 series chipset PCI Express Root Port 1 [8086:1d10] (rev b6)
Kernel driver in use: pcieport
00:1c.4 PCI bridge [0604]: Intel Corporation C600/X79 series chipset PCI Express Root Port 5 [8086:1d18] (rev b6)
Kernel driver in use: pcieport
00:1c.5 PCI bridge [0604]: Intel Corporation C600/X79 series chipset PCI Express Root Port 6 [8086:1d1a] (rev b6)
Kernel driver in use: pcieport
00:1c.7 PCI bridge [0604]: Intel Corporation C600/X79 series chipset PCI Express Root Port 8 [8086:1d1e] (rev b6)
Kernel driver in use: pcieport
00:1d.0 USB controller [0c03]: Intel Corporation C600/X79 series chipset USB2 Enhanced Host Controller #1 [8086:1d26] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ehci-pci
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 PCI Bridge [8086:244e] (rev a6)
00:1f.0 ISA bridge [0601]: Intel Corporation C600/X79 series chipset LPC Controller [8086:1d41] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
00:1f.2 SATA controller [0106]: Intel Corporation C600/X79 series chipset 6-Port SATA AHCI Controller [8086:1d02] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ahci
Kernel modules: ahci
00:1f.3 SMBus [0c05]: Intel Corporation C600/X79 series chipset SMBus Host Controller [8086:1d22] (rev 06)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: i801_smbus
Kernel modules: i2c_i801
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:2978]
01:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:2978]
03:00.0 VGA compatible controller [0300]: NVIDIA Corporation GM204 [GeForce GTX 970] [10de:13c2] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:2978]
03:00.1 Audio device [0403]: NVIDIA Corporation GM204 High Definition Audio Controller [10de:0fbb] (rev a1)
Subsystem: eVga.com. Corp. Device [3842:2978]
06:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller [1b21:1042]
Subsystem: ASUSTeK Computer Inc. P8B WS Motherboard [1043:8488]
Kernel driver in use: xhci_hcd
07:00.0 SATA controller [0106]: ASMedia Technology Inc. ASM1062 Serial ATA Controller [1b21:0612] (rev 01)
Subsystem: ASUSTeK Computer Inc. Device [1043:84b7]
Kernel driver in use: ahci
Kernel modules: ahci
08:00.0 USB controller [0c03]: ASMedia Technology Inc. ASM1042 SuperSpeed USB Host Controller [1b21:1042]
Subsystem: ASUSTeK Computer Inc. P8B WS Motherboard [1043:8488]
Kernel driver in use: xhci_hcd
ff:08.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 0 [8086:0e80] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:09.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 QPI Link 1 [8086:0e90] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0a.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 0 [8086:0ec0] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0a.1 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 1 [8086:0ec1] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0a.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 2 [8086:0ec2] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0a.3 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Power Control Unit 3 [8086:0ec3] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0b.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers [8086:0e1e] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0b.3 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 UBOX Registers [8086:0e1f] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0c.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers [8086:0ee0] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0c.1 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers [8086:0ee2] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0c.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers [8086:0ee4] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0d.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers [8086:0ee1] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0d.1 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers [8086:0ee3] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0d.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Unicast Registers [8086:0ee5] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0e.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0 [8086:0ea0] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0e.1 Performance counters [1101]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Home Agent 0 [8086:0e30] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:0f.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Target Address/Thermal Registers [8086:0ea8] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0f.1 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 RAS Registers [8086:0e71] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0f.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers [808... (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0f.3 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers [808... (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0f.4 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers [808... (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:0f.5 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 0 Channel Target Address Decoder Registers [808... (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:10.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 0 [8086:0eb0] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:10.1 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 1 [8086:0eb1] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:10.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 0 [8086:0eb2] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:10.3 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 1 [8086:0eb3] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:10.4 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 2 [8086:0eb4] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:10.5 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 Thermal Control 3 [8086:0eb5] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:10.6 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 2 [8086:0eb6] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:10.7 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Integrated Memory Controller 1 Channel 0-3 ERROR Registers 3 [8086:0eb7] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:13.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe [8086:0e1d] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:13.1 Performance counters [1101]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 R2PCIe [8086:0e34] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:13.4 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Registers [8086:0e81] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:13.5 Performance counters [1101]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 QPI Ring Performance Ring Monitoring [8086:0e36] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
Kernel driver in use: ivbep_uncore
ff:16.0 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 System Address Decoder [8086:0ec8] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:16.1 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers [8086:0ec9] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]
ff:16.2 System peripheral [0880]: Intel Corporation Xeon E7 v2/Xeon E5 v2/Core i7 Broadcast Registers [8086:0eca] (rev 04)
Subsystem: ASUSTeK Computer Inc. Device [1043:84ef]

Link to comment

Here's the XML for one I just created which exhibits this issue:

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>WinTest11</name>
  <uuid>32e11db8-eaec-3156-9ce8-7253189481ac</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='5'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disk1/Test/VM/Gaming/WinTest11/vdisk1.img'/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Test/VM/Gaming/Windows.iso'/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Test/VM/Gaming/virtio-win-0.1.96.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'/>
    <controller type='ide' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:20:39:a8'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <target port='0'/>
    </serial>
    <console type='pty'>
      <target type='serial' port='0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/WinTest11.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc24d'/>
      </source>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc537'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=01.0,multifunction=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

 

I force stopped the VM, hit edit, removed the GPU/audio on 01:00.0/1, switched to the GPU/audio on 03:00.0/1, switched my DisplayPort cable to the that GPU, and we're off and running. Here's that XML:

 

<domain type='kvm' id='4' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>
  <name>WinTest11</name>
  <uuid>32e11db8-eaec-3156-9ce8-7253189481ac</uuid>
  <metadata>
    <vmtemplate name="Custom" icon="windows.png" os="windows"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>6</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='0'/>
    <vcpupin vcpu='1' cpuset='1'/>
    <vcpupin vcpu='2' cpuset='2'/>
    <vcpupin vcpu='3' cpuset='3'/>
    <vcpupin vcpu='4' cpuset='4'/>
    <vcpupin vcpu='5' cpuset='5'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.3'>hvm</type>
  </os>
  <features>
    <acpi/>
    <apic/>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='1'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/bin/qemu-system-x86_64</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/disk1/Test/VM/Gaming/WinTest11/vdisk1.img'/>
      <backingStore/>
      <target dev='hdc' bus='virtio'/>
      <boot order='1'/>
      <alias name='virtio-disk2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Test/VM/Gaming/Windows.iso'/>
      <backingStore/>
      <target dev='hda' bus='ide'/>
      <readonly/>
      <boot order='2'/>
      <alias name='ide0-0-0'/>
      <address type='drive' controller='0' bus='0' target='0' unit='0'/>
    </disk>
    <disk type='file' device='cdrom'>
      <driver name='qemu' type='raw'/>
      <source file='/mnt/user/Test/VM/Gaming/virtio-win-0.1.96.iso'/>
      <backingStore/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <alias name='ide0-0-1'/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0'>
      <alias name='usb0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x1'/>
    </controller>
    <controller type='virtio-serial' index='0'>
      <alias name='virtio-serial0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/>
    </controller>
    <interface type='bridge'>
      <mac address='52:54:00:20:39:a8'/>
      <source bridge='br0'/>
      <target dev='vnet0'/>
      <model type='virtio'/>
      <alias name='net0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    </interface>
    <serial type='pty'>
      <source path='/dev/pts/0'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/0'>
      <source path='/dev/pts/0'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/WinTest11.org.qemu.guest_agent.0'/>
      <target type='virtio' name='org.qemu.guest_agent.0' state='disconnected'/>
      <alias name='channel0'/>
      <address type='virtio-serial' controller='0' bus='0' port='1'/>
    </channel>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc52b'/>
        <address bus='6' device='6'/>
      </source>
      <alias name='hostdev0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc24d'/>
        <address bus='6' device='5'/>
      </source>
      <alias name='hostdev1'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='yes'>
      <source>
        <vendor id='0x046d'/>
        <product id='0xc537'/>
        <address bus='6' device='4'/>
      </source>
      <alias name='hostdev2'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>
    </memballoon>
  </devices>
  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.1,bus=root.1,addr=00.1'/>
  </qemu:commandline>
</domain>

Link to comment

I think it's working. SeaBIOS instead of OVMF (so many forced restarts, so much OS corruption, I am not sure if this has anything to do with it).

 

The "x-vga=on" caught my eye in the XML:

 

  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=01.0,multifunction=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.1,bus=root.1,addr=00.1'/>
  </qemu:commandline>

 

so I tried changing it to this:

 

  <qemu:commandline>
    <qemu:arg value='-device'/>
    <qemu:arg value='ioh3420,bus=pci.0,addr=1c.0,multifunction=on,port=2,chassis=1,id=root.1'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=01:00.0,bus=root.1,addr=01.0,multifunction=on'/>
    <qemu:arg value='-device'/>
    <qemu:arg value='vfio-pci,host=03:00.1,bus=root.1,addr=00.1'/>
  </qemu:commandline>

 

Now, I'm pretty positive I was being smart about which GPU was supposed to output video, and which was plugged in where (early in testing I just had monitors attached to each). But this seems to have done it. I'll report back after the install completes and I can do some tests.

 

EDIT: After the Windows install completed, I noticed that Windows can't see the GPU in 01:00.0. So I'm back where I was before - no access to the system's primary GPU.

Link to comment

Ok, I'm not positive, but I would start off with making sure you're only passing one graphics card through at a time.  From there, it looks like you're passing through the video/audio of graphics card 1 and passthrough through the video of graphics card 2. 

 

Can you send a screenshot of your VM config in the Unraid GUI?  With any advanced tabs enabled.  I'm particularly interested in your video card area.

Link to comment

I was going to try with a new motherboard tonight, but it was DOA. Let me ask a simple question: if my CPU/motherboard doesn't have integrated graphics (i.e., the UnRAID console is outputting via the primary video card) can I pass that same primary video card through to a VM? I use telnet and UnRAID can be headless 99.9% of the time. I'm asking because that seems to be the delineating factor between which card can pass through.

 

EDIT: after doing some bedtime reading on KVM/QEMU (unrelated to UnRAID), I realized that is question is probably answered by the pci-stub you mentioned above. I'll try that out tomorrow afternoon.

Link to comment

For what it's worth, I resolved this by getting a motherboard that could fit several GPUs.

 

Intel's X79 and X99 platforms do not support integrated graphics, so I could not pass through the primary GPU, but I could pass through several others without issue. Nvidia Control Panel detects all the passthrough GPUs, but does not see SLI capability. This setup would be helpful for productivity, but not for gaming.

 

Of note, I'm still under the impression that there must always be a host VGA device. I've found no workaround for this, so in the future I'll have an R5 220 for host and a high-end single GPU for my gaming VM.

 

 

Link to comment

For what it's worth, I resolved this by getting a motherboard that could fit several GPUs.

 

Intel's X79 and X99 platforms do not support integrated graphics, so I could not pass through the primary GPU, but I could pass through several others without issue. Nvidia Control Panel detects all the passthrough GPUs, but does not see SLI capability. This setup would be helpful for productivity, but not for gaming.

 

Of note, I'm still under the impression that there must always be a host VGA device. I've found no workaround for this, so in the future I'll have an R5 220 for host and a high-end single GPU for my gaming VM.

I have found that it is somehow related to the GPU used.

I have a Gigabyte DS3P with two x16 slots (The second only x4 mode). I have two GPUs, one Gainward GTX 760 and one Sapphire HD6450.

I can not get the Nvidia card to work if it's in the first slot, but in the second it works if there is a card in the first slot. If there is no card in the first slot, it doesn't work.

The AMD card works in both slots no matter what.

Link to comment

For what it's worth, I resolved this by getting a motherboard that could fit several GPUs.

 

Intel's X79 and X99 platforms do not support integrated graphics, so I could not pass through the primary GPU, but I could pass through several others without issue. Nvidia Control Panel detects all the passthrough GPUs, but does not see SLI capability. This setup would be helpful for productivity, but not for gaming.

 

Of note, I'm still under the impression that there must always be a host VGA device. I've found no workaround for this, so in the future I'll have an R5 220 for host and a high-end single GPU for my gaming VM.

I have found that it is somehow related to the GPU used.

I have a Gigabyte DS3P with two x16 slots (The second only x4 mode). I have two GPUs, one Gainward GTX 760 and one Sapphire HD6450.

I can not get the Nvidia card to work if it's in the first slot, but in the second it works if there is a card in the first slot. If there is no card in the first slot, it doesn't work.

The AMD card works in both slots no matter what.

 

Hmmm, do your motherboard or CPU have VGA output?

Link to comment

For what it's worth, I resolved this by getting a motherboard that could fit several GPUs.

 

Intel's X79 and X99 platforms do not support integrated graphics, so I could not pass through the primary GPU, but I could pass through several others without issue. Nvidia Control Panel detects all the passthrough GPUs, but does not see SLI capability. This setup would be helpful for productivity, but not for gaming.

 

Of note, I'm still under the impression that there must always be a host VGA device. I've found no workaround for this, so in the future I'll have an R5 220 for host and a high-end single GPU for my gaming VM.

I have found that it is somehow related to the GPU used.

I have a Gigabyte DS3P with two x16 slots (The second only x4 mode). I have two GPUs, one Gainward GTX 760 and one Sapphire HD6450.

I can not get the Nvidia card to work if it's in the first slot, but in the second it works if there is a card in the first slot. If there is no card in the first slot, it doesn't work.

The AMD card works in both slots no matter what.

 

Hmmm, do your motherboard or CPU have VGA output?

No it does not have a built-in display adapter.

Link to comment
  • 5 months later...

I was going to try with a new motherboard tonight, but it was DOA. Let me ask a simple question: if my CPU/motherboard doesn't have integrated graphics (i.e., the UnRAID console is outputting via the primary video card) can I pass that same primary video card through to a VM? I use telnet and UnRAID can be headless 99.9% of the time. I'm asking because that seems to be the delineating factor between which card can pass through.

 

EDIT: after doing some bedtime reading on KVM/QEMU (unrelated to UnRAID), I realized that is question is probably answered by the pci-stub you mentioned above. I'll try that out tomorrow afternoon.

 

I suspect some unhelpful editting has been done here as pci-stub has NOT been mentioned above (or has been removed). I was messing with KVM and pci-stub in Ubuntu before deciding I might use unRAID instead.

 

I am looking at X99 mobos (no onboard graphics) and want to pass up to 3 GPUs. Therefore need to know if this problem got resolved at all. I need to be able to pass through ALL the GPUs present. I don't need Unraid hogging a GPU to display some text when I have a web interface I can access from any VM.

 

Is there a solution or does unRAID really need a dedicated GPU to be wasted in that way???

Link to comment

I was going to try with a new motherboard tonight, but it was DOA. Let me ask a simple question: if my CPU/motherboard doesn't have integrated graphics (i.e., the UnRAID console is outputting via the primary video card) can I pass that same primary video card through to a VM? I use telnet and UnRAID can be headless 99.9% of the time. I'm asking because that seems to be the delineating factor between which card can pass through.

 

EDIT: after doing some bedtime reading on KVM/QEMU (unrelated to UnRAID), I realized that is question is probably answered by the pci-stub you mentioned above. I'll try that out tomorrow afternoon.

 

I suspect some unhelpful editting has been done here as pci-stub has NOT been mentioned above (or has been removed). I was messing with KVM and pci-stub in Ubuntu before deciding I might use unRAID instead.

 

I am looking at X99 mobos (no onboard graphics) and want to pass up to 3 GPUs. Therefore need to know if this problem got resolved at all. I need to be able to pass through ALL the GPUs present. I don't need Unraid hogging a GPU to display some text when I have a web interface I can access from any VM.

 

Is there a solution or does unRAID really need a dedicated GPU to be wasted in that way???

It's not an unraid issue, but nvidia. Amd cards mostly works when in the first pcie slot (unraid console).

Link to comment

So AMD in primary spot and nvidia in others? That is consistently working?

No, its not consistently working, but seems to work for many. The issue is not with unRAID OS itself.  The VM will spin up with the GPU passed through and even report correctly in Windows device manager if you remote into the VM, but the monitor won't light up. This is because of issues at a lower level in hardware.

Link to comment

Interesting... a little bit of a lottery then. Only safe way to run 3 diff GPUs for VMs is to either have onboard GPU or a 4th GPU (in primary slot, so a mega mobo needed!) ??

 

What about adding a desktop and browser to the unRAID console so at least that GPU could do something useful rather than sit around displaying a console window?

 

I'm getting CLOSE to what I am looking for... hopefully without spending the $0000s that Linux spent on his multi GPU build...

Link to comment

After messing around with this months later, I can confidently say that you need your primary VGA device (be it integrated graphics or the top-slot GPU) to be dedicated to the host UnRAID OS. I have had excellent luck since giving up on passing my primary GPU to the VM. Were I to do my build again, I might entertain a cheaper platform that could also include integrated graphics.

Link to comment

For what it's worth, I resolved this by getting a motherboard that could fit several GPUs.

 

Intel's X79 and X99 platforms do not support integrated graphics, so I could not pass through the primary GPU, but I could pass through several others without issue. Nvidia Control Panel detects all the passthrough GPUs, but does not see SLI capability. This setup would be helpful for productivity, but not for gaming.

 

Of note, I'm still under the impression that there must always be a host VGA device. I've found no workaround for this, so in the future I'll have an R5 220 for host and a high-end single GPU for my gaming VM.

I have found that it is somehow related to the GPU used.

I have a Gigabyte DS3P with two x16 slots (The second only x4 mode). I have two GPUs, one Gainward GTX 760 and one Sapphire HD6450.

I can not get the Nvidia card to work if it's in the first slot, but in the second it works if there is a card in the first slot. If there is no card in the first slot, it doesn't work.

The AMD card works in both slots no matter what.

 

But when 6450 is primary and 760 in x4 you cannot pass the 6450 to a VM (and maybe also the 760)??? Your GA-970A-DS3P  doesnt have IGP. If you cannot pass the 6450 that effectively confirms that IF I get an X99 mobo I would need a crappy card for console (in primary slot) plus any GPUs I want to pass....

 

Sorry if I am labouring the point a little!!

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.