passing PCI USB controller = internal error

Jan 5, 2020
20
2
8
Could someone help me determine what I have done incorrectly. I am attempting to passthrough this card
https://www.startech.com/Cards-Adap...rt-pcie-usb-card-gigabit-ethernet~PEXUSB3S3GE
to this VM

Code:
agent: 1
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
balloon: 0
bios: ovmf
boot: cdn
bootdisk: virtio0
cores: 8
cpu: host,hidden=1,flags=+pcid
efidisk0: local-lvm:vm-100-disk-1,size=128K
hostpci0: 03:00,pcie=1,x-vga=1
hostpci1: 21:00.0,rombar=0
ide2: local:iso/proxmox-ve_6.1-1.iso,media=cdrom,size=794846K
machine: q35
memory: 20480
name: his
net0: virtio=4A:5C:E7:BA:18:3F,bridge=vmbr0,firewall=1
numa: 0
ostype: win10
scsi2: /dev/disk/by-id/ata-WDC_WD20EARS-00MVWB0_WD-WMAZA1112475,size=1953514584K
scsi3: /dev/disk/by-id/ata-WDC_WD3000HLFS-01G6U0_WD-WXLY08164321,size=293036184K
scsi4: /dev/disk/by-id/ata-CT2000BX500SSD1_2001E231F0C1,size=1953514584K
scsi5: /dev/disk/by-id/ata-OCZ-VERTEX3_OCZ-KOG60Y076HO72023,size=234431064K
scsi6: /dev/disk/by-id/ata-OCZ-VERTEX460_OCZ-7JWBHO7SN54GIPG8,size=468851544K
scsihw: virtio-scsi-pci
smbios1: uuid=9e1a83cb-3251-4660-b6d0-069b254b9eb1
sockets: 1
virtio0: local-lvm:vm-100-disk-0,cache=writeback,size=150G
vmgenid: a224fca7-b1f0-43d8-bd0f-1873b4d41b36

hostpci1 is this card

hostpci0 is a video card.

if i remove hostpci1, the VM starts without error, & displays to its monitors.

When i add the card to the VM, the pve start task completes, however the VM status when I hover over it in GUI says "internal-error". I'm unable to interact with the VM or ping/connect remotely.

I've tried various combinations of the GUI checkmarks; all functions, rom-bar, pci-express. i did not checkmark primary gpu as this is not a video card.

Hardware
TRX40-e ROG Strix
Threadripper 3960
64GB Ram
two 5700 xt video cards
various hard drives
1000Watt PSU

Code:
pveversion -v
proxmox-ve: 6.1-2 (running kernel: 5.3.13-1-pve)
pve-manager: 6.1-3 (running version: 6.1-3/37248ce6)
pve-kernel-5.3: 6.0-12
pve-kernel-helper: 6.0-12
pve-kernel-5.3.13-1-pve: 5.3.13-1
pve-kernel-5.3.10-1-pve: 5.3.10-1
ceph-fuse: 12.2.11+dfsg1-2.1+b1
corosync: 3.0.2-pve4
criu: 3.11-3
glusterfs-client: 5.5-3
ifupdown: 0.8.35+pve1
ksm-control-daemon: 1.3-1
libjs-extjs: 6.0.1-10
libknet1: 1.13-pve1
libpve-access-control: 6.0-5
libpve-apiclient-perl: 3.0-2
libpve-common-perl: 6.0-9
libpve-guest-common-perl: 3.0-3
libpve-http-server-perl: 3.0-3
libpve-storage-perl: 6.1-2
libqb0: 1.0.5-1
libspice-server1: 0.14.2-4~pve6+1
lvm2: 2.03.02-pve3
lxc-pve: 3.2.1-1
lxcfs: 3.0.3-pve60
novnc-pve: 1.1.0-1
proxmox-mini-journalreader: 1.1-1
proxmox-widget-toolkit: 2.1-1
pve-cluster: 6.1-2
pve-container: 3.0-14
pve-docs: 6.1-3
pve-edk2-firmware: 2.20191002-1
pve-firewall: 4.0-9
pve-firmware: 3.0-4
pve-ha-manager: 3.0-8
pve-i18n: 2.0-3
pve-qemu-kvm: 4.1.1-2
pve-xtermjs: 3.13.2-1
qemu-server: 6.1-2
smartmontools: 7.0-pve2
spiceterm: 3.1-1
vncterm: 1.6-1
zfsutils-linux: 0.8.2-pve2

/etc/default/grub
Code:
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Proxmox Virtual Environment"
GRUB_CMDLINE_LINUX_DEFAULT="quiet nomodeset pcie_acs_override=downstream,multif$
GRUB_CMDLINE_LINUX=""

# Disable os-prober, it might add menu entries for each guest
GRUB_DISABLE_OS_PROBER=true

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

/etc/modules
Code:
# /etc/modules: kernel modules to load at boot time.
#
# This file contains the names of kernel modules that should be loaded
# at boot time, one per line. Lines beginning with "#" are ignored.

vfio
vfio_iommu_type1
vfio_pci
vfio_virqfd

/etc/modprobe.d/iommu_unsafe_interrupts.conf
Code:
options vfio_iommu_type1 allow_unsafe_interrupts=1
I've been to BIOS to make sure Secure Virtual Machine is enabled

/etc/modprobe.d/blacklist.conf
Code:
blacklist radeon
blacklist nouveau
blacklist nvidia

/etc/modprobe.d/vfio.conf
Code:
options vfio-pci ids=1002:731f,1002:ab38 disable_vga=1
options vfio-pci ids=10de:1187,10de:0e0a disable_vga=1



Thank you
 

Attachments

  • internalerrstart.dmesg.txt
    1,021.5 KB · Views: 2
Last edited:
I took a suggestion to change the config args line to
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,hidden=1'
the VM would not start until i reverted back to
args: -cpu 'host,+kvm_pv_unhalt,+kvm_pv_eoi,hv_vendor_id=NV43FIX,kvm=off'
 
can you post the out put of 'dmesg' after you started the vm?
 
please also post your iommu groups and lspci -k output
 
find /sys/kernel/iommu_groups/ -type l
Code:
/sys/kernel/iommu_groups/55/devices/0000:42:0a.0
/sys/kernel/iommu_groups/83/devices/0000:62:00.0
/sys/kernel/iommu_groups/17/devices/0000:05:00.0
/sys/kernel/iommu_groups/45/devices/0000:40:07.1
/sys/kernel/iommu_groups/73/devices/0000:60:01.0
/sys/kernel/iommu_groups/35/devices/0000:40:01.0
/sys/kernel/iommu_groups/7/devices/0000:00:07.1
/sys/kernel/iommu_groups/63/devices/0000:48:00.0
/sys/kernel/iommu_groups/25/devices/0000:20:07.0
/sys/kernel/iommu_groups/53/devices/0000:42:08.0
/sys/kernel/iommu_groups/81/devices/0000:60:08.1
/sys/kernel/iommu_groups/15/devices/0000:03:00.1
/sys/kernel/iommu_groups/43/devices/0000:40:05.0
/sys/kernel/iommu_groups/71/devices/0000:4f:00.0
/sys/kernel/iommu_groups/33/devices/0000:23:00.3
/sys/kernel/iommu_groups/5/devices/0000:00:05.0
/sys/kernel/iommu_groups/61/devices/0000:47:00.1
/sys/kernel/iommu_groups/23/devices/0000:20:04.0
/sys/kernel/iommu_groups/51/devices/0000:42:05.0
/sys/kernel/iommu_groups/13/devices/0000:02:00.0
/sys/kernel/iommu_groups/41/devices/0000:40:03.1
/sys/kernel/iommu_groups/31/devices/0000:23:00.0
/sys/kernel/iommu_groups/3/devices/0000:00:03.0
/sys/kernel/iommu_groups/21/devices/0000:20:03.0
/sys/kernel/iommu_groups/78/devices/0000:60:07.0
/sys/kernel/iommu_groups/11/devices/0000:00:18.3
/sys/kernel/iommu_groups/11/devices/0000:00:18.1
/sys/kernel/iommu_groups/11/devices/0000:00:18.6
/sys/kernel/iommu_groups/11/devices/0000:00:18.4
/sys/kernel/iommu_groups/11/devices/0000:00:18.2
/sys/kernel/iommu_groups/11/devices/0000:00:18.0
/sys/kernel/iommu_groups/11/devices/0000:00:18.7
/sys/kernel/iommu_groups/11/devices/0000:00:18.5
/sys/kernel/iommu_groups/68/devices/0000:4d:00.0
/sys/kernel/iommu_groups/1/devices/0000:00:01.1
/sys/kernel/iommu_groups/58/devices/0000:45:00.0
/sys/kernel/iommu_groups/48/devices/0000:41:00.0
/sys/kernel/iommu_groups/76/devices/0000:60:04.0
/sys/kernel/iommu_groups/38/devices/0000:40:01.4
/sys/kernel/iommu_groups/66/devices/0000:4b:00.0
/sys/kernel/iommu_groups/28/devices/0000:20:08.1
/sys/kernel/iommu_groups/56/devices/0000:43:00.0
/sys/kernel/iommu_groups/18/devices/0000:05:00.3
/sys/kernel/iommu_groups/46/devices/0000:40:08.0
/sys/kernel/iommu_groups/74/devices/0000:60:02.0
/sys/kernel/iommu_groups/36/devices/0000:40:01.1
/sys/kernel/iommu_groups/8/devices/0000:00:08.0
/sys/kernel/iommu_groups/64/devices/0000:49:00.0
/sys/kernel/iommu_groups/26/devices/0000:20:07.1
/sys/kernel/iommu_groups/54/devices/0000:42:09.0
/sys/kernel/iommu_groups/82/devices/0000:61:00.0
/sys/kernel/iommu_groups/16/devices/0000:04:00.0
/sys/kernel/iommu_groups/44/devices/0000:40:07.0
/sys/kernel/iommu_groups/72/devices/0000:50:00.0
/sys/kernel/iommu_groups/34/devices/0000:23:00.4
/sys/kernel/iommu_groups/6/devices/0000:00:07.0
/sys/kernel/iommu_groups/62/devices/0000:47:00.3
/sys/kernel/iommu_groups/24/devices/0000:20:05.0
/sys/kernel/iommu_groups/52/devices/0000:42:06.0
/sys/kernel/iommu_groups/80/devices/0000:60:08.0
/sys/kernel/iommu_groups/14/devices/0000:03:00.0
/sys/kernel/iommu_groups/42/devices/0000:40:04.0
/sys/kernel/iommu_groups/70/devices/0000:4e:00.1
/sys/kernel/iommu_groups/32/devices/0000:23:00.1
/sys/kernel/iommu_groups/4/devices/0000:00:04.0
/sys/kernel/iommu_groups/60/devices/0000:47:00.0
/sys/kernel/iommu_groups/22/devices/0000:20:03.1
/sys/kernel/iommu_groups/50/devices/0000:42:04.0
/sys/kernel/iommu_groups/79/devices/0000:60:07.1
/sys/kernel/iommu_groups/12/devices/0000:01:00.0
/sys/kernel/iommu_groups/40/devices/0000:40:03.0
/sys/kernel/iommu_groups/69/devices/0000:4e:00.0
/sys/kernel/iommu_groups/30/devices/0000:22:00.0
/sys/kernel/iommu_groups/2/devices/0000:00:02.0
/sys/kernel/iommu_groups/59/devices/0000:46:00.0
/sys/kernel/iommu_groups/20/devices/0000:20:02.0
/sys/kernel/iommu_groups/49/devices/0000:42:01.0
/sys/kernel/iommu_groups/77/devices/0000:60:05.0
/sys/kernel/iommu_groups/10/devices/0000:00:14.3
/sys/kernel/iommu_groups/10/devices/0000:00:14.0
/sys/kernel/iommu_groups/39/devices/0000:40:02.0
/sys/kernel/iommu_groups/67/devices/0000:4c:00.0
/sys/kernel/iommu_groups/29/devices/0000:21:00.0
/sys/kernel/iommu_groups/0/devices/0000:00:01.0
/sys/kernel/iommu_groups/57/devices/0000:44:00.0
/sys/kernel/iommu_groups/19/devices/0000:20:01.0
/sys/kernel/iommu_groups/47/devices/0000:40:08.1
/sys/kernel/iommu_groups/75/devices/0000:60:03.0
/sys/kernel/iommu_groups/37/devices/0000:40:01.3
/sys/kernel/iommu_groups/9/devices/0000:00:08.1
/sys/kernel/iommu_groups/65/devices/0000:4a:00.0
/sys/kernel/iommu_groups/27/devices/0000:20:08.0
 

Attachments

  • lscpci k.txt
    13 KB · Views: 8
Is this card fully working under linux?
Can you please post the output of the command :
lspci -n -s 21:00.0

I miss the Ethernet Port in your i your lspci -k list or is it the 44:00.0 device?
 
Last edited:
Is this card fully working under linux?
Can you please post the output of the command :
lspci -n -s 21:00.0

I miss the Ethernet Port in your i your lspci -k list or is it the 44:00.0 device?

card is new, and i've only tried it in this rig. i'm currently using the VM without that card passed through. i plugged a mouse into it, then at a node shell put in lsusb. it does not show up there. i will try to boot into a live distro...

lspci -n -s 21:00.0
21:00.0 0c03: 1912:0014 (rev 03)
 
Last edited:
/etc/modprobe.d/vfio.conf

Code:
options vfio-pci ids=1002:731f,1002:ab38 disable_vga=1
options vfio-pci ids=10de:1187,10de:0e0a disable_vga=1
options vfio-pci ids=1912:0014

I ran this according to the wiki, then reboot
Code:
update-initramfs -u -k all
 
Last edited:
The passthrough works with a work around, but its rather annoying and I'd like to correct it...

When I initially start the VM, I have to physically disconnect all devices connected to the PCI card, it will start with no errors. As soon as i connect any usb device, it will freeze and the host displays "internal-error". At the PVE GUI, I go to shutdown>Reset. Then restart the VM, no errors and I can it connect other devices without freezing/errors.

I could still use some help.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!