Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Cannot run two gpu passthrough at the same time

Featured Replies

my first machine xml

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  <name>windows81nvidia</name>

  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa8b</uuid>

  <memory unit='KiB'>3145728</memory>

  <currentMemory unit='KiB'>3072000</currentMemory>

  <vcpu placement='static'>2</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='0'/>

    <vcpupin vcpu='1' cpuset='1'/>

  </cputune>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>

    <loader type='rom'>/usr/share/qemu/bios-256k.bin</loader>

    <boot dev='hd'/>

    <bootmenu enable='yes'/>

  </os>

  <features>

    <acpi/>

    <apic/>

    <pae/>

    <kvm>

      <hidden state='on'/>

    </kvm>

  </features>

  <cpu mode='host-passthrough'>

  </cpu>

  <clock offset='localtime'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='yes'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>destroy</on_crash>

  <pm>

    <suspend-to-mem enabled='no'/>

    <suspend-to-disk enabled='no'/>

  </pm>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='qcow2' cache='none' io='native'/>

      <source file='/mnt/disk1/win81/win81.qcow2'/>

      <target dev='hda' bus='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>

    </disk>

    <disk type='file' device='disk'>

      <driver name='qemu' type='qcow2'/>

      <source file='/mnt/disk1/win81/stor1.qcow2'/>

      <target dev='hdb' bus='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>

    </disk>

    <disk type='file' device='cdrom'>

      <driver name='qemu' type='raw'/>

      <source file='/mnt/disk1/iso/Windows81.iso'/>

      <target dev='hdc' bus='sata'/>

      <readonly/>

      <address type='drive' controller='0' bus='0' target='0' unit='0'/>

    </disk>

    <controller type='pci' index='0' model='pcie-root'/>

    <controller type='pci' index='1' model='dmi-to-pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>

    </controller>

    <controller type='pci' index='2' model='pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>

    </controller>

    <controller type='sata' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>

    </controller>

    <controller type='virtio-serial' index='0'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>

    </controller>

    <controller type='usb' index='0' model='ich9-ehci1'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci1'>

      <master startport='0'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci2'>

      <master startport='2'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci3'>

      <master startport='4'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:46:29:be'/>

      <source bridge='br0'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>

    </interface>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source>

        <vendor id='0x1038'/>

        <product id='0x1300'/>

      </source>

    </hostdev>

    <hostdev mode='subsystem' type='usb' managed='no'>

      <source>

        <vendor id='0x04b4'/>

        <product id='0x0101'/>

      </source>

    </hostdev>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>

    </memballoon>

  </devices>

  <qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,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=01:00.1,bus=pcie.0'/>

  </qemu:commandline>

</domain>

 

  • Author

second machine xml :

 

<domain type='kvm' xmlns:qemu='http://libvirt.org/schemas/domain/qemu/1.0'>

  <name>windows81nvidia3</name>

  <uuid>cc411d70-4463-4db7-bf36-d364c0cdaa8d</uuid>

  <memory unit='KiB'>3145728</memory>

  <currentMemory unit='KiB'>2560000</currentMemory>

  <vcpu placement='static'>2</vcpu>

  <cputune>

    <vcpupin vcpu='0' cpuset='2'/>

    <vcpupin vcpu='1' cpuset='3'/>

  </cputune>

  <resource>

    <partition>/machine</partition>

  </resource>

  <os>

    <type arch='x86_64' machine='pc-q35-2.1'>hvm</type>

    <loader type='rom'>/usr/share/qemu/bios-256k.bin</loader>

    <boot dev='hd'/>

    <bootmenu enable='yes'/>

  </os>

  <features>

    <acpi/>

    <apic/>

    <pae/>

    <kvm>

      <hidden state='on'/>

    </kvm>

  </features>

  <cpu mode='host-passthrough'>

  </cpu>

  <clock offset='localtime'>

    <timer name='rtc' tickpolicy='catchup'/>

    <timer name='pit' tickpolicy='delay'/>

    <timer name='hpet' present='yes'/>

  </clock>

  <on_poweroff>destroy</on_poweroff>

  <on_reboot>restart</on_reboot>

  <on_crash>destroy</on_crash>

  <pm>

    <suspend-to-mem enabled='no'/>

    <suspend-to-disk enabled='no'/>

  </pm>

  <devices>

    <emulator>/usr/bin/qemu-system-x86_64</emulator>

    <disk type='file' device='disk'>

      <driver name='qemu' type='qcow2' cache='none' io='native'/>

      <source file='/mnt/disk1/win83/win813.qcow2'/>

      <target dev='hda' bus='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x04' function='0x0'/>

    </disk>

    <disk type='file' device='disk'>

      <driver name='qemu' type='qcow2'/>

      <source file='/mnt/disk1/win83/stor2.qcow2'/>

      <target dev='hdb' bus='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x06' function='0x0'/>

    </disk>

    <controller type='pci' index='0' model='pcie-root'/>

    <controller type='pci' index='1' model='dmi-to-pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1e' function='0x0'/>

    </controller>

    <controller type='pci' index='2' model='pci-bridge'>

      <address type='pci' domain='0x0000' bus='0x01' slot='0x01' function='0x0'/>

    </controller>

    <controller type='sata' index='0'>

      <address type='pci' domain='0x0000' bus='0x00' slot='0x1f' function='0x2'/>

    </controller>

    <controller type='virtio-serial' index='0'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x02' function='0x0'/>

    </controller>

    <controller type='usb' index='0' model='ich9-ehci1'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x7'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci1'>

      <master startport='0'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x0' multifunction='on'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci2'>

      <master startport='2'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x1'/>

    </controller>

    <controller type='usb' index='0' model='ich9-uhci3'>

      <master startport='4'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x03' function='0x2'/>

    </controller>

    <interface type='bridge'>

      <mac address='52:54:00:54:20:02'/>

      <source bridge='br0'/>

      <model type='virtio'/>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x01' function='0x0'/>

    </interface>

    <memballoon model='virtio'>

      <address type='pci' domain='0x0000' bus='0x02' slot='0x05' function='0x0'/>

    </memballoon>

  </devices>

  <qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=02:00.1,bus=pcie.0'/>

  </qemu:commandline>

</domain>

 

  • Author

Forgive me as im not familiar how to make the code fits into the box.

I have problem with running two virtual machines at the same time. Works separately though.

I must admit that I have not analysed the XML, but your title suggest that you are trying to pass the same resource through to two different VM's simultaneously?   

 

This will not be possible as once a resource has been passed through to a VM and that VM started the resource is no longer available for use by another VM until the first VM has released the resource.

 

I have also seen issues around GPU pass-thru where closing a VM does not always seem to release the resource cleanly.  In this case even closing the first VM does not allow the second one to be started until the unRAID system has been rebooted.

 

Not sure which (if any) of the above scenarios apply to what you are attempting to do.

  • Author

Just to clarify i have 2 x gtx750ti and would like to passthrough each to two virtual machines.

The below will reflect the important section of the respective xmls:

 

1st vm :

<qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,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=01:00.1,bus=pcie.0'/>

  </qemu:commandline>

and

 

2nd vm :

<qemu:commandline>

    <qemu:arg value='-device'/>

    <qemu:arg value='ioh3420,bus=pcie.0,addr=1c.0,multifunction=on,port=1,chassis=1,id=root.1'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=02:00.0,bus=root.1,addr=00.0,multifunction=on,x-vga=on'/>

    <qemu:arg value='-device'/>

    <qemu:arg value='vfio-pci,host=02:00.1,bus=pcie.0'/>

  </qemu:commandline>

 

Please post a copy of your syslinux config. You can get to this under the flash device settings page.

  • Author

not sure where is that under the webpage. Found this under /boot/syslinux

default /syslinux/menu.c32

menu title Lime Technology

prompt 0

timeout 50

label unRAID OS

  menu default

  kernel /bzimage

  append initrd=/bzroot

label unRAID OS Safe Mode (no plugins)

  kernel /bzimage

  append initrd=/bzroot unraidsafemode

label Memtest86+

  kernel /memtest

label Xen/unRAID OS

  kernel /syslinux/mboot.c32

  append /xen --- /bzimage --- /bzroot

label Xen/unRAID OS Safe Mode (no plugins)

  kernel /syslinux/mboot.c32

  append /xen --- /bzimage --- /bzroot unraidsafemode

not sure where is that under the webpage. Found this under /boot/syslinux

default /syslinux/menu.c32

menu title Lime Technology

prompt 0

timeout 50

label unRAID OS

  menu default

  kernel /bzimage

  append initrd=/bzroot

label unRAID OS Safe Mode (no plugins)

  kernel /bzimage

  append initrd=/bzroot unraidsafemode

label Memtest86+

  kernel /memtest

label Xen/unRAID OS

  kernel /syslinux/mboot.c32

  append /xen --- /bzimage --- /bzroot

label Xen/unRAID OS Safe Mode (no plugins)

  kernel /syslinux/mboot.c32

  append /xen --- /bzimage --- /bzroot unraidsafemode

 

On the main tab, click the word "flash" under the boot device section.  Then there is a section for syslinux configuration where you can edit the file you just posted. change the first label section to this:

 

label unRAID OS

  menu default

  kernel /bzimage

  append pcie_acs_override=downstream initrd=/bzroot

 

This will fix your problem.

 

not sure where is that under the webpage. Found this under /boot/syslinux

default /syslinux/menu.c32

menu title Lime Technology

prompt 0

timeout 50

label unRAID OS

  menu default

  kernel /bzimage

  append initrd=/bzroot

label unRAID OS Safe Mode (no plugins)

  kernel /bzimage

  append initrd=/bzroot unraidsafemode

label Memtest86+

  kernel /memtest

label Xen/unRAID OS

  kernel /syslinux/mboot.c32

  append /xen --- /bzimage --- /bzroot

label Xen/unRAID OS Safe Mode (no plugins)

  kernel /syslinux/mboot.c32

  append /xen --- /bzimage --- /bzroot unraidsafemode

 

On the main tab, click the word "flash" under the boot device section.  Then there is a section for syslinux configuration where you can edit the file you just posted. change the first label section to this:

 

label unRAID OS

  menu default

  kernel /bzimage

  append pcie_acs_override=downstream initrd=/bzroot

 

This will fix your problem.

FYI, you'll need to reboot the host for that change to take affect once saved in the webgui.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.