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.

Failed to start VM with GPU added

Featured Replies

Hi

 

I'm pretty new with unraid, and i recently setup my Fujitsu RX300 S6 with unraid.

I just added an Nvidia GT730 gpu, as i needed a small bit of gpu power in one of my VM's.

 

I powered down my Win10 VM, chose the GPU from the drop down, saved and tried to start the VM again.

But i get the following error:

 

internal error: early end of file from monitor, possible problem: 
2017-02-13T18:47:55.090296Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to set iommu for container: Operation not permitted
2017-02-13T18:47:55.090349Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to setup container for group 30
2017-02-13T18:47:55.090361Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x5: vfio: failed to get group 30
2017-02-13T18:47:55.090379Z qemu-system-x86_64: -device vfio-pci,host=02:00.0,id=hostdev0,bus=pci.0,addr=0x5: Device initialization failed

 

My XML for the VM:

<domain type='kvm'>
  <name>Windows 10</name>
  <uuid>d5107eec-6391-33a8-4069-3c8d8580b402</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'>4</vcpu>
  <cputune>
    <vcpupin vcpu='0' cpuset='4'/>
    <vcpupin vcpu='1' cpuset='5'/>
    <vcpupin vcpu='2' cpuset='6'/>
    <vcpupin vcpu='3' cpuset='7'/>
  </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/d5107eec-6391-33a8-4069-3c8d8580b402_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='4' threads='1'/>
  </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/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/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='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x7'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x0' multifunction='on'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' function='0x1'/>
    </controller>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x07' 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:b4:46:48'/>
      <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='0x02' 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='0x02' slot='0x00' function='0x1'/>
      </source>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x06' function='0x0'/>
    </hostdev>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x08' function='0x0'/>
    </memballoon>
  </devices>
</domain>

 

Any help would be greatly appreciated

post your iommu groups (specifically group 30)

 

Assuming your view card is 2:00.0 and audio is 2.00.1 based on the xml.... First guess is that the video card and audio components aren't alone in the iommu group.

  • Author

Hoping this is what you where asking for:

/sys/kernel/iommu_groups/30/devices/0000:02:00.0
/sys/kernel/iommu_groups/30/devices/0000:02:00.1

 

Full list:

find /sys/kernel/iommu_groups/ -type l
/sys/kernel/iommu_groups/0/devices/0000:ff:00.0
/sys/kernel/iommu_groups/0/devices/0000:ff:00.1
/sys/kernel/iommu_groups/1/devices/0000:ff:02.0
/sys/kernel/iommu_groups/1/devices/0000:ff:02.1
/sys/kernel/iommu_groups/1/devices/0000:ff:02.4
/sys/kernel/iommu_groups/1/devices/0000:ff:02.5
/sys/kernel/iommu_groups/2/devices/0000:ff:03.0
/sys/kernel/iommu_groups/2/devices/0000:ff:03.1
/sys/kernel/iommu_groups/2/devices/0000:ff:03.2
/sys/kernel/iommu_groups/2/devices/0000:ff:03.4
/sys/kernel/iommu_groups/3/devices/0000:ff:04.0
/sys/kernel/iommu_groups/3/devices/0000:ff:04.1
/sys/kernel/iommu_groups/3/devices/0000:ff:04.2
/sys/kernel/iommu_groups/3/devices/0000:ff:04.3
/sys/kernel/iommu_groups/4/devices/0000:ff:05.0
/sys/kernel/iommu_groups/4/devices/0000:ff:05.1
/sys/kernel/iommu_groups/4/devices/0000:ff:05.2
/sys/kernel/iommu_groups/4/devices/0000:ff:05.3
/sys/kernel/iommu_groups/5/devices/0000:ff:06.0
/sys/kernel/iommu_groups/5/devices/0000:ff:06.1
/sys/kernel/iommu_groups/5/devices/0000:ff:06.2
/sys/kernel/iommu_groups/5/devices/0000:ff:06.3
/sys/kernel/iommu_groups/6/devices/0000:fe:00.0
/sys/kernel/iommu_groups/6/devices/0000:fe:00.1
/sys/kernel/iommu_groups/7/devices/0000:fe:02.0
/sys/kernel/iommu_groups/7/devices/0000:fe:02.1
/sys/kernel/iommu_groups/7/devices/0000:fe:02.4
/sys/kernel/iommu_groups/7/devices/0000:fe:02.5
/sys/kernel/iommu_groups/8/devices/0000:fe:03.0
/sys/kernel/iommu_groups/8/devices/0000:fe:03.1
/sys/kernel/iommu_groups/8/devices/0000:fe:03.2
/sys/kernel/iommu_groups/8/devices/0000:fe:03.4
/sys/kernel/iommu_groups/9/devices/0000:fe:04.0
/sys/kernel/iommu_groups/9/devices/0000:fe:04.1
/sys/kernel/iommu_groups/9/devices/0000:fe:04.2
/sys/kernel/iommu_groups/9/devices/0000:fe:04.3
/sys/kernel/iommu_groups/10/devices/0000:fe:05.0
/sys/kernel/iommu_groups/10/devices/0000:fe:05.1
/sys/kernel/iommu_groups/10/devices/0000:fe:05.2
/sys/kernel/iommu_groups/10/devices/0000:fe:05.3
/sys/kernel/iommu_groups/11/devices/0000:fe:06.0
/sys/kernel/iommu_groups/11/devices/0000:fe:06.1
/sys/kernel/iommu_groups/11/devices/0000:fe:06.2
/sys/kernel/iommu_groups/11/devices/0000:fe:06.3
/sys/kernel/iommu_groups/12/devices/0000:00:00.0
/sys/kernel/iommu_groups/13/devices/0000:00:01.0
/sys/kernel/iommu_groups/14/devices/0000:00:03.0
/sys/kernel/iommu_groups/15/devices/0000:00:05.0
/sys/kernel/iommu_groups/16/devices/0000:00:07.0
/sys/kernel/iommu_groups/17/devices/0000:00:08.0
/sys/kernel/iommu_groups/18/devices/0000:00:09.0
/sys/kernel/iommu_groups/19/devices/0000:00:0a.0
/sys/kernel/iommu_groups/20/devices/0000:00:10.0
/sys/kernel/iommu_groups/20/devices/0000:00:10.1
/sys/kernel/iommu_groups/21/devices/0000:00:11.0
/sys/kernel/iommu_groups/21/devices/0000:00:11.1
/sys/kernel/iommu_groups/22/devices/0000:00:14.0
/sys/kernel/iommu_groups/22/devices/0000:00:14.1
/sys/kernel/iommu_groups/22/devices/0000:00:14.2
/sys/kernel/iommu_groups/22/devices/0000:00:14.3
/sys/kernel/iommu_groups/23/devices/0000:00:15.0
/sys/kernel/iommu_groups/24/devices/0000:00:1a.0
/sys/kernel/iommu_groups/24/devices/0000:00:1a.1
/sys/kernel/iommu_groups/24/devices/0000:00:1a.2
/sys/kernel/iommu_groups/24/devices/0000:00:1a.7
/sys/kernel/iommu_groups/25/devices/0000:00:1c.0
/sys/kernel/iommu_groups/25/devices/0000:08:00.0
/sys/kernel/iommu_groups/25/devices/0000:08:00.1
/sys/kernel/iommu_groups/26/devices/0000:00:1d.0
/sys/kernel/iommu_groups/26/devices/0000:00:1d.1
/sys/kernel/iommu_groups/26/devices/0000:00:1d.2
/sys/kernel/iommu_groups/26/devices/0000:00:1d.7
/sys/kernel/iommu_groups/27/devices/0000:00:1e.0
/sys/kernel/iommu_groups/28/devices/0000:00:1f.0
/sys/kernel/iommu_groups/28/devices/0000:00:1f.2
/sys/kernel/iommu_groups/28/devices/0000:00:1f.3
/sys/kernel/iommu_groups/28/devices/0000:00:1f.5
/sys/kernel/iommu_groups/29/devices/0000:01:00.0
/sys/kernel/iommu_groups/30/devices/0000:02:00.0
/sys/kernel/iommu_groups/30/devices/0000:02:00.1
/sys/kernel/iommu_groups/31/devices/0000:05:00.0
/sys/kernel/iommu_groups/32/devices/0000:05:00.1
/sys/kernel/iommu_groups/33/devices/0000:06:00.0
/sys/kernel/iommu_groups/34/devices/0000:06:00.1

 

Also yes, you are correct about videocard and audio.

 

post your iommu groups (specifically group 30)

 

Assuming your view card is 2:00.0 and audio is 2.00.1 based on the xml.... First guess is that the video card and audio components aren't alone in the iommu group.

may need to try allowing unsafe interrupts. I had the same issue with all my servers- not allowing gpu passthrough until his was changed.

 

to try, add "vfio_iommu_type1.allow_unsafe_interrupts=1" to syslinux.cfg. It will then look like the following

 

label unRAID OS
  menu default
  kernel /bzimage
  append vfio_iommu_type1.allow_unsafe_interrupts=1 initrd=/bzroot

 

this can be done easily by clicking main tab, then scroll down to and click Flash (under boot device.) scroll down to Syslinux Configuration, make changes, click apply, then reboot server.

  • Author

This worked like a charm!

Thank you very much! and if you got time, i would love to get an explanation on what this just did?

 

may need to try allowing unsafe interrupts. I had the same issue with all my servers- not allowing gpu passthrough until his was changed.

 

to try, add "vfio_iommu_type1.allow_unsafe_interrupts=1" to syslinux.cfg. It will then look like the following

 

label unRAID OS
  menu default
  kernel /bzimage
  append vfio_iommu_type1.allow_unsafe_interrupts=1 initrd=/bzroot

 

this can be done easily by clicking main tab, then scroll down to and click Flash (under boot device.) scroll down to Syslinux Configuration, make changes, click apply, then reboot server.

MAGIC.

some hardware doesn't support remapping of interrupts. You basically told it to allow what it considered "unsafe" interrupt assignments.

 

 

  • Author

Definitely magic ;)

 

But that makes sense, thanks again.

 

Now im just getting Error code 43 in the device manager unfortunately :/

search the forums for that, it's been addressed a few times. I'd tell you the answer but I honestly don't know it off the top of my head.

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.