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.

Category: Virtualization | Comments Off on VMWARE: VMWARE View and USB issues – configuration
September 28

VMware: View 4.5 Command Line Usage

Launching commands for View Client.

-desktopName XXX Desktop to autostart
-domainName XXX Domain for server login
-file XXX File with additional command line parameters
-languageId XXX LCID of language to use (if available), e.g. 0×409 for English
-nonInteractive Suppress error message boxes for fully scripted startup
-password XXX Password for server login
-smartCardPIN XXX PIN for smart card login
-desktopProtocol XXX Attempt to use the specified desktop display protocol
-desktopLayout XXX Specify desktop screen size (e.g. fullscreen, multimonitor, windowLarge, or windowSmall)
-serverURL XXX URL for the View Connection Server
-logInAsCurrentUser XXX Log in as current user (true or false)
-userName XXX User name for server login
-unattended Start in unattended mode. Connects to the entitled desktop without user interaction
-connectUSBOnStartup XXX Connect all USB devices to a desktop when it is launched (true or false)
-connectUSBOnInsert XXX Connect a USB device to the foreground desktop when the device is plugged in (true or false)
-printEnvironmentInfo Print information about the system
-rollback Rolls back a check out (need -desktopName)
-standalone UNSUPPORTED: To start an additional client instance for test
-confirmRollback Confirm rollback operation in non-interactive mode
-? Show this help

Install Properties:

INSTALLDIR=%ProgramFiles%VMware, Inc.VMware ViewClient
VDM_SERVER= or FQDN
DESKTOP_SHORTCUT=0 (0=Do not create shortcut on desktop, 1=Create shortcut)
QUICKLAUNCH_SHORTCUT=0 (0=Do not create quick launch shortcut, 1=Create shortcut)
STARTMENU_SHORTCUT=0 (0=Do not create start menu shortcut, 1=Create shortcut)
REBOOT=”ReallySuppress” (Does not reboot after installation)

Beyond the properties it is also possible to select the features that will be installed during the installation process. The features names are: Core, MVDI, ThinPrint, TSSO, USB. The ‘Core’ feature is mandatory. Optionally you may select ALL to install all features available.

ADDLOCAL=Core, MVDI, ThinPrint, TSSO, USB or ALL

Legend:
Core = Essential components required
MVDI = Local Mode
ThinPrint = Print redirection
TSSO = Single Sign-On
USB =USB Redirection

Examples:

VMware-viewclient-x86_64-4.5.0-293049.exe /S /V /qn DESKTOP_SHORTCUT=0 VDM_SERVER={server_name} INSTALLDIR=”C:Program FilesVMwareVMware ViewClient” /l C:Logs VMware_Client45.log REBOOT=Reallysupress

VMware-viewclient-x86_64-4.5.0-293049.exe /s /v”/qn VDM_SERVER={server_name}ADDLOCAL=All”

VMware-viewclient-x86_64-4.5.0-293049.exe /s /v /qn RebootYesNo=”No” REBOOT=”ReallySuppress” VDM_SERVER={server_name} ADDLOCAL=Core,TSSO,USB DESKTOP_SHORTCUT=1 STARTMENU_SHORTCUT=1

For silent installs is is important to make sure the user logged has elevated privileges to install the client. Using Group Policies you should change the Local Computer and User Policies to use “Always Install with elevated privileges” for Windows Installer.

Local Computer Policy->Computer Configuration->Administrative Templates->Windows Installer->Always Installwith elevated privileges
Local Computer Policy->User Configuration->Administrative Templates->Windows Installer->Always Installwith elevated privileges

Option names are case insensitive.

VMware View Agent 4.5 command line usage

View Agent can also be heavily customised and allows you to select what components should be installed.

/a performs an administrative install
/a patches an existing administrative install
/s hides the initialization dialog. For silent mode, use /s /v /qn
/qb display the wizard pages in a noninteractive, automated installation
/v indicates parameters to pass to the installer
/c cleans out installation registration information
/l performs detailed logging
/l performs detailed logging
/l*v

Install Properties:

DESKTOP_SHORTCUT=0 (0=Do not create shortcut on desktop, 1=Create shortcut)
VDM_SERVER= or FQDN
VDM_SERVER_USERNAME=admin.companydomain.com
VDM_SERVER_PASSWORD=secret
INSTALLDIR= %ProgramFiles%VMware, Inc.VMware ViewAgent
(Specifies an alternative installation path for the View component)
RDPCHOICE=0 (0=Leave RDP settings as they are, 1=Enable RDP)
REBOOT=”ReallySuppress” (Does not reboot after installation)

Beyond the properties it is also possible to select the features that will be installed during the installation process. The features names are: Core, HPRGS, SVIAgent, ThinPrint, ThinPrintPCoIP, PCoIP, VMVideo, VmwAudio, SmartCard, USB, VPA, VMCI. The ‘Core’ feature is mandatory. Optionally you may select ALL to install all features available.

ADDLOCAL=Core,GINA,HPRGS,SVIAgent,USB,USB32,PCoIP,ThinPrint or ALL

Utilising the /v parameters it is possible to pass commands to the installer

/v”INSTALL_TERAAUDIO=1” UNSUPPORTED
(this command installs a PCoIP 2-way bidirectional audio driver)
/v”VDM_VC_MANAGED_AGENT=0”
(0=Unmanaged, 1=Managed )

The installation creates:

The View Agent installation log (%TEMP%vminst.log_date_timestamp)
The MSI installation log (%TEMP%vmmsi.log_date_timestamp)

Legend:
Core = Essential components required
GINA = GINA chaining
MVDI = Local Mode
TSSO = Single Sign-On
USB =USB Redirection
HPRGS = HPRGS display protocol
SVIAgent = VMware View Composer
ThinPrint = Print redirection
ThinPrintPCoIP = Print redirection in PCoIP
PCoIP = PCoIP display protocol
VMVideo = ?
VmwAudio = ?
SmartCard = Hum….. don’t need explanation
VPA = ?
VMC = Allow disabling of VMCI devices (http://www.vmware.com/support/developer/vmci-sdk/)

Examples:

VMware-viewagent-4.5.0-293049.exe /s /v”/qn VDM_VC_MANAGED_AGENT=1 ADDLOCAL=ALL”

VMware-viewagent-4.5.0-293049.exe /s /v”/qn REBOOT=Reallysupress ADDLOCAL=Core,GINA,HPRGS,SVIAgent,USB,USB32 VDM_SERVER={server_name} /l*v “”%TEMP%vmmsi.log”””

VMware-viewagent-4.5.0-293049.exe /s /v”/qn VDM_VC_MANAGED_AGENT=0 VDM_SERVER_NAME={server_name} VDM_SERVER_USERNAME=admin.companydomain.com VDM_SERVER_PASSWORD=secret ADDLOCAL=core,GINA,ThinPrint,USB”

View Connection Server

View Connection Server does not offer many features or properties but it is possible to select the basic options for automated installations.

INSTALLDIR= %ProgramFiles%VMware, Inc.VMware ViewServer
VDM_SERVER_INSTANCE_TYPE=1
(1=standard, 2=replica, 3=security server, 4=transfer server)
FWCHOICE=1 (Set to 1 to configure firewall or 2 to skip it)

The following properties are only applicable to View Replica Servers (VDM_SERVER_INSTANCE_TYPE=2)
ADAM_PRIMARY_NAME= or FQDN
ADAM_PRIMARY_PORT=Port Number

Example:

VMware-viewconnectionserver-4.5.0-293049.exe /s /v”/qn VDM_SERVER_INSTANCE_TYPE=1″

VMware-viewconnectionserver-4.5.0-293049.exe /s /v”/qn VDM_SERVER_INSTANCE_TYPE=2 ADAM_PRIMARY_NAME={server_name}”

There are also installation features and options available for the Security Server, View Composer and Transfers Server but I will cover those in a future post with some additional information about Transfer Server.

Category: Virtualization | Comments Off on VMware: View 4.5 Command Line Usage
September 2

Veeam: Recovering from a failed backup server to a new server

If your Veeam server has crashed for whatever reason and you are unable to get it running again, it is possible to restore the DB to another Veeam server.  The main reason to restore the old DB is to keep from losing all of your backup jobs and the setup work you have already accomplished.

In my senario, my crashed Veeam server (Veeam01) was a virtual machine in VMWARE using SQL Express.
Here were my recovery steps:
1. Create a new virtual server to be the replacement Veeam server.  Veeam02
2. Mount the VMDK where the Veeam DB was stored from Veeam01 on to Veeam02
3. After mounting the VMDK go into Computer Management – Disk Management
4. Most likely your attached drive will show as foreign and offline
5. Right click on the offline drive and click to bring it online
6. If it is still not available, right click on it again and import the foreign disk
7. Assign the disk a drive letter if one was not assigned automatically.  Eg. X:
8. Create a temporary directory.  C:tem
9. Go to X:program files (x86)Microsoft SQL ServerMSSQL.1MSSQLData
10. Copy the files: VeeamBackup.mdf and VeeamBackup_log.LDF to C:tem
11. At this point you are done with the attached VMDK
12. Completely install Veeam Backup as a brand new installation allowing it to create a new instance of SQLExpress
13. Shutdown the following services:
Veeam vPower NFS Service
Veeam Indexing Service
Veeam Backup Service
SQL SERVER VSS Writer
SQL Server (Veeam)
14. Copy the files: VeeamBackup.mdf and VeeamBackup_log.LDF from C:tem to C:program files (x86)Microsoft SQL ServerMSSQL.1MSSQLData (or whereever you install the SQL Express DB) and replace the current files.
15. Restart the service that were previously stopped
Veeam vPower NFS Service
Veeam Indexing Service
Veeam Backup Service
SQL SERVER VSS Writer
SQL Server (Veeam)
16. Uninstall Veeam Backup and Recovery from the server
17. Reinstall Veeam Backup, but this time you will select an existing instance of the server.  Make certain it is pointing to VeeamBackup as its DB.
18. Once the install has finished start the Veeam backup software
19. If you are using service account passwords in any of the jobs you will need to go into each job and retype the password.  I am not sure why, but this is what I had to do.
20. As a final note make certain you have reattached any external drives that were attached to Veeam01 to Veeam02.  These drives need to be atttached, brought online, imported, and reassigned the same drive letter that they were originally assigned in order for your jobs to continue to store the backups in the same location as before.

 

Category: Virtualization | Comments Off on Veeam: Recovering from a failed backup server to a new server