How to pass-through RNDIS USB dongle from host to virtual machine.

Simply passing of USB device to qemu virtual machine usually works well. I had no troubles passing most of devices, but passing of USB-modem gave me a headache.

VM got the following error during boot:

rndis_host 2-1:1.0: RNDIS init failed, -110

-110 code is not meaningful and I started to dig into host’s logs. This is a sample of dmesg logs.

[   94.966599] usb 3-2: New USB device found, idVendor=1286, idProduct=812a, bcdDevice= 0.00
[   94.966604] usb 3-2: New USB device strings: Mfr=3, Product=2, SerialNumber=0
[   94.966605] usb 3-2: Product: Yota Modem
[   94.966607] usb 3-2: Manufacturer: YOTA
[   99.159818] usb 3-2: USB disconnect, device number 3
[  113.230722] usb 3-2: new high-speed USB device number 4 using xhci_hcd
[  118.559241] usb 3-2: unable to read config index 0 descriptor/start: -110
[  118.559340] usb 3-2: can't read configurations, error -110
[  118.895238] usb 3-2: new high-speed USB device number 5 using xhci_hcd
[  119.043646] usb 3-2: New USB device found, idVendor=1376, idProduct=4e61, bcdDevice= 1.00
[  119.043654] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  119.043658] usb 3-2: Product: Mobile Composite Device Bus
[  119.043662] usb 3-2: Manufacturer: Marvell
[  119.043665] usb 3-2: SerialNumber: Mobile Composite Device Bus
[  119.064320] usbcore: registered new interface driver cdc_ether
[  119.065632] usbcore: registered new interface driver rndis_host
[  172.790675] usb 3-2: USB disconnect, device number 5
[  173.095062] usb 3-2: new high-speed USB device number 6 using xhci_hcd
[  173.243271] usb 3-2: config 1 has an invalid interface number: 6 but max is 2
[  173.243275] usb 3-2: config 1 has no interface number 2
[  173.243604] usb 3-2: New USB device found, idVendor=1376, idProduct=4e61, bcdDevice= 1.00
[  173.243607] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  173.243608] usb 3-2: Product: Mobile Composite Device Bus
[  173.243610] usb 3-2: Manufacturer: Marvell
[  173.243611] usb 3-2: SerialNumber: Mobile Composite Device Bus
[  188.755071] rndis_host 3-2:1.0 eth0: register 'rndis_host' at usb-0000:00:14.0-2, RNDIS device

The host system initialized modem and used it as a virtual ethernet device.

The solution is to blacklist rndis driver for host system and bother modem only inside VM.

nano /etc/modprobe.d/rndis.conf

blacklist cdc_ether
blacklist rndis_host

Then update initramfs and reboot.

update-initramfs -u
reboot

After reboot, start your VM and now it should successfully register RNDIS device.

Leave a Comment

Your email address will not be published. Required fields are marked *