pci passthrough issues

Elleni

Active Member
Jul 6, 2020
182
11
38
51
I try to setup a laptop for desktop virtualization, so I installed debian and then proxmox on it. When it comes to networking, I decided to configure whatever nics are used by proxmox in /etc/networking/interfaces file, and leave the wifi for example away from above config file so it is managed by networkmanager. As we only are allowed to use bridge and no nat anyway the wifi is not suitable as a bridged device anyway. But from time to time we will passthrough the wifi to a vm, and all that seems to work fine, at least in my testing system. Wifi is controlled by network manager as long as needed on the hostsystem. And when passed through to the vm, the vm can successfully use wifi and bluetooth.

As the laptop does not have a rj45 port, I first configured the network through the docking station nic; it is connected by usb-c to the laptop and there everything works fine, meaning the laptop gets an ip, and the vmbridge vmbr0 gets another ip in a different subnet based on its certificate. All good.

Now for when being on the road, I also have a small usb-rj45 adapter, which gives the host network connectivity after booting. But as soon as I boot one vm, it looses itself its network connectivity, while the vm which has a bridge to this nic still has network connectivity.

Dmesg shows the following as soon as the vm is boots:
Code:
[Mai 2 16:08] VFIO - User Level meta-driver version: 0.3
[  +0.073677] xhci_hcd 0000:00:14.0: remove, state 4
[  +0.000010] usb usb2: USB disconnect, device number 1
[  +0.000353] xhci_hcd 0000:00:14.0: USB bus 2 deregistered
[  +0.000035] xhci_hcd 0000:00:14.0: remove, state 1
[  +0.000009] usb usb1: USB disconnect, device number 1
[  +0.000003] usb 1-2: USB disconnect, device number 2
[  +0.004796] r8152-cfgselector 1-4: USB disconnect, device number 3
[  +0.000876] vmbr1: port 1(enx5882a88dbef6) entered disabled state
[  +0.000213] r8152 1-4:1.0 enx5882a88dbef6 (unregistering): left allmulticast mode
[  +0.000007] r8152 1-4:1.0 enx5882a88dbef6 (unregistering): left promiscuous mode
[  +0.000006] vmbr1: port 1(enx5882a88dbef6) entered disabled state
[  +0.037273] usb 1-7: USB disconnect, device number 4
[  +0.000358] usb 1-10: USB disconnect, device number 5
[  +0.009607] xhci_hcd 0000:00:14.0: USB bus 1 deregistered
[  +0.965207] tap1001i0: entered promiscuous mode
[  +0.018832] vmbr1: port 1(tap1001i0) entered blocking state
[  +0.000004] vmbr1: port 1(tap1001i0) entered disabled state
[  +0.000018] tap1001i0: entered allmulticast mode
[  +0.000119] vmbr1: port 1(tap1001i0) entered blocking state
[  +0.000004] vmbr1: port 1(tap1001i0) entered forwarding state
[Mai 2 16:09]  zd16: p1 p2 p3 p4
[  +0.200932] tap1001i0: left allmulticast mode
[  +0.000043] vmbr1: port 1(tap1001i0) entered disabled state

What I do not understand is, why the host looses network connectivity.
By try and error I found out, that it has to do with 2 pci-host devices, which I pass through to the windows vm, which are needed for wifi and bluetooth within the vm.
I am trying to understand, why the little usb-to-rj45 gets disconnected from host, as soon as these vm's starts and if this can be somehow fixed. Whichever of the following two pci devices are passed through he vm has this effect, described above. As written, this does not happen with the nic through the dockingstation - attached by usb-c t o the laptop.

Code:
00:14.0 USB controller: Intel Corporation Comet Lake PCH-LP USB 3.1 xHCI Host Controller
00:14.3 Network controller: Intel Corporation Comet Lake PCH-LP CNVi WiFi

I also pass through the laptop camera which is found as usb device by the way, but by try and error I found that this one does not have any effect on the nic.

Can you please help me understand, why the usb-to-nic device is shutdown on the host, when booting the vm and if this is avoidable while passing through the two mentioned devices (wifi and bluetooth)?

Please dont hesitate to ask for further informations if necessary to understand whats going on and if there is a fix.
 
Last edited:
Thread can be deleted. I came across that I passed through the usb controller and found out that it is possible to only pass the bluetooth controller under usb.