Procedure: how to assign a xendesktop virtual desktop to a specific client

In certain circumstances, the need may arise to assign a specific XenDesktop virtual desktop to a specific client (thin or thick). For instance, certain applications require the ability to know the location where a transaction has occurred. In most XenDesktop deployments the virtual desktops are pooled and assigned randomly to users. In this scenario the application knows only of the ip address and host name of the randomly assigned virtual desktop and not of the underlying client and therefore does not know the location. By tying the virtual desktop to the client, the location can be mapped.

There is often the requirement in a teaching lab for a group of users to be able to log on to multiple thin clients using the same login credentials. By assigning the virtual desktop to the thin (or thick) client rather than the user, this can be accomplished.

In order to assign a virtual desktop to a client in a XenDesktop/Provisioning Server environment the desktops must be part of a “private” type XenDesktop catalog.

Step 1: Create the streamed xendesktop virtual desktops via provisioning server

In the Provisioning Server console, right-click on the site name and select “Streamed VM Setup Wizard”.

Select next:

Fill in the XenServer host name and username and password and click next:

Select an existing XenServer template and select next:

Select an existing Provisioning Server collection and the corresponding vDisk:

Select the number of virtual machines to create and the options:

Select the Domain, OU and naming scheme for the virtual desktops:

Then click next and finish:

Step 2: create a “private” type catalog in xendesktop studio

In order to assign a virtual desktop to a client in a XenDesktop/Provisioning Server environment the desktops must be part of a “private” type XenDesktop catalog.

From the machines node in Desktop Studio, right-click and select “create catalog”:

The catalog type must be one that is deemed “private”. For Provisioning Server desktops you must select “existing”. For XenDesktop MCS desktops this could be “pooled static” or “dedicated”.

Select “add vm’s”:

Select the vm’s you created in the previous step:

 

Browse Active Directory for the computer name and DO NOT put in a username:

Add the administrators:

Add the catalog name and finish:

step 3: create a new desktop group and add the machines

From the assignments node in Desktop Studio, right-click assignments and select “Create Desktop Group”:

Select the catalog from the previous step and the number of machines to add to the new group:

VERY IMPORTANT: DO NOT ADD ANY USERS – these desktops will be assigned to a client in the next step:

 

Assign the administrators and finish:

step 4: assign the virtual desktops to a client ip address

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.*

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\MACHINENAME -AssignedIPAddress 10.10.20.7

In the above example, anyone who logs on using the client device with IP address 10.10.20.7 now always receives the desktop named “DOMAIN\MACHINENAME”.