GPU passthrough with only one card?


d4rkf

Recommended Posts

Can you tell me how you managed to copy the rom file ? no matter what I do I don't have ssh permissions I can access it and disable passtrough but can't access the file.

 

this is what I tried last:

/sys/bus/pci/devices/0000:02:00.0# cat rom > /boot/vbios.rom

cat: rom: Invalid argument

 

I don't know how to get permissions on rom file or why it works for other people./

 

I am getting the same error here:

 

root@Tower:/sys/bus/pci/devices/0000:01:00.0# cat rom /mnt/user/isos/bios.rom
cat: rom: Input/output error
cat: /mnt/user/isos/bios.rom: No such file or directory

 

Also extracting the bios with GPU-Z doesnt help to get a screen output on my VM. Where you able to solve it? My display for unraid is connected to my Intel HD graphics and VFIO-PCI was already not a kernel driver when I listed LSPCI -v

Link to comment

Did you also do the below before doing the dump?

 

echo 1 > rom

Yes did that as well. Once I started the VM I did LSPCI as well and then the GPU had the Kernel driver for VFIO-PCI loaded. So I unbinded it, dumped the ROM, bound it again and reconfigured the XML of the VM to have the BIOS included. Still a black screen :(

Link to comment

Just reporting another success story with a Nvidia Geforce 1060 (Palit 1060 Dual).

 

Initially I had a lot of trouble and could not get any picture on my monitor. After reading a lot on this forum, checking VFIO reddit group and VFIO-users mailing list (which provided valuable resources and a lot of insight), I managed to get my setup working.

 

Initially the only graphics card in my system was the geforce 1060 - but no matter what I tried, I could not get a picture on my screen. Last week I ordered another Graphics Card (radeon hd2600 pro for cheap) and put it into the machine and just like magic, the virtual machine would boot with a picture.

 

First I didn`t bother to try again with just a single card, but today I followed the instructions in here on more time and dumped the vga bios with the radeon still attached. I removed the radeon card and added the freshly dumped graphics card bios to the xml and tried one more time. This time with only the nvidia card in the pc it works.

 

 

@locutus2000

Try dumping the bios when another card is in the PC and the nvidia card is not used (for console or anything else).

If you don`t have enough slots, try dumping the bios on a different machine

 

 

Link to comment

Cant get this to work anymore. Using a dumped bios from another GPU with the same bios flashed onto it gives nothing but a black screen when booting the VM.

Can't dump the bios anymore as well, this worked on an older version of unraid but not the latest RC3:

 

root@UNVR:/sys/bus/pci/devices/0000:02:00.0# cat rom > /boot/vbiosdump.rom
cat: rom: Input/output error

 

Anyone who manages to extract a bios on RC3?

Link to comment

Suddenly got it to work again after half a dozen hours of losing my mind.

Here some steps I did that might help others in the future:

 

What didn't seem to make a difference:

-I went back to 6.1.9 stable but I don't think that made a difference (the only problem was obtaining the bios)

-I tried several different cards from the same model & brand, as well as different slots, didn't seem to make a difference

-I looked into whether there would have been some permissions problem, did not seem to be a problem

-My hardware checked out fine as well, array didn't have issues as well

-Tried rebooting, using fresh array, using clean unraid installs, new VMs etc

-Tried extracting bios with GPU Z (gives a significantly larger bios and does not work for this purpose) and the actual bios i modded with maxwell bios tweaker and flashed onto the cards.

 

In the end I kept horsing around with the above without obtaining a bios, still not sure what exactly did it but the following were my last steps until I got lucky:

-Updated the NVidia drivers on the w10 install on the VM that will use the GPU on the first slot, using a slot that is not the first

-Starting and shutting down the VM without rebooting (so that "Kernel driver in use: vfio-pci" shows up when you do "lspci -v", followed by unbinding the GPU as described above)

 

Those last steps in combination seemed to do the trick, not sure if that actually made a difference but I'm up and running again at last and never losing my rom backup again!

Link to comment

-Starting and shutting down the VM without rebooting (so that "Kernel driver in use: vfio-pci" shows up when you do "lspci -v", followed by unbinding the GPU as described above)

 

 

That last bit is what did it! Starting a VM with that card attached then stopping said VM made it so the input/output error no longer happened! THANK YOU SO MUCH OH MY GOD

 

Glad I could help  :) I think I got my first grey hair spot trying to figure out a solution.

Link to comment

@bonkers

 

I feel your pain - took me 5 days of trying without a second card, before I finally gave up and ordered another card - just to try..

 

Cant get this to work anymore. Using a dumped bios from another GPU with the same bios flashed onto it gives nothing but a black screen when booting the VM.

Can't dump the bios anymore as well, this worked on an older version of unraid but not the latest RC3:

 

root@UNVR:/sys/bus/pci/devices/0000:02:00.0# cat rom > /boot/vbiosdump.rom
cat: rom: Input/output error

 

Anyone who manages to extract a bios on RC3?

 

Two things to try for extracting:

-blacklist all drivers (nvidia, nouveau etc.)

-disable framebuffer for all cards - so they for sure don`t get initialized (grub add "video=efifb:off")

Link to comment

@bonkers

 

I feel your pain - took me 5 days of trying without a second card, before I finally gave up and ordered another card - just to try..

 

Cant get this to work anymore. Using a dumped bios from another GPU with the same bios flashed onto it gives nothing but a black screen when booting the VM.

Can't dump the bios anymore as well, this worked on an older version of unraid but not the latest RC3:

 

root@UNVR:/sys/bus/pci/devices/0000:02:00.0# cat rom > /boot/vbiosdump.rom
cat: rom: Input/output error

 

Anyone who manages to extract a bios on RC3?

 

Two things to try for extracting:

-blacklist all drivers (nvidia, nouveau etc.)

-disable framebuffer for all cards - so they for sure don`t get initialized (grub add "video=efifb:off")

 

We figured it out if you still haven't gotten it. You gotta run a VM with the card attached to it first so it like loads the card's rom and stuff (see the posts immediately above yours)

Link to comment
  • 1 month later...

Help please!

 

I've dumped my bios to /mnt/isos/vbios.dump, but I can't work out where to add it to my xml:

 

<domain type='kvm'>
  <name>Windows 10 - Nvidia</name>
  <uuid>072617e6-bd86-aa40-2274-cb6a2d0e2a2c</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='10'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <vcpupin vcpu='4' cpuset='12'/>
    <vcpupin vcpu='5' cpuset='13'/>
    <vcpupin vcpu='6' cpuset='22'/>
    <vcpupin vcpu='7' cpuset='23'/>
    <vcpupin vcpu='8' cpuset='24'/>
    <vcpupin vcpu='9' cpuset='25'/>
    <vcpupin vcpu='10' cpuset='26'/>
    <vcpupin vcpu='11' cpuset='27'/>
    <emulatorpin cpuset='0,14'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/072617e6-bd86-aa40-2274-cb6a2d0e2a2c_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10 - Nvidia/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/isos/Operating Systems/Windows10.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/isos/virtio-win-0.1.118-2.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='nec-xhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </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:ce:97:84'/>
      <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='connect'/>
      <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='0x06' 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='0x06' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x0745'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Thanks in advance

Link to comment

Help please!

 

I've dumped my bios to /mnt/isos/vbios.dump, but I can't work out where to add it to my xml:

 

<domain type='kvm'>
  <name>Windows 10 - Nvidia</name>
  <uuid>072617e6-bd86-aa40-2274-cb6a2d0e2a2c</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='10'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <vcpupin vcpu='4' cpuset='12'/>
    <vcpupin vcpu='5' cpuset='13'/>
    <vcpupin vcpu='6' cpuset='22'/>
    <vcpupin vcpu='7' cpuset='23'/>
    <vcpupin vcpu='8' cpuset='24'/>
    <vcpupin vcpu='9' cpuset='25'/>
    <vcpupin vcpu='10' cpuset='26'/>
    <vcpupin vcpu='11' cpuset='27'/>
    <emulatorpin cpuset='0,14'/>
  </cputune>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/072617e6-bd86-aa40-2274-cb6a2d0e2a2c_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10 - Nvidia/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/isos/Operating Systems/Windows10.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/isos/virtio-win-0.1.118-2.iso'/>
      <target dev='hdb' bus='ide'/>
      <readonly/>
      <address type='drive' controller='0' bus='0' target='0' unit='1'/>
    </disk>
    <controller type='usb' index='0' model='nec-xhci'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </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:ce:97:84'/>
      <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='connect'/>
      <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='0x06' 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='0x06' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x0745'/>
      </source>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

Thanks in advance

 

http://lime-technology.com/wiki/index.php/UnRAID_6/VM_Management#Edit_XML_for_VM_to_supply_GPU_ROM_manually

Link to comment

Thanks bungee91 - I'm still learning.  I have 2 sections with 'subsystem' - I'm assuming one's the videocard and one's the audiocard so I should add the rom location to both? i.e.

 

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
     <rom file='/mnt/isos/vbios.dump'/>
      <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='0x06' slot='0x00' function='0x1'/>
      </source>
     <rom file='/mnt/isos/vbios.dump'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

Link to comment

Thanks bungee91 - I'm still learning.  I have 2 sections with 'subsystem' - I'm assuming one's the videocard and one's the audiocard so I should add the rom location to both? i.e.

 

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
     <rom file='/mnt/isos/vbios.dump'/>
      <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='0x06' slot='0x00' function='0x1'/>
      </source>
     <rom file='/mnt/isos/vbios.dump'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

 

You only need the GPU rom for the GPU, not the audio chip.

Only add it to the (typically) XX.00.00 entry, in your case 06:00:00.

Link to comment

Thanks bungee91 - I'm still learning.  I have 2 sections with 'subsystem' - I'm assuming one's the videocard and one's the audiocard so I should add the rom location to both? i.e.

 

<hostdev mode='subsystem' type='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x06' slot='0x00' function='0x0'/>
      </source>
     <rom file='/mnt/isos/vbios.dump'/>
      <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='0x06' slot='0x00' function='0x1'/>
      </source>
     <rom file='/mnt/isos/vbios.dump'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>

 

You only need the GPU rom for the GPU, not the audio chip.

Only add it to the (typically) XX.00.00 entry, in your case 06:00:00.

 

lol just worked out that bus='0x06' slot='0x00' function='0x0' is 06:00:00 and bus='0x06' slot='0x00' function='0x1' - is 06:00:01

 

Got it!

Link to comment

ok, I managed to passthrough my nvidia card in the first slot but I get weird 'ghosting' coming on and off on my screen 1 (of 2).  see attached pic.

 

I had this problem when I passed through a VM with my ATI card in the first slot as well.  Any ideas how to fix?

 

Update:

 

1 - Added VM XML

2 - it seems to have settled down and stopped after a few mins - weird.  The 'ghost' looked like the unRAID dashboard trying to peep through.

 

<domain type='kvm' id='1'>
  <name>Windows 10 - Nvidia</name>
  <uuid>072617e6-bd86-aa40-2274-cb6a2d0e2a2c</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='10'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <vcpupin vcpu='4' cpuset='12'/>
    <vcpupin vcpu='5' cpuset='13'/>
    <vcpupin vcpu='6' cpuset='22'/>
    <vcpupin vcpu='7' cpuset='23'/>
    <vcpupin vcpu='8' cpuset='24'/>
    <vcpupin vcpu='9' cpuset='25'/>
    <vcpupin vcpu='10' cpuset='26'/>
    <vcpupin vcpu='11' cpuset='27'/>
    <emulatorpin cpuset='0,14'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/072617e6-bd86-aa40-2274-cb6a2d0e2a2c_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10 - Nvidia/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/isos/Operating Systems/Windows10.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/isos/virtio-win-0.1.118-2.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' model='nec-xhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <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:ce:97:84'/>
      <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/2'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-Windows 10 - Nvidia/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='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/boot/vbios.rom'/>
      <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='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x0745'/>
        <address bus='3' device='5'/>
      </source>
      <alias name='hostdev2'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

ghost.jpg.59c06b7ea675cc60a3f34fd5362bf7cb.jpg

Link to comment

ok, I managed to passthrough my nvidia card in the first slot but I get weird 'ghosting' coming on and off on my screen 1 (of 2).  see attached pic.

 

I had this problem when I passed through a VM with my ATI card in the first slot as well.  Any ideas how to fix?

 

Update:

 

1 - Added VM XML

2 - it seems to have settled down and stopped after a few mins - weird.  The 'ghost' looked like the unRAID dashboard trying to peep through.

 

<domain type='kvm' id='1'>
  <name>Windows 10 - Nvidia</name>
  <uuid>072617e6-bd86-aa40-2274-cb6a2d0e2a2c</uuid>
  <metadata>
    <vmtemplate xmlns="unraid" name="Windows 10" icon="windows.png" os="windows10"/>
  </metadata>
  <memory unit='KiB'>8388608</memory>
  <currentMemory unit='KiB'>8388608</currentMemory>
  <memoryBacking>
    <nosharepages/>
    <locked/>
  </memoryBacking>
  <vcpu placement='static'>12</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='8'/>
    <vcpupin vcpu='1' cpuset='9'/>
    <vcpupin vcpu='2' cpuset='10'/>
    <vcpupin vcpu='3' cpuset='11'/>
    <vcpupin vcpu='4' cpuset='12'/>
    <vcpupin vcpu='5' cpuset='13'/>
    <vcpupin vcpu='6' cpuset='22'/>
    <vcpupin vcpu='7' cpuset='23'/>
    <vcpupin vcpu='8' cpuset='24'/>
    <vcpupin vcpu='9' cpuset='25'/>
    <vcpupin vcpu='10' cpuset='26'/>
    <vcpupin vcpu='11' cpuset='27'/>
    <emulatorpin cpuset='0,14'/>
  </cputune>
  <resource>
    <partition>/machine</partition>
  </resource>
  <os>
    <type arch='x86_64' machine='pc-i440fx-2.5'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/qemu/ovmf-x64/OVMF_CODE-pure-efi.fd</loader>
    <nvram>/etc/libvirt/qemu/nvram/072617e6-bd86-aa40-2274-cb6a2d0e2a2c_VARS-pure-efi.fd</nvram>
  </os>
  <features>
    <acpi/>
    <apic/>
    <hyperv>
      <relaxed state='on'/>
      <vapic state='on'/>
      <spinlocks state='on' retries='8191'/>
      <vendor id='none'/>
    </hyperv>
  </features>
  <cpu mode='host-passthrough'>
    <topology sockets='1' cores='6' threads='2'/>
  </cpu>
  <clock offset='localtime'>
    <timer name='hypervclock' present='yes'/>
    <timer name='hpet' present='no'/>
  </clock>
  <on_poweroff>destroy</on_poweroff>
  <on_reboot>restart</on_reboot>
  <on_crash>restart</on_crash>
  <devices>
    <emulator>/usr/local/sbin/qemu</emulator>
    <disk type='file' device='disk'>
      <driver name='qemu' type='raw' cache='writeback'/>
      <source file='/mnt/user/domains/Windows 10 - Nvidia/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/isos/Operating Systems/Windows10.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/isos/virtio-win-0.1.118-2.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' model='nec-xhci'>
      <alias name='usb'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0'/>
    </controller>
    <controller type='pci' index='0' model='pci-root'>
      <alias name='pci.0'/>
    </controller>
    <controller type='ide' index='0'>
      <alias name='ide'/>
      <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:ce:97:84'/>
      <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/2'/>
      <target port='0'/>
      <alias name='serial0'/>
    </serial>
    <console type='pty' tty='/dev/pts/2'>
      <source path='/dev/pts/2'/>
      <target type='serial' port='0'/>
      <alias name='serial0'/>
    </console>
    <channel type='unix'>
      <source mode='bind' path='/var/lib/libvirt/qemu/channel/target/domain-Windows 10 - Nvidia/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='pci' managed='yes'>
      <driver name='vfio'/>
      <source>
        <address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
      </source>
      <alias name='hostdev0'/>
      <rom file='/boot/vbios.rom'/>
      <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='0x01' slot='0x00' function='0x1'/>
      </source>
      <alias name='hostdev1'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <hostdev mode='subsystem' type='usb' managed='no'>
      <source>
        <vendor id='0x045e'/>
        <product id='0x0745'/>
        <address bus='3' device='5'/>
      </source>
      <alias name='hostdev2'/>
    </hostdev>
    <memballoon model='virtio'>
      <alias name='balloon0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

In my experience, if you stub the GPU, you wont get the ghosting and will have better results.

Link to comment

In my experience, if you stub the GPU, you wont get the ghosting and will have better results.

 

Thank you so much!  I followed the 6.2 instructions on how to stub (never come across this before) and it let me passthrough my ATI R5 230 in the first slot as I originally wanted to do (before it kept crashing/ghosting), without having to make any changes other than stubbing.  I just fired up 2 VMs (ATI and NVidia) at the same for the kids for the first time and it worked perfectly.

 

Best of all - my CPU usage was only 10%!  Loving my new unRAID setup.

Link to comment

ok, I managed to passthrough my nvidia card in the first slot but I get weird 'ghosting' coming on and off on my screen 1 (of 2).  see attached pic.

 

I had ghosting too when booting unraid in "OS GUI Mode" before stealing the gpu for a VM. I solved it by booting to the old console mode.

 

Thanks i'll try that today.  Are there any disadvantages performance or technical with stubbing that would make. Non-stubbing preferable?

 

Update: My passmark scores seem to have dropped - will do a few more runs to compare

Link to comment
  • 4 months later...

Just wanted to say that I also made this work using @fcaico instructions.

 

I wish that there was a GUI option in the web interface to pick a ROM file for the GPU. If that happened, and there was a more userfriendly way to dump the BIOS then this could become a fully supported feature down the line. What is the proper way to send this as a feature request?

Link to comment

Just wanted to say that I also made this work using @fcaico instructions.

 

I wish that there was a GUI option in the web interface to pick a ROM file for the GPU. If that happened, and there was a more userfriendly way to dump the BIOS then this could become a fully supported feature down the line. What is the proper way to send this as a feature request?

 

you can do that here http://lime-technology.com/forum/index.php?board=63.0

Link to comment
  • 2 weeks later...

Hi-

 

I'm new to the forums, so I apologize if I have left out needed information.  I followed this guid, however when I got to add the line to my XML, i get:

 

<rom file='/mnt/user/isos/evgagtx970sc.dump'/>

 

I get:

 

internal error: unknown pci source type 'rom'

 

Any idea what I'm doing wrong?  Any help is much appreciated.

 

Thanks,

 

Justin

 

Link to comment

Hi-

 

I'm new to the forums, so I apologize if I have left out needed information.  I followed this guid, however when I got to add the line to my XML, i get:

 

<rom file='/mnt/user/isos/evgagtx970sc.dump'/>

 

I get:

 

internal error: unknown pci source type 'rom'

 

Any idea what I'm doing wrong?  Any help is much appreciated.

 

Thanks,

 

Justin

 

If you post your complete XML and not just what you added, we might be able to help.

Link to comment
  • 7 months later...

Hi there

 

I'm trying to configure single GPU (AMD Vega) with Ryzen and Gigabyte motherboard. 

 

My goal is to get the config like presented in Linus video gaming rig with NAS functionality but can't get it to work probably due to having just one card in the system. I'm trying to avoid installing the second card as it seems to be possible to avoid it but I'm confused and still can't get it right.  

 

I've watched both videos on how to pass GPU including single one  (https://www.youtube.com/watch?v=1IP-h9IKof0) and still can't get the idea if the presented solution is the right one I am looking for as Spaceinvader seems to use remote access only. The first video (https://www.youtube.com/watch?v=mM7ntkiUoPk) confused me even further as his first steps (or 2nd actually) shows that (unlike me) he is able to use already Nvidia GPU as a dedicated graphics card without any problem before starting the whole procedure, so what's really the point in this?

 

When I start unRaid with one graphics card it displays boot sequence and then Linux terminal so any attempt to start Windows referring hardware GPU fails with frozen CPUs and black screen or no effect on hardware output (Linux session remains visible and active). 

 

When I've tried to modify the XML files and load ROM downloaded from Internet 256KB it seems that VM becomes frozen - max up a few CPUs, black screen from card output (Linux session has gone) and no response to remote desktop requests.

 

When I try to use rom file dumped by myself the way Spaceinvader described in the first video (in this case the size generated is only 64KB) I can only access through remote desktop - still black screen from graphics card output and the Device Manager says that this is some Microsoft Simplified driver instead of AMD Vega 56 (like in your case the Nvidia is recognised straight from the beginning). So I'm not sure if I should try to load AMD drivers through the remote desktop or if I am doing this all wrong?

 

I would be thankful for any clarification and advice.

 

P.S.

On top of this, remote desktop connection stopped to work - access refused - so right now the only remaining option left is VNC only.

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.