Critical USB Pass Through Issue in 6.4 (USB 3 PCI Card)


Recommended Posts

PREFACE

As I struggled to decide to post this in General Support vs the VM Engine forum, I realized that this is a post I wish I didn't have to write.  Not just because something is broken, but because something that used to be rock solid has become an increasingly worse with every upgrade I have taken (in my personal experience).  I run a Windows 10 VM on top of unRAID as my daily driver (or mission critical machine). That Windows 10 VM (which I had to recreate a week ago) used to allow me to pass through my USB 3 PCI Controller Card that I use for hot plugging  -  well it kinda worked in 6.3.5., but I have been pulling out what's left of my hair in 6.4.  Truthfully, I had no issues with KVM in 6.1.9.  In 6.3.5, I would get all of these "smbus: error: Unexpected read in state -1" errors in the QEMU log, and I would have to restart the VM a few times to get unRaid to properly pass through the controller at full speed.   There would be times the VM would startup, but the VM would run 1/16th of it's speed as if it was being throttled.  If I took the controller  out of the config, boot it , shut it down. and then add the controller back- then the VM would run at full speed again (usually).  In 6.4, the VM will only run at that throttled like speed (in its herky jerky splendor) if I try to pass the controller through.  Once I take the controller out of the VM config - it runs fine, but now I can't plugin all of my USB stuff.  I did get it to boot once in that herky jerky state (with the USB controller passed through), and it took another 15 minutes to get device manager to open - just to see the USB controller missing in Windows.

 

DATA

I have attached my diagnostics file, but here are some basic points of info:

  • Libvirt version 3.8.0
  • QEMU 2.10.2
  • PCIe ACS Override is enabled
  • append vfio-pci.ids=1106:3483 vfio_iommu_type1.allow_unsafe_interrupts=1 iommu=pt was added to my Syslinux Configuration to stub my by USB controller
  • The controller is it's own IOMMU Group (IOMMU group 17:    [1106:3483] 03:00.0 USB controller: VIA Technologies, Inc. VL805 USB 3.0 Host Controller (rev ff))
  • Force Stopping now causes the VM Tab not to show my VMs.  The only way I can get the tab back is to ssh into the server, and perform "/etc/rc.d/rc.libvirt restart".  Then of course now I can't restart the VM if the controller is connected to the config.  Doing so yields an "unknown PCI header type '127'" error. Sigh, well at least it's different from that long QEMU error that tells me my controller is busy, so it can't restart the VM.  Which means I have to reboot the server for the 10th time today.

 

APOLOGY

I apologize if I come across as snarky.  Please forgive me. I am just very tired and frustrated, and I ended up spending my entire day off working on my server vs playing on it.  I appreciate any help that can be provided.

prime-diagnostics-20180115-1840.zip

Edited by saskwatch
Clarifying that this post is in re: to a USB 3 PCI Card
Link to comment
2 hours ago, 1812 said:
simple solution is stop messing with the controller passthrough and get a usb3 card and pass that to the vm. I've done controller passthrough once or twice and found it less desirable than pci usb passthrough. others will have different experiences, but that is mine.

 

I don't want to be confusing. I am trying to pass through a USB 3 card. The card is a controller, so that is why I referred to it as such. I will edit my post to make sure that is clear.

Sent from my SM-G955U using Tapatalk
 

Edited by saskwatch
Link to comment

2, maybe 3 things

 

first is, maybe the card is going out? have you tried another one?

 

second, what guide did you follow to setup the windows 10 vm? sometimes there are optimizations that go missed when you wing it and just install windows 10 w/out a guide.

 

also a few errors : 

an 15 15:47:16 Prime nginx: 2018/01/15 15:47:16 [error] 5544#5544: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.70, server: , request: "POST /plugins/advanced.buttons/AdvancedButtons.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.10", referrer: "http://192.168.1.10/VMs"
Jan 15 15:47:16 Prime nginx: 2018/01/15 15:47:16 [error] 5544#5544: *3 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.70, server: , request: "POST /plugins/advanced.buttons/AdvancedButtons.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.10", referrer: "http://192.168.1.10/VMs"
Jan 15 15:47:16 Prime emhttpd: Autostart enabled
Jan 15 15:47:16 Prime root: Starting /usr/local/emhttp/webGui/scripts/diskload
Jan 15 15:47:16 Prime nginx: 2018/01/15 15:47:16 [error] 5544#5544: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.70, server: , request: "POST /plugins/advanced.buttons/AdvancedButtons.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.10", referrer: "http://192.168.1.10/VMs"
Jan 15 15:47:16 Prime nginx: 2018/01/15 15:47:16 [error] 5544#5544: *3 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.70, server: , request: "POST /plugins/advanced.buttons/AdvancedButtons.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.10", referrer: "http://192.168.1.10/VMs"
Jan 15 15:47:17 Prime nginx: 2018/01/15 15:47:17 [error] 5544#5544: *1 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.70, server: , request: "POST /plugins/advanced.buttons/AdvancedButtons.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.10", referrer: "http://192.168.1.10/VMs"
Jan 15 15:47:17 Prime nginx: 2018/01/15 15:47:17 [error] 5544#5544: *3 FastCGI sent in stderr: "Primary script unknown" while reading response header from upstream, client: 192.168.1.70, server: , request: "POST /plugins/advanced.buttons/AdvancedButtons.php HTTP/1.1", upstream: "fastcgi://unix:/var/run/php5-fpm.sock:", host: "192.168.1.10", referrer: "http://192.168.1.10/VMs"
Jan 15 15:47:17 Prime avahi-daemon[5488]: Server startup complete. Host name is Prime.local. Local service cookie is 535052230.
Jan 15 15:47:17 Prime root: error: /webGui/include/ProcessStatus.php: wrong csrf_token

 

looks like the advanced buttons is causing thousands of errors  on your server. uninstall it for now. (also check for compatibility with unRaid 6.4)

 

 

 

I don't know your system that well, but I don't know if you actually need all those modifications to the syslinux.cfg. I would uninstall the plugin, change the usb card to a different slot if possible, remove all but the pci stub from the syslinux.cfg and reboot. then reassign the card to the vm and then report back what happens.

 

 

Link to comment

I already uninstalled advance buttons.  I don't have another card to try.  As far as guides,  I am not sure how to answer.  User @saarg helped me getting it going the first time.  I figured out from the the forum how to properly stub the card.  I guess that can be best seen on spaceinvaderone's youtube channel.

Link to comment
45 minutes ago, saskwatch said:

I already uninstalled advance buttons.  I don't have another card to try.  As far as guides,  I am not sure how to answer.  User @saarg helped me getting it going the first time.  I figured out from the the forum how to properly stub the card.  I guess that can be best seen on spaceinvaderone's youtube channel.

 

What did I do wrong this time? :ph34r:

  • Like 1
Link to comment
2 hours ago, saarg said:
 

What did I do wrong this time? 

LOL @saarg! You did nothing wrong. I was giving some history about you helping me in the past.

 

So I downgraded to 2 different lower versions, and I still couldn't get the card to pass through. Maybe my card is bad. I just ordered one off of Amazon... So let's see how that goes.

 

Sent from my SM-G955U using Tapatalk

 

 

 

Edited by saskwatch
Link to comment

So I finally got this to work.  I think my libvirt.img file had gotten corrupted.  I renamed it, and let the system rebuild it.  I also moved the card to a different slot, and I was finally able to pass through my new controller. I can hot plug again.  My VM restarts without hanging... all of that good stuff.  Now maybe I can finally enjoy 6.4!

  • Like 1
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.