VMware Horizon Community
B1naryc0de
Contributor
Contributor

Horizon 2111 Agent won't mount USB on UBUNTU 20.04

Hi,

I've enabled USB redirection for my Horizon 2111 ubuntu 20.04.4 pool. I've followed all the USB redirection process (make the VHCI 1.15 driver, install agent with -U yes) as per VMWARE documention.

 

When I connect a usb driver, I can see the drive with lsusb but it never gets mounted.

 

Anyone has a clue?

 

Thanks!

Labels (1)
  • Hi

0 Kudos
9 Replies
B1naryc0de
Contributor
Contributor

If I type modprobe usb_vhci_hdi and then type lsmod | grep vhci I do see it, but same results. No USB key shows up and I can mount it either because it's not seen by lsblk.

I've also tried formating the key in fat16, fat32 and also NTFS. Still, no keys shows up.

Any clue?

 

Thanks!

0 Kudos
so2s
Contributor
Contributor

My guess is that there is something wrong with the driver-installation (or something else in your Ubuntu installation). You should see the driver loaded even when no devices are attached (like this):

$ lsmod | grep vhci
usb_vhci_iocifc        36864  4
usb_vhci_hcd           40960  2 usb_vhci_iocifc

I'm no kernel-driver expert but you could start by checking that the driverfiles are installed in

/usr/lib/modules/`uname -r`/

I think the mounting will start working once you figure out why the driver isn't loading...

ofox
VMware Employee
VMware Employee

Looks like you're using a Linux Agent VM, right?

So2s had a good guess. If you saw the usb device showing up in the VM but not function well, the problem might be with the driver in the VM.

songkai
VMware Employee
VMware Employee

Do you apply vmware vhci patch before build vhci driver ?

What output of "sudo lsusb" command when you redirection your usb device?
what output of "sudo fdisk -l" command when you redirection your usb device?

If you can see your usb device in lsusb command, it means the device redirection successful. But I not sure why you can't see this device in lsblk, could you check and share your system log /var/log/syslog ? You may see following usb log in /var/log/syslog :

Mar 25 06:59:37 ubuntu180405 kernel: [1415654.663536] usb 2-1: new SuperSpeed Gen 1 USB device number 2 using usb_vhci_hcd
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.771427] usb 2-1: New USB device found, idVendor=090c, idProduct=2000, bcdDevice=11.00
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.771432] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.771435] usb 2-1: Product: USB DISK
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.771437] usb 2-1: Manufacturer: SMI Corporation
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.771439] usb 2-1: SerialNumber: CCYYMMDDHHmmSSHO5FZE
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.916747] usb-storage 2-1:1.0: USB Mass Storage device detected
Mar 25 06:59:37 ubuntu180405 kernel: [1415654.917644] scsi host33: usb-storage 2-1:1.0
Mar 25 06:59:37 ubuntu180405 mtp-probe: checking bus 2, device 2: "/sys/devices/platform/usb_vhci_hcd.0/usb2/2-1"
Mar 25 06:59:37 ubuntu180405 mtp-probe: bus: 2, device: 2 was not an MTP device
Mar 25 06:59:37 ubuntu180405 upowerd[1242]: unhandled action 'bind' on /sys/devices/platform/usb_vhci_hcd.0/usb2/2-1/2-1:1.0
Mar 25 06:59:37 ubuntu180405 upowerd[1242]: unhandled action 'bind' on /sys/devices/platform/usb_vhci_hcd.0/usb2/2-1
Mar 25 06:59:38 ubuntu180405 kernel: [1415655.999633] scsi 33:0:0:0: Direct-Access SMI USB DISK 1100 PQ: 0 ANSI: 6
Mar 25 06:59:38 ubuntu180405 kernel: [1415656.000699] scsi 33:0:0:0: Attached scsi generic sg2 type 0
Mar 25 06:59:38 ubuntu180405 kernel: [1415656.068523] sd 33:0:0:0: [sdb] 122880000 512-byte logical blocks: (62.9 GB/58.6 GiB)
Mar 25 06:59:38 ubuntu180405 kernel: [1415656.106133] sd 33:0:0:0: [sdb] Write Protect is off
Mar 25 06:59:38 ubuntu180405 kernel: [1415656.106141] sd 33:0:0:0: [sdb] Mode Sense: 43 00 00 00
Mar 25 06:59:38 ubuntu180405 kernel: [1415656.149320] sd 33:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
Mar 25 06:59:38 ubuntu180405 kernel: [1415656.380908] sdb: sdb1
Mar 25 06:59:39 ubuntu180405 kernel: [1415656.520743] sd 33:0:0:0: [sdb] Attached SCSI removable disk

B1naryc0de
Contributor
Contributor

This is what I see in my logs, weird resets? My network connection is stable and using TCP.

 

usb 4-1: new SuperSpeed Gen 1 USB device number 2 using usb_vhci_hcd
usb 4-1: New USB device found, idVendor=090c, idProduct=4223, bcdDevice=1.00
usb 4-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
usb 4-1: Product: USB
usb 4-1: Manufacturer: Verbatim
usb 4-1: SerialNumber: 0703765D943GV45456
usb-storage 4-1:1.0: USB Mass Storage device detected
scsi host33: usb-storage 4-1:1.0
mtp-probe: checking bus 4, device 2: "/sys/devices/platform/usb_vhci_hcd.0/usb4/4-1"
mtp-probe: bus: 4, device: 2 was not an MTP device
Then I get another
mtp-probe: checking bus 4, device 2: "/sys/devices/platform/usb_vhci_hcd.0/usb4/4-1"
mtp-probe: bus: 4, device: 2 was not an MTP device
and finally a bunch of resets
usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using usb_vhci_hcd
usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using usb_vhci_hcd
usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using usb_vhci_hcd
usb 4-1: reset SuperSpeed Gen 1 USB device number 2 using usb_vhci_hcd

0 Kudos
B1naryc0de
Contributor
Contributor

Patch first, then install driver, then install the linux agent. Exactly like this:

cd /tmp
tar zxvf VMware-horizonagent-linux-x86_64-2111.1-8.4.0-19155374.tar.gz

apt-get install make gcc libelf-dev
download the 1.15 zip https://sourceforge.net/projects/usb-vhci/files/linux%20kernel%20module/
tar xzvf vhci-hcd-1.15.tar.gz
cd vhci-hcd-1.15
patch -p1 < /tmp/VMware-horizonagent-linux-x86_64-2111.1-8.4.0-19155374/resources/vhci/patch/vhci.patch
make clean && make && make install

cd /tmp/VMware-horizonagent-linux-x86_64-2111.1-8.4.0-19155374
./install_viewagent.sh -A yes -U yes
0 Kudos
B1naryc0de
Contributor
Contributor

I can definitely see the drive in lsusb

but nothing ever shows up in /dev or fdisk -l

I've tried formatting the key to NTFS, FAT16 and FAT32 and it still won't show up.

 

thanks for helping

0 Kudos
songkai
VMware Employee
VMware Employee

Does other usb device work in your linux desktop? Or only this usb device doesn't work ?

What the detail  info  of your device? Could you run "sudo hwinfo --scsi" command and share the output ?

 Do you try this usb device in a physical machine? 

It looks like this is device compatibility issue, the usb-storage driver doesn't work well with your device. I need more information to debug this issue, Could you help to enabe the trace level log in agent agent , then reproduce this issue and collect both client and  agent log ? Thank you very much! You can open a bug to upload these logs, thanks you very much!

Add following config in /etc/vmware/config to enable trace level usb log

UsbRedirServer.log.logLevel=trace
UsbRedirServer.log.throttleBytesPerSec=-1

Collect agent log via following command:

sudo /usr/lib/vmware/viewagent/bin/dct-debug.sh

 

0 Kudos
usbadm
Contributor
Contributor

Its a bug in the Horizôn Client for Linux.
Your USB Devices will be Redirected if you have them pluged in on Boot of your Linux Machine allready.
It does not Matter what OS your Virtual machine is. 


If you unplug the Device and replugf it. Or if you plug it after Horizon CLient was started allready it wont be redirected. Even if you configured the Device to automatically be redirected on Pluging in.

HID Devices like Mouse, Keyboard and Headphones are not affected. 

This Bug consists. Can be found on Ubuntu and also IGEL OS that is based on Ubuntu as well.
The Bug is in The Horizon Client for Linux since Ages.
Its not present on Horizon Client for MAC

I could name VMWare Support Tickets of more than one Customer. With this issue

0 Kudos