This article describes how to configure XenDesktop to deliver desktops in a teaching lab or classroom environment.
The typical requirement in a teaching lab is for a group of users to be able to log on concurrently to multiple thin clients using the same user name and password and for each to receive their own desktop.
While XenDesktop allows the user account concurrent access to multiple desktops within a group, this does not meet the preceding requirement because when the user logs on to the client, multiple desktops are presented from which the user must reliably select ‘their’ desktop (rather than taking an already in-use desktop of another user). In addition, this defeats automatic logon processing that requires only a single desktop to be available.
XenDesktop offers a solution to this issueby allowing a desktop to be permanently assigned to a client IP address or NetBIOS name. Using this approach, each client device in the teaching lab can be assigned a specific desktop within the XenDesktop site. This allows each client to see a single fixed desktop, and each to be used independently by users who log on with the same credentials.
Note: You MUST use the Desktop Appliance Lock in order for the NetBIOS name to be returned to XenDesktop. If you do not use the Desktop Appliance Lock, the NetBIOS name will not be returned, so allocation of machines to NetBIOS names will not function as expected.Note: For XenDesktop 7.x Preparation - Steps 1, 2, and 4 should be as per the existing CTX article. Step 3 is specific to XenDesktop 7.x
Create private group.
Add machine(s) to group.
Set policies for XenDesktop 7.x with the PowerShell cmdlets:
Get-BrokerDesktopGroup …
Get-BrokerAccessPolicyRule –DesktopGroupUid <uid> | Set-BrokerAccessPolicyRule –AllowedUsers AnyAuthenticated
Get-BrokerAssignmentPolicyRule –DesktopGroupUid <uid> | Set-BrokerAssignmentPolicyRule –Enabled $false
Assigning a desktop to a specific client IP address or NetBIOS name cannot be performed entirely through Desktop Studio. However, Citrix recommends you to use Desktop Studio for bulk configuration as described in the following sections. This ensures that Desktop Studio is able to manage the machines after they have been configured.
From the Machines node of Desktop Studio, create a new Catalog for the machines to be used to provide desktops in the lab. The type of the catalog must be one that permanently allocates machines to the users (even though this will not occur here). Which specific catalog type is used depends on your virtual machine power and image management requirements; however Pooled-Static or Dedicated catalogs are likely to be typical choices.
Add the required machines to the new catalog; do not assign any users to the machines.
From the Assignments node of Desktop Studio, create a new Desktop Group and add the machines from the new catalog to it. On the Select users page of the dialog, do not add any users. Instead, click Next.
On a computer with the XenDesktop Broker SDK Snap-in registered (for example, the machine running Desktop Studio), open a PowerShell window and enter Add-PSSnapin Citrix.Broker.Admin.*
Note: Processing now depends on whether the desktops are to be assigned to client IP addresses or NetBIOS names.
To assign a Desktop to a Client IP Address, run the following SDK command, providing the required desktop name and the IP address of the client device to which it is being assigned:
Set-BrokerPrivateDesktop DOMAIN\MACHINE_A -AssignedIPAddress 10.11.132.7
In the preceding example, anyone who logs on using the client device with IP address 10.11.132.7 now always receives the desktop named ‘DOMAIN\MACHINE_A’.
To assign a Desktop to a Client DNS Name, run the following SDK command, providing the required desktop name and the DNS name of the client device to which it is being assigned:
Set-BrokerPrivateDesktop DOMAIN\MACHINE_B -AssignedClientName client_b
In the preceding example, anyone who logs on using the client device with NetBIOS name ‘client_b’ now always receives the desktop named ‘DOMAIN\MACHINE_B’.
Note: Assigning desktops to a client NetBIOS name only functions correctly if the client device reports its true NetBIOS name to the XenDesktop broker service. Whether the correct NetBIOS name is supplied is a function of the client device/software in use; however:
Using a re-purposed client PC with the Desktop Appliance Lock installed does provide the correct NetBIOS name.
Using a Web browser to access Web Interface does not provide the correct NetBIOS name.
Note: The Broker Service performs a string comparison against the AssignedIPAddress/AssignedClientName entries for the desktop group to compare it to what the client machine is reporting the IP address/client name to be. Should you experience issues with the feature not working – you should enable CDF tracing for BrokerDAL component using CDFControl tool ( http://support.citrix.com/article/CTX111961 ) and look for entries similar to:
20/05/11 12:59:32.0110 : BrokerDAL:DAL >>> EnumerateResources(UserSid=S-1-5-21-3430261252-2596645165-1205625234-4242, 8 GroupSids, 0 DenyOnlySids, IP=10.20.30.40, Name=WINXP-CLIENT, ViaAG=False, GetIconHash=False, GetIconData=False)
20/05/11 12:59:32.0240 : BrokerDAL:DAL <<< EnumerateResources(UserSid=S-1-5-21-3430261252-2596645165-1205625234-4242): 1 resources
It is the two entries in bold (IP= and Name=) that are compared to what is stored in the AssignedIPAddress and AssignedClientName properties of the Desktop Group. Should a match be found, the <<< EnumerateResources line will end with 1 resources.
For example: If a match is not found, you typically see this returning as 0 resources.
The assignments of machines within the lab desktop group can be verified using the output of the following SDK command (this must be entered on a single line). Here, <GroupName> is the Desktop Group Name value of the Desktop Group created in Desktop Studio:
Get-BrokerDesktop –DesktopGroupName <GroupName> | ft -auto MachineName,AssignedIPAddress,AssignedClientName
Immediately after creation of a new Catalog and Desktop Group, the preceding command shows output of the following form:
MachineName AssignedIPAddress AssignedClientName ----------- ----------------- ------------------ DOMAIN\MACHINE1 DOMAIN\MACHINE2
MachineName AssignedIPAddress AssignedClientName ----------- ----------------- ------------------ DOMAIN\MACHINE1 10.20.32.14 DOMAIN\MACHINE2 10.20.32.16
Or, following assignment of desktops to client NetBIOS names, output might appear as:
MachineName AssignedIPAddress AssignedClientName ----------------- ------------------ DOMAIN\MACHINE1 client_1 DOMAIN\MACHINE2 client_2
A desktop can only be assigned to a user, a client IP address, or a client NetBIOS name; it cannot be assigned to more than one of these at the same time.
Use one of the following commands as appropriate to remove a client IP address or NetBIOS name assignment from a desktop:
Set-BrokerPrivateDesktop DOMAIN\MACHINE1 –AssignedIPAddress $null
Set-BrokerPrivateDesktop DOMAIN\MACHINE2 –AssignedClientName $null
Because Desktop Studio is used to create both the Catalog and the Desktop Group, either can subsequently be deleted safely using Desktop Studio if required.
You must ensure that the user account used for logons to client devices in the lab is not granted access to any other desktops using user assignment (or user group membership) otherwise, the clients are presented with multiple desktops when the user attempts to log on, which prevents the assignment scheme from working as desired.
Because Desktop Studio does not itself support assignment to IP address or NetBIOS name, it typically shows desktops configured in this way as unavailable, but at the same time, as not having an assigned user. However, actual user sessions appear correctly, and session management functionality works.