[Plugin] VFIO-PCI Config


Skitals

Recommended Posts

seems like i have a quite similar problem

I am trying to passthrough an pcie-usb controller. It works in unraid, i can bind it with the vfio plugin, and it finally shows up under other pci cards in the vm template. 
however, when i add it and start the vm, first the vm gets paused, then the vm tab gets unresponsive and finally the whole server goes dead.
gpu passthrough and everything works, i just need the usb controller to work aswell, so i can make use of my audio interface in macos (but the same problem occurs for win vm)

tried reading and trying all sort of things, but either the pci card doesn't show at all as a passthrough card (connected devices are recognized though, so unraid clearly can work with this card) or the pci card is selectable (obviously the devices do not show, when the pci card is bound) but the vms crash.

I also tried spaceinvaders way with the vfio-pci-ids= add in syslinux line, but didn't really work somehow since the connected devices were still available in unraid, so not sure what went wrong there.

any advice or waypoints i should check out?

Link to comment
  • 2 weeks later...
  • 4 weeks later...

I'd like access to a USB device from within a VM. Problem however is that it uses the same Group as the UnRaid USB stick;

 

Group 4 00:14.08086:a36dUSB controller: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller (rev 10)

USB devices attached to this controller:

Bus 001 Device 004: ID 051d:0002 American Power Conversion Uninterruptible Power Supply

Bus 001 Device 003: ID 0781:5567 SanDisk Corp. Cruzer Blade

Bus 001 Device 002: ID 289b:0505 Dracal/Raphnet technologies

Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub

 

USB Device 002 needs to be passed through. Why is this so hard to share with a VM in 2020 ?

Link to comment
10 hours ago, Squid said:

Because that's the way the hardware is designed.

 

If one of the ACS override options don't help you, then you can either permanently attach the device to the VM when you edit it or use the HotPlug USB plugin

Thanks, the Libvrt Hotplug USB App worked for me.

Link to comment
41 minutes ago, chrisp7 said:

Is there a reason I cant find this in either Community applications and Dockerhub? Im using the beta build of UNRAID. I can only see 1 app of Skitals in Community Applications.

You're probably running 6.9 in which case it's already part of the OS

Link to comment

Hello,

 

Trying to bind 4x ports of Intel I350 ethernet card, but when doing it this way with the plugin, it only binds first two ports. All four ports are in their own group, and when I inspect the vfio-pci.cfg file, it shows all four devices enumerated properly. UnRAID version 6.7.2.

 

Edit: Meant to say each ethernet port has its own group; four groups for the card.

 

Thanks!

Edited by ClintE
Link to comment
  • 1 month later...

I used it to passthrough one Ethernet adapter ini 6.8.3 and the plugin works flawlessy (at first I set "PCIe ACS override" to "both" to have as much IOMMU groups as possible).

 

As some users have problem with this plugin, isn't it possible that it auto-deletes / ignores the /config/vfio-pci.cfg on boot if error happens?

Link to comment
  • 2 weeks later...

Hi, my syslog gets spammed and 99% filled within minutes of booting up with millions of lines like this

Jan 18 23:54:53 server kernel: vfio-pci 0000:09:00.0: BAR 3: can't reserve [mem 0xf0000000-0xf1ffffff 64bit pref]
Jan 18 23:54:53 server kernel: vfio-pci 0000:09:00.0: BAR 3: can't reserve [mem 0xf0000000-0xf1ffffff 64bit pref]
Jan 18 23:54:53 server kernel: vfio-pci 0000:09:00.0: BAR 3: can't reserve [mem 0xf0000000-0xf1ffffff 64bit pref]

I am stubbing my graphics card with this plugin on unRAID 6.8.3. The address 09:00.0 is the device "VGA compatible controller: NVIDIA Corporation GP104 [GeForce GTX 1070] (rev a1)".

HVM and IOMMU are enabled. PCIe ACS override is disabled.

 

The graphics card passthrough (with dumped vbios rom) works in a VM, but on fixed 800x600 resolution (Nvidia drivers installed, Windows VM says there's a driver error code 43), but the VM logs say

2021-01-19T21:57:24.002296Z qemu-system-x86_64: -device vfio-pci,host=0000:09:00.0,id=hostdev0,bus=pci.0,addr=0x5,romfile=/mnt/disk5/isos/vbios/EVGA_GeForce_GTX_1070.vbios: Failed to mmap 0000:09:00.0 BAR 3. Performance may be slow

Anybody seen this before? Can't find anything like it on the forum.

 

EDIT: Found some more info. According to 

 booting the server without the HDMI plugged in removed the spamming line. However, after plugging the HDMI back in and booting the VM, the VM logs are repeating lines like

2021-01-19T22:17:27.637837Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region3+0x101afe, 0x0,1) failed: Device or resource busy
2021-01-19T22:17:27.637849Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region3+0x101aff, 0x0,1) failed: Device or resource busy
2021-01-19T22:17:27.648663Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region3+0x4810, 0x1fef8c01,8) failed: Device or resource busy
2021-01-19T22:17:27.648690Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region3+0x4810, 0x1fef8c01,8) failed: Device or resource busy
2021-01-19T22:17:27.648784Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region3+0x102000, 0xabcdabcd,4) failed: Device or resource busy
2021-01-19T22:17:27.648798Z qemu-system-x86_64: vfio_region_write(0000:09:00.0:region3+0x102004, 0xabcdabcd,4) failed: Device or resource busy

Windows device manager still says there are driver errors, and there are console-like artifacts horizontally across the screen, including a blinking cursor, on top of Windows. It seems like the unraid console and the Windows VM (or is it VFIO stubbing?) fight for the GPU. I have yet to try the recommendation in the above linked post to unbind the console at boot with the go script.

Edited by ZooMass
More info about VM
Link to comment
  • 1 month later...

Been getting this error since I started using 6.9 RC1:

 

Quote

The author (or moderators of Community Applications) of the plugin template (https://raw.githubusercontent.com/Skitals/unraid-vfio-pci/master/plugins/vfio.pci.plg) has specified that this plugin is incompatible with your version of unRaid (6.9.1). You should uninstall the plugin here: Minimum OS Version: 6.7.0 Maximum OS Version: 6.9.0-beta1

 

VFIO-PCI CFG has been working fine and is working fine for me in 6.9.1 official release.

 

Thanks,

craigr

Link to comment
  • 1 month later...

unRAID 6.9.2.

 

Can't find the plugin...

image.png.9c3399c22280cc109cbc2601110bebca.png

 

There's this option in unRAID System Devices. is it the same thing?

image.png.484fd3cb724b9e24cd15b278e8f722d4.png

 

This warning is appeariong for me:

Quote

Warning: Your system has booted with the PCIe ACS Override setting enabled. The below list doesn't not reflect the way IOMMU would naturally group devices.
To see natural IOMMU groups for your hardware, go to the VM Manager page and set the 
PCIe ACS override setting to Disabled.

 

Link to comment
  • 2 weeks later...

If I stub my Nvidia Quadro 1000 from UnRaid, can I sill use it in Plex to transcode? After I installed the Nvidia drivers for plex, every time I use IPMI I get a black screen after all the UnRaid boot up grub finishes. I made sure the bios says use the VGA onboard but it never works on IPMI or my KVM. Web interface works fine. Thanks in advance.

Link to comment
17 hours ago, MrxFantatsicx said:

If I stub my Nvidia Quadro 1000 from UnRaid, can I sill use it in Plex to transcode?

 

No, stubbing a device by binding it to vfio-pci means the device is completely hidden from Unraid (and therefore Docker). The only thing you can do with it is pass the device through to a VM. There is no value in installing Nvidia drivers if you stub the device.

 

17 hours ago, MrxFantatsicx said:

After I installed the Nvidia drivers

 

You should read the first post in the thread for Nvidia drivers:

  https://forums.unraid.net/topic/98978-plugin-nvidia-driver/

and post any questions in that thread. Be sure to describe the issue in detail and upload your diagnostics (from Tools -> Diagnostics) 

 

Link to comment
  • 2 weeks later...
On 4/5/2020 at 5:38 PM, ljm42 said:

Sure, on the flash drive delete the file /config/vfio-pci.cfg

 

Note that this plugin is just a front-end that writes the config file for you. More details about the config file here:

 

 

Don't seem to have that file on my drive. Made a mistake with the config and now unable to boot. All I see is the files in the plugins folder, deleted those but still unable to boot.

Link to comment
11 hours ago, louij2 said:

Don't seem to have that file on my drive. Made a mistake with the config and now unable to boot. All I see is the files in the plugins folder, deleted those but still unable to boot.


If there is no config/vfio-pci.cfg file then your problems are not related to your vfio-pci setup. I'd recommend starting a new thread in the general support.

 

If the system won't boot then you won't be able to upload diagnostics, but it will help if you can post a screenshot of whatever is in the root folder of the flash drive along with the config folder

 

Then connect a monitor and keyboard to the system and post a photo of whatever is on the screen when the text stops scrolling.

 

This needs to be in a new thread though, it will get lost in this discussion of vfio-pci

  • Like 1
Link to comment
On 5/2/2021 at 10:19 PM, ljm42 said:


If there is no config/vfio-pci.cfg file then your problems are not related to your vfio-pci setup. I'd recommend starting a new thread in the general support.

 

If the system won't boot then you won't be able to upload diagnostics, but it will help if you can post a screenshot of whatever is in the root folder of the flash drive along with the config folder

 

Then connect a monitor and keyboard to the system and post a photo of whatever is on the screen when the text stops scrolling.

 

This needs to be in a new thread though, it will get lost in this discussion of vfio-pci

I had to just pull my flash backup off My Servers and copy everything over. I did try copying just the kernel first but it wasn't that.

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.