External HDD not seen in guest OS via USB Passthrough

Asked by rob on 2020-01-21

I am trying to get Whonix working for me, and for this I tried to enable USB Passthrough as described in the wiki-docs of Whonix for KVM. My host system is Ubuntu 18.04.3. Now when I follow instructions I use the USB redirection feature.
But my external hdd Western Digital My Passport (WDBBEP, 1Tb) is not showing (in file manager).
I copied part of my /var/log/syslog (log of Whonix guest OS):

Jan 20 14:47:27 host kernel: [ 68.362096] usb 1-1: new high-speed USB device number 2 using ehci-pci
Jan 20 14:47:27 host kernel: [ 68.505903] usb 1-1: device descriptor read/64, error 18
Jan 20 14:47:27 host kernel: [ 68.742073] usb 1-1: device descriptor read/64, error 18
Jan 20 14:47:27 host kernel: [ 68.986008] usb 1-1: new high-speed USB device number 3 using ehci-pci
Jan 20 14:47:27 host kernel: [ 69.125968] usb 1-1: device descriptor read/64, error 18
Jan 20 14:47:28 host kernel: [ 69.362015] usb 1-1: device descriptor read/64, error 18
Jan 20 14:47:28 host kernel: [ 69.474135] usb usb1-port1: attempt power cycle
Jan 20 14:47:28 host kernel: [ 69.922032] usb 1-1: new high-speed USB device number 4 using ehci-pci
Jan 20 14:47:28 host kernel: [ 69.955362] usb 1-1: Invalid ep0 maxpacket: 9
Jan 20 14:47:28 host kernel: [ 70.093917] usb 1-1: new high-speed USB device number 5 using ehci-pci
Jan 20 14:47:28 host kernel: [ 70.190298] usb 1-1: Invalid ep0 maxpacket: 9
Jan 20 14:47:28 host kernel: [ 70.197220] usb usb1-port1: unable to enumerate USB device
Jan 20 14:47:29 host kernel: [ 70.465930] usb 2-1: new full-speed USB device number 2 using uhci_hcd
Jan 20 14:47:29 host kernel: [ 70.621999] usb 2-1: device descriptor read/64, error 18
Jan 20 14:47:29 host kernel: [ 70.866001] usb 2-1: device descriptor read/64, error 18
Jan 20 14:47:29 host kernel: [ 71.103318] usb 2-1: new full-speed USB device number 3 using uhci_hcd
Jan 20 14:47:29 host kernel: [ 71.238019] usb 2-1: device descriptor read/64, error 18
Jan 20 14:47:30 host kernel: [ 71.481998] usb 2-1: device descriptor read/64, error 18
Jan 20 14:47:30 host kernel: [ 71.590127] usb usb2-port1: attempt power cycle
Jan 20 14:47:30 host kernel: [ 72.033988] usb 2-1: new full-speed USB device number 4 using uhci_hcd
Jan 20 14:47:30 host kernel: [ 72.060413] usb 2-1: Invalid ep0 maxpacket: 9
Jan 20 14:47:30 host kernel: [ 72.190002] usb 2-1: new full-speed USB device number 5 using uhci_hcd
Jan 20 14:47:30 host kernel: [ 72.216924] usb 2-1: Invalid ep0 maxpacket: 9
Jan 20 14:47:30 host kernel: [ 72.218959] usb usb2-port1: unable to enumerate USB device

Lots of errors there, but what to do with it?
I followed an alternative second route to passthrough my usb-disk (advice by someone trying to connect a webcam): I removed the redirectors, and chose in the Details window: ‘add hardware’ -> USB Host Device -> my WD hdd. Although my disk does not show again, I did find a reference to it in file manager (guest OS): /dev/bus/usb. So I used udevadm info /dev/bus/usb/001/006 and got this result:

P: /devices/pci0000:00/0000:00:09.7/usb1/1-1
N: bus/usb/001/006
L: 0
E: DEVPATH=/devices/pci0000:00/0000:00:09.7/usb1/1-1
E: DEVNAME=/dev/bus/usb/001/006
E: DEVTYPE=usb_device
E: DRIVER=usb
E: PRODUCT=1058/7a8/1049
E: TYPE=0/0/0
E: BUSNUM=001
E: DEVNUM=006
E: MAJOR=189
E: MINOR=5
E: SUBSYSTEM=usb
E: USEC_INITIALIZED=424814926
E: ID_VENDOR=Western_Digital
E: ID_VENDOR_ENC=Western\x20Digital
E: ID_VENDOR_ID=1058
E: ID_MODEL=My_Passport_07A8
E: ID_MODEL_ENC=My\x20Passport\x2007A8
E: ID_MODEL_ID=07a8
E: ID_REVISION=1049
E: ID_SERIAL=Western_Digital_My_Passport_07A8_575843314543324B4B363438
E: ID_SERIAL_SHORT=575843314543324B4B363438
E: ID_BUS=usb
E: ID_USB_INTERFACES=:080650:
E: ID_VENDOR_FROM_DATABASE=Western Digital Technologies, Inc.
E: ID_MODEL_FROM_DATABASE=My Passport (WDBBEP), My Passport for Mac (WDBLUZ)

and I got this in /var/log/syslog (guest OS):

Jan 20 14:53:23 host kernel: [ 424.594108] usb 1-1: new high-speed USB device number 6 using ehci-pci
Jan 20 14:53:23 host kernel: [ 424.919564] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0x83 has invalid maxpacket 1024
Jan 20 14:53:23 host kernel: [ 424.927217] usb 1-1: config 1 interface 0 altsetting 0 bulk endpoint 0xA has invalid maxpacket 1024
Jan 20 14:53:23 host kernel: [ 424.933105] usb 1-1: New USB device found, idVendor=1058, idProduct=07a8, bcdDevice=10.49
Jan 20 14:53:23 host kernel: [ 424.936589] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Jan 20 14:53:23 host kernel: [ 424.939484] usb 1-1: Product: My Passport 07A8
Jan 20 14:53:23 host kernel: [ 424.941275] usb 1-1: Manufacturer: Western Digital
Jan 20 14:53:23 host kernel: [ 424.943272] usb 1-1: SerialNumber: 575843314543324B4B363438
Jan 20 14:53:23 host kernel: [ 424.964492] usb-storage 1-1:1.0: USB Mass Storage device detected
Jan 20 14:53:23 host kernel: [ 424.968100] scsi host2: usb-storage 1-1:1.0
Jan 20 14:53:23 host kernel: [ 424.971778] usbcore: registered new interface driver usb-storage
Jan 20 14:53:23 host kernel: [ 424.976459] usbcore: registered new interface driver uas
Jan 20 14:53:24 host kernel: [ 425.990356] scsi 2:0:0:0: Direct-Access WD My Passport 07A8 1049 PQ: 0 ANSI: 6
Jan 20 14:53:24 host kernel: [ 425.997043] scsi 2:0:0:1: Enclosure WD SES Device 1049 PQ: 0 ANSI: 6
Jan 20 14:53:24 host kernel: [ 426.038728] scsi 2:0:0:0: Attached scsi generic sg0 type 0
Jan 20 14:53:24 host kernel: [ 426.044584] scsi 2:0:0:1: Attached scsi generic sg1 type 13
Jan 20 14:53:24 host kernel: [ 426.054518] sd 2:0:0:0: [sda] 1953458176 512-byte logical blocks: (1.00 TB/931 GiB)
Jan 20 14:53:24 host kernel: [ 426.064979] sd 2:0:0:0: [sda] Write Protect is off
Jan 20 14:53:24 host kernel: [ 426.066922] sd 2:0:0:0: [sda] Mode Sense: 53 00 10 08
Jan 20 14:53:24 host kernel: [ 426.072482] sd 2:0:0:0: [sda] No Caching mode page found
Jan 20 14:53:24 host kernel: [ 426.074765] sd 2:0:0:0: [sda] Assuming drive cache: write through
Jan 20 14:53:24 host kernel: [ 426.084115] scsi 2:0:0:1: Wrong diagnostic page; asked for 1 got 8
Jan 20 14:53:24 host kernel: [ 426.087071] scsi 2:0:0:1: Failed to get diagnostic page 0x1
Jan 20 14:53:24 host kernel: [ 426.089580] scsi 2:0:0:1: Failed to bind enclosure -19
Jan 20 14:53:24 host kernel: [ 426.096357] ses 2:0:0:1: Attached Enclosure device
Jan 20 14:53:24 host kernel: [ 426.167922] sda: sda1
Jan 20 14:53:24 host kernel: [ 426.189861] sd 2:0:0:0: [sda] Attached SCSI disk

Well after some research I doubt this problem has anything to do with Whonix. I found the same kind of problem here: https://bugs.launchpad.net/qemu/+bug/1385934/ and that was in 2014. So, I think it is rather a qemu-kvm thing. I checked qemu on my host Ubuntu 18.04 system with command: apt show qemu-system-x86, which gives me:
Package: qemu-system-x86
Version: 1:2.11+dfsg-1ubuntu7.21
Priority: optional
Section: misc
Source: qemu
Origin: Ubuntu
Maintainer: Ubuntu Developers <email address hidden>
Original-Maintainer: Debian QEMU Team <email address hidden>
Bugs: https bugs launchpad net/ubuntu/+filebug
So, it is probably qemu-kvm as implemented by Ubuntu.
In some other sources it was suggested that it might have to do something with the USB ports (2.0 or 3.0) on the computer. Mine is a Dell OPTIPLEX 3020 SFF. Well, I tried different ports on the back as well as the front, but they all give the same, saddening result.
Still, funny that my USB keyboard does work on the Whonix guest system.

Question information

Language:
English Edit question
Status:
Expired
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Last query:
2020-01-21
Last reply:
2020-02-05
Launchpad Janitor (janitor) said : #1

This question was expired because it remained in the 'Open' state without activity for the last 15 days.