September 29

VMWARE: VMWARE View and USB issues – configuration

Configuring USB device filters and redirecting Human Interface Devices (HIDs) in View Client

Purpose

This article provides information about Human Interface Devices not being redirected as a standard practice in VMware View, and information on how to get them to redirect if necessary.

By default, View Client for Windows excludes certain devices from the drop-down menu for configuring redirection:

  • Human Interface Devices (HIDs), such as USB keyboards, mice, and authentication tokens
  • Any Bluetooth device that is paired with an HID
  • Smart card readers and USB authentication tokens that present themselves as smart card readers. These devices are redirected separately so that they are available for authentication on the remote desktop.

USB VoIP telephones are not excluded from redirection, even though they have an attached keypad, which is an HID.

From View Manager 3.1.1, you can configure the devices that are listed as being available for redirection.

Notes:

  • Microsoft Remote Desktop Protocol (RDP) prevents HIDs that are plugged in locally, such as the console keyboard, from affecting remote RDP sessions. USB redirection makes devices appear to be plugged in locally, so RDP also prevents such devices from affecting the remote sessions. RDP also blocks the redirection of USB smart cards for remote sessions. This restriction does not apply to PCoIP.
  • VMware PCoIP redirects the console session so that local HIDs and USB devices can be connected to remote desktop sessions. You must use PCoIP as the display protocol for a desktop if you want to redirect HIDs and USB devices for the console session.
  • For View Agent on Vista or Windows 7 systems, Windows Mobile Device Center (WMDC) can prevent the redirection of USB devices for RDP sessions. This restriction does not apply to PCoIP or RGS.

Resolution

You must first find out the class GUID and the vendor and product ID of the devices that are plugged into the client. You can then use these values to configure redirection filters for the computer on which you want to run View Client.

Note: You must have installed the full version of View Client on the computer, and you must have plugged in the devices that you want to include or exclude from being available for redirection.

You can use Device Manager to find out the class GUIDs as well as the vendor and product ID of devices. However, for some devices you might have to look in the View Client log file for this information.

Windows Clients

To find out the class GUID and the vendor and product ID of connected devices from Device Manager:
  1. On the computer where you have installed View Client, open Device Manager.
  2. Browse to the selected device, right-click it, and click Properties.

    Note: Ensure you choose the correct device. Redirecting a mouse or keyboard disconnects it from your client machine.

  3. Click the Details tab and select the available options:
    • Select Device class GUID from the dropdown, and record the value of the class GUID that is displayed within curly brackets.

      Example: If the displayed value is {50DD5230-BA8A-11D1-BF5D-0000F805F530}, make a note of the 50DD5230-BA8A-11D1-BF5D-0000F805F530 portion.

    • Select Hardware IDs from the dropdown, and record the Vid_<xxxx<&Pid_<xxxx> portion of the displayed value.

      Example: If the displayed value is USBVid_08e6&Pid_3437&Rev_0100, make a note of the Vid_08e6&Pid_3437&Rev_0100 portion.

Device Manager might not display the class GUID and vendor and product IDs for all devices. In that case, you can find out these values from the View Client log file.

Note: Make a backup of the registry before making any changes to it.

To find out the class GUID and the vendor and product ID of connected devices from the View Client log file:
  1. On the computer where you have installed View Client, open Registry Editor.
  2. Browse to the key HKLMSoftwareVMware, Inc.VMware VDMTraceEnabled. (

    Note: If this key is not present, then you must create it.

  3. Set the value of TraceEnabled to True.
  4. Exit Registry Editor.
  5. Start View Client and then exit it.
  6. Examine the contents of the log file ( debug-yyyy-mm-dd-xxxxxx.txt). The log file is located at:
    • Windows XP – C:Documents and Settings%username%Local SettingsApplication DataVMwareVDMLogs
    • Windows Vista/Windows 7 – This is located in C:UsersAll UsersVMwareVDMlogs
  7. In the log file, locate the DEVICE entries for the connected devices.
  8. Make a note of the values of CLASSGUID as well as of the vendor and product ID portion of HARDWAREID for each device.
  9. Set the value of TraceEnabled in the registry to False when you have obtained the device entries that you need.

Example: This is the entry in the log file for a USB smart card reader:

DEVICE =
DEVICEID = “USBVID_08E6&PID_34375&8AFA75C&0&1”
SERVICE = “GTwinUSB”
DEVICEDESC = “USB Smart Card Reader”
CLASS = “SmartCardReader”
CLASSGUID = “50DD5230-BA8A-11D1-BF5D-0000F805F530”
DRIVER = “{50DD5230-BA8A-11D1-BF5D-0000F805F530}009”
FRIENDLYNAME = “”
LOCATION_INFORMATION = “USB SmartCard Reader”
DEVTYPE = “”
HARDWAREID = “USBVid_08e6&Pid_3437&Rev_0100”
COMPATIBLEIDS = “USBClass_0b&SubClass_00&Prot_00”
VID = “08E6”
PID = “3437”
VENDOR = “Gemplus”
PDO_NAME = “DeviceUSBPDO-12”
ALLCLASSGUIDS = “50DD5230-BA8A-11D1-BF5D-0000F805F530”

The class GUID for the device is 50DD5230-BA8A-11D1-BF5D-0000F805F530. The vendor and product ID is Vid_08e6&Pid_3437. Some composite devices have multiple class GUIDs for their various components. USB redirection treats all class GUIDs for a single device as being equivalent.

After obtaining the class GUID and the vendor and product ID of the devices that are plugged into the client, you can use the values to configure redirection filters for the computer on which you want to run View Client.

Note: Make a backup of the registry before making any changes to it.

To exclude certain device classes or individual devices from being available for redirection, or to make individual devices available for redirection:
  1. On the computer where you have installed View Client, open Registry Editor.
  2. Browse to the key HKLMSoftwareVMware, Inc.VMware VDMUSB.
  3. (Optional) To exclude a class of device from being available for redirection, create a new Multi-String value named ClassFilters if it does not already exist, and add the class GUID value to the ClassFilters key. To exclude all device classes, specify a single hyphen character ( -) for the value.

    Note: A blank or non-existent entry for ClassFilters is equivalent to specifying the smart card reader class GUID ( 50DD5230-BA8A-11D1-BF5D-0000F805F530). Specifying a hyphen ( -) in ClassFilters to exclude all devices class GUIDs or specifying any other class GUIDs to ClassFilters has the side effect of making smart card readers available for redirection.

    In View 3.1.x, add the smart card reader class GUID to ClassFilters to exclude smart card readers.

    In View 4.1, you can set the registry value HKLMSoftwareVMware, Inc.VMware VDMUSBAllowSmartcards to true to include smart card readers. By default, this value is set to false.

  4. (Optional) To exclude an individual device from being available for redirection, create a new Multi-String value named HardwareIDFilters if it does not already exist, and add the vendor and product ID value for the device to HardwareIDFilters.
  5. (Optional) To make an individual device available for redirection, create a new Multi-String value named AllowHardwareIDs if it does not already exist, and add the vendor and product ID value for the device to AllowHardwareIDs. This makes the device available for redirection, even if you have excluded its device class.
  6. Exit Registry Editor.
  7. Open the View Client, connect to the desktop, and test the configuration by attempting to redirect the devices to the desktop.

Example: A HardwareIDFilter or AllowHardwareID entry for a USB device that has VID 08E6 and PID 3437 is VID_08E6&PID_3437.

Linux Clients

To identify the vendor and product ID on a Linux client, log in as root and run the lsusb command. This command lists all USB device details including the vendor and product IDs.
  • To exclude a USB device, run this command:

    vmware-view –usb=exid:<usb1>,<usb2>

    where <usb1> and <usb2> are the USB devices to be excluded.

    Example:

    vmware-view –usb= exid:vid169apid3184,vid148fpid2770

  • To include a USB device, run this command:

    vmware-view –usb=inid:<usb1>,<usb2>

    where <usb1> and <usb2> are the USB devices to be excluded.

    Example:

    vmware-view –usb=inid:vid0x160apid0x3184,vid0x148fpid0x2770

Note: The lsusb command shows the vid and pid in the hexadecimal format without the leading 0x. When using vid and pid, be sure to prefix them with 0x.


Copyright 2021. All rights reserved.

Posted September 29, 2011 by Timothy Conrad in category "Virtualization

About the Author

If I were to describe myself with one word it would be, creative. I am interested in almost everything which keeps me rather busy. Here you will find some of my technical musings. Securely email me using - PGP: 4CB8 91EB 0C0A A530 3BE9 6D76 B076 96F1 6135 0A1B