Citrix Receiver Usb

Posted on  by admin
downloadWhy can't I download this file?Citrix Receiver Usb

This article provides a resolution when the USB scanner, printer, or other USB devices do not show up in the ICA session.

  • XenServer

Objective

This article describes the method to configure USB Pass-through with XenServer.

Instructions

XenServer 7.5 supports passing through individual, physical USB devices to a VM, instead of the whole USB controller. This allows users to use the physical USB device as a local USB device inside the VM.
In this article, we provide steps to configure USB Pass-through with XenServer. Before proceeding, pay attention to the following requirements and restrictions:
  • USB pass-through is supported only on the following HVM guests:
    • Windows
      • Windows 7 SP1
      • Windows 8.1
      • Windows 10
      • Windows Server 2008 SP2
      • Windows Server 2008 R2 SP1
      • Windows Server 2012
      • Windows Server 2012 R2
      • Windows Server 2016
    • Linux
      • RHEL 7
      • Debian 8
  • XenServer 7.5 and above
  • XenServer Enterprise Edition (or access to XenServer through a XenDesktop/XenApp entitlement)
  • Ensure that the USB device to pass-through is trustworthy and can work stably in normal Linux environment (for example, CentOS 7). Plugging in untrustworthy USB devices to your computer may put your computer at risk. USB devices with modifiable behavior should only be assigned to trustworthy guest VMs.
  • BIOS must not be booted from USB devices.
  • USB pass-through must use qemu-upstream as the backend.
  • USB pass-through supports a maximum of 6 USBs to be passed through to a single VM.
  • Snapshot/Suspend/ Pool Migrate/ Storage Migrate operations are not supported when USB device is passed through to VM.
  • USB device pass through is blocked in a VM if HA is enabled on the pool and the VM has restart priority as “Restart”. The USB attach button is disabled and the following message is displayed: 'The virtual USB cannot be attached because the VM is protected by HA'. When configuring HA for a pool, if a VM is not agile, the “Restart” option is disabled with the following tooltip: 'The VM has one or more virtual USBs. Restart cannot be guaranteed'.

How to configure USB Pass-through with XenServer

Customers can configure USB Pass-through using XenCenter or the xe CLI, please perform the following steps to configure.
  • To configure USB Pass-through using XenCenter.

  1. Plug the USB devices to the XenServer host with Enterprise Edition license (or access to XenServer through a XenDesktop/XenApp entitlement). Then the USB tab appears in XenCenter with USB devices listed.
  1. ​Enable passthrough for a specific USB device.
  • To enable by using XenCenter, go to USB tab > choose the specific USB device > click Enablepassthrough > choose Yes, Enable passthrough on the pop up window:
  1. Shut down the target guest VM that you want to pass the USB device through since hot plug is not supported.
  2. Attach the USB device to the VM.
  • To attach by using XenCenter, right click the VM, go to Properties > go to USB > click Attach > choose the specific USB device you want to attach > click Attach:
And click OK to finish.

Note that you can attach multiple USB devices to a single VM, the maximum number of USB devices supported is 6.
  1. Start the VM to pass-through the USB device to the VM.
Note that you may need to install the device driver inside the VM for the device to work properly. With proper driver, you’ll be able to see the device from system Device Manager working properly.
  • To enable by using xe CLI

  1. Plug the USB devices to the XenServer host with Enterprise Edition license (or access to XenServer through a XenDesktop/XenApp entitlement).
  2. Run following command to enable passthrough for a specific USB device
xe pusb-param-set uuid=<pusb_uuid> passthrough-enabled=<true/false>

Check the following as an example, firstly get pusb uuid from command pusb-list and then enable passthrough through command pusb-param-set.

Citrix Receiver Usb
[[email protected] ~]# xe pusb-list
uuid ( RO) : 9c14c8b3-f30b-b5b8-2b01-201f703d2497
path ( RO): 2-1.6
vendor-id ( RO): 1f75
vendor-desc ( RO): Innostor Technology Corporation
product-id ( RO): 0903
product-desc ( RO):
serial ( RO): 000000000000000244
version ( RO): 2.10
description ( RO): Innostor Technology Corporation_000000000000000244
uuid ( RO) : 10fbec89-4472-c215-5d55-17969b473ee6
path ( RO): 2-1.1
vendor-id ( RO): 0781
vendor-desc ( RO): SanDisk Corp.
product-id ( RO): 5591
product-desc ( RO):
serial ( RO): 4C530001151223117134
version ( RO): 2.10
description ( RO): SanDisk Corp._4C530001151223117134
[[email protected] ~]# xe pusb-param-set uuid=10fbec89-4472-c215-5d55-17969b473ee6 passthrough-enabled=true
  1. Shut down the target guest VM that you want to pass the USB device through since hot plug is not supported.
  2. Attach the USB device to the VM, run the following command:
xe vusb-create usb-group-uuid=<usb_group_uuid> vm-uuid=<vm_uuid>

Check the following as an example, firstly get usb-group uuid from command usb-group-list and then attach the device to target VM through command vusb-create.

[[email protected] ~]# xe usb-group-list PUSB-uuids=10fbec89-4472-c215-5d55-17969b473ee6
uuid ( RO) : 1f731f6a-6025-8858-904d-c98548f8bb23
name-label ( RW): Group of 0781 5591 USBs
name-description ( RW):
...
[[email protected] ~]# xe vusb-create usb-group-uuid=1f731f6a-6025-8858-904d-c98548f8bb23 vm-uuid=4feeb9b2-2176-b69d-b8a8-cf7289780a3f
aac4a96f-3fd9-0150-7138-fbd5a80e068a
  1. Start the target guest VM.

Detach the USB device from the VM

You can detach the USB device from the VM when VM is running:

  • To detach by using XenCenter, right click the VM, go to Properties > go to USB > choose the USB device you want to detach > click Detach and click Yes on the pop up window:
  • To detach by using xe CLI, run the following commands:
xe vusb-unplug uuid=<vusb_uuid>(Unplugs USB from VM)
xe vusb-destroy uuid=<vusb_uuid> (Removes the VUSB list from VM)
[[email protected] ~]# xe vusb-unplug uuid=79d2953d-839d-e26f-501c-885b728a4f70
[[email protected] ~]# xe vusb-destroy uuid=79d2953d-839d-e26f-501c-885b728a4f70

Additional Resources

How to troubleshoot XenServer USB Passthrough related issues
At times the default Emulation of USB parameter of VMs is set to False.So, during those cases, we will not be able to start the VMs after attaching the USB.
The VM start will fail with error ' The server failed to handle your request, due to an internal error. The given message may give details useful for debugging the problem.
message: xenopsd internal error: Device_common.QMP_Error(26, '{'error':{'class':'GenericError','desc':'Bus 'usb-bus.0' not found','data':{}},'id':'qmp-000018-26'}')

To fix this you need to run the below command and then attach the USB.
xe vm-param-set uuid=<vm_uuid> platform:usb=True

Environment:

  • Server: XenApp 6, Windows Server 2008 R2
  • XenDesktop Controller: XenDesktop 5.6
  • Client: Various (Windows 7 Embedded TC, Windows 7 PC)

Two types of redirection supported for imaging devices:

  • TWAIN redirection (XenApp, XenDesktop)
  • USB Redirection (XenDesktop only) NOTE: XenApp does support USB Redirection, but not for Image Scanners. For details on USB devices supported by XenApp, refer to CTX816193.

Citrix Receiver Usb Download

TWAIN Redirection [more]

  • The imaging device must be connected locally to the user device and have the associated vendor-supplied TWAIN driver installed
  • Citrix online plug-in 11.x or later or the Citrix offline plug-in
  • XenAppXenDesktop 32-bit and 64-bit OSes support TWAIN redirection for 32-bit TWAIN applications only. XenApp does not support 16-bit TWAIN drivers
  • Citrix Policies (XenAppXenDesktop): The Client TWAIN device redirection policy setting must be added to the appropriate policy. To configure image compression, add the TWAIN compression level setting and select the appropriate compression level.
    • User Policy
    • Enabled by default
  • PROCESS: To capture an image, users connect to a server from a client machine that has an imaging device and the associated vendor-supplied TWAIN driver installed locally. When the TWAIN application is run from within this session, the application detects and interacts with the client-side device using a DLL hook process that communicates with the driver on the local client.
  • TWAIN Redirection troubleshooting: CTX107411

Citrix Receiver Install

  • When redirecting USB devices, the endpoint client device must first recognize the USB device to have it mapped to the session. If the device requires a special driver, it must be installed on both the client machine, as well as the Virtual Desktop Agent (VDA) machine. The device can still be mapped without the driver as long as the endpoint recognizes it, but it will not function as expected until the driver is installed on the VDA machine.
    NOTE: In some cases, installing the driver locally can break USB redirection. If the driver does not allow the device to be released for redirection, the VDA may not be able to communicate with the device.
    • When a device is detected, you can view the properties of the device via device manager or 'Printers and Devices'
    • It is important to determine the devices vendor ID (VID) and product ID (PID) as well as the device’s Class. This information is usually found on the details tab of the properties of the device.
    • Here is an example of a USB device and its defined properties:
      • Property = Hardware IDs (VID = 095D, PID = 9205)
      • Property=Compatible IDS (Class=01)
  • Certain USB classes are blocked by default because they are used mainly only on local workstations. When some devices, such as a smartcard, Keyboard or Mouse, are connected, they will be connected by one of the predefined standard channels. Therefore, these types of devices are blocked by default for the USB channel as their functionality is required on the local endpoint
    • Communications and CDC Control (Classes 02 and 0a)
    • Human Interface Devices (Class 03)
    • USB Hubs (Class 09)
    • Smart Card (Class 0b)
    • Wireless Controller (Class e0)
  • Certain USB classes are allowed by the default USB policy rules
    • Audio (Class 01)
    • Physical Interface Devices(Class 05)
    • Still Imaging (Class 06)
    • Printers (Class 07)
    • Mass Storage (Class 08)
    • Content Security (Class 0d)
    • Video (Class 0e)
    • Personal Healthcare (Class 0f)
    • Application and Vendor Specific (Classes fe and ff)
  • Components of USB Redirection
    • Receiver – Citrix Client used to connect to XenDesktopXenApp
      • Citrix Remote USB Device Driver (intercepts devices normal driver)
      • Configured by four methods
        • Desktop Viewer Toolbar (user)
          • Preferences must be set to Connect All or Ask each time to be presented with device on XenDesktop
        • Connection Center (user)
          • Session Security > USB Device must be set to Ask Permission or Full Access
        • GPO Computer or User policies (admin)
          • Configures settings mentioned above
          • Also setting for USB Device Rules
            • Allows for blocking or allowing devices based off VID, PID and Device Class
        • Registry (admin)
          • Devices can be automatically redirected by adding the VID and PID information into a registry key. See this article for details: CTX123015
    • VDA (Virtual Desktop Agent) – XenDesktop VM
      • Citrix Remote USB Host Controller (communicates with USB Device Driver)
      • Citrix USB Service (handles additionremoval of devices, monitors devices)
      • Configured by:
        • HDX Policy via XenDesktop Controller (admin)
          • Client USB device redirection policy must be enabled (disabled by default)
          • USB Device Rules
            • Allows for blocking or allowing devices based off VID, PID and Device Class
    • Troubleshooting
      • HDXMonitor Tool (runs on VDA) – Real time status on USB device connection, provides network performance stats, reports active USB rules in place, delivers USB filtered event log messages http://hdx.citrix.com/hdx-monitor
      • When using USB redirection for an imaging device, TWAIN redirection must be disabled. If the scanner is TWAIN compliant, the VDA will not be able to communicate with the device since the TWAIN redirection process is using the device. In my case, I received a message that it the device was “busy or in use”.
      • In my case, there also seemed to be an issue with Citrix Receiver 3.0 (online plug-in v13). Downgrading to v 12.3 of the online plug-in or upgrading to version 3.3 (online plug-in v13.3) fixed the USB redirection issue.