Download XenDesktop 5.x Advanced Labs_v1.5_DRAFT

Document related concepts

Extensible Storage Engine wikipedia , lookup

Serializability wikipedia , lookup

IMDb wikipedia , lookup

Microsoft Access wikipedia , lookup

Functional Database Model wikipedia , lookup

Oracle Database wikipedia , lookup

Btrieve wikipedia , lookup

Ingres (database) wikipedia , lookup

Database wikipedia , lookup

Concurrency control wikipedia , lookup

Microsoft Jet Database Engine wikipedia , lookup

SQL wikipedia , lookup

Open Database Connectivity wikipedia , lookup

Microsoft SQL Server wikipedia , lookup

Database model wikipedia , lookup

Relational model wikipedia , lookup

PL/SQL wikipedia , lookup

Clusterpoint wikipedia , lookup

ContactPoint wikipedia , lookup

Transcript
Services
XenDesktop 5 Advanced Concepts and
Architecture
Hands-on lab exercise guide
July 2012 - Version 1.5
Services
Table of Contents
Table of Contents .............................................................................................................................................. 2
Overview............................................................................................................................................................. 5
Exercise 1: Manually creating a XenDesktop 5.x site Database ................................................................. 6
Exercise 2: Database Access and Permissions ............................................................................................ 26
Exercise 3: Using PowerShell to reset the Controller services DB connection strings ........................ 40
Exercise 4: Monitoring & Supporting the XenDesktop Site Database ................................................... 49
Exercise 5: Configuring SQL Mirroring & testing failover ....................................................................... 78
Exercise 6: Monitoring MCS tasks using the XenServer console & PowerShell ................................. 112
Exercise 8: Machine Identity Agent Deep Dive ....................................................................................... 121
Exercise 9: Using XD Ping to Troubleshoot DDC & VDA settings.................................................... 133
Exercise 10: CDF Tracing ............................................................................................................................ 137
Exercise 11: Enabling Clear Text Logging for key Broker Services ...................................................... 143
Exercise 12: PortICA and VDA Logging .................................................................................................. 147
Exercise 13: Using WinRM.exe to troubleshoot Desktop Director Issues .......................................... 150
Exercise 14: Changing the WCF ports used for communication between DDCs and VDAs .......... 153
Exercise 15: Configuring a site to allow OU based registration to take place...................................... 171
Exercise 16: Configuring and managing XenDesktop 5 using PowerShell (Optional Exercise) ...... 184
Lab Notes: ...................................................................................................................................................... 186
Page 2
Services
.......................................................................................................................................................................... 186
Page 3
Services
.......................................................................................................................................................................... 187
Page 4
Services
Overview
Hands-on Training Module
This training module has the following details:
Objective

Provide in-depth experience with advanced XenDesktop 5 Concepts
& Troubleshooting techniques
Audience

Primary: XenDesktop administrators and support staff
Lab Environment Details
This section is used to describe the lab environment and the virtual machines that are used.
Machine
AD.training.lab (192.168.10.11)
Win7Client ((192.168.10.13)
DDC1_56 (192.168.10.14)
DDC2_56 (192.168.10.15)
PVS (192.168.10.16)
SQLServer (192.168.10.12)
SQLServer2 (192.168.10.17)
Win7VDA1 (192.168.10.18)
Win7VDA2 (192.168.10.19)
WinXPVDA (192.168.10.20)
Win7Master (192.168.10.21)
Details
Windows Server 2008 R2 Domain Controller
DNS/DHCP
SQL Express 2008 R2 + Management Studio
Windows 7 Endpoint Client
XenDesktop 5.6 Controller on Windows Server 2008 R2
XenDesktop 5.6 Controller on Windows Server 2008 R2
Provisioning Services 6.1.0 on Windows Server 2003 R2
SQL Server 2008 R2 on Windows Server 2008 R2
SQL Server 2008 R2 on Windows Server 2008 R2
Windows 7 with Virtual Desktop Agent installed
Windows 7 with Virtual Desktop Agent installed
Windows 7 with Virtual Desktop Agent installed
Windows 7 with Virtual Desktop Agent installed
Required Lab Credentials
Below are the login credentials required to connect to the workshop system and complete the lab
exercises.
Domain
Training
Training
Training
Training
Username
Administrator
User1
User2
SQLService
Password
Citrix123
Citrix123
Citrix123
Password1
Description
Domain Administrator
Standard User
Standard User
SQL Server Service Account
The local administrator password for each virtual machine is citrix.
Page 5
Services
Exercise 1: Manually creating a XenDesktop
5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
Action
Launch Desktop Studio from the desktop shortcut and select Desktop deployment
from center pane:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
3.
Action
Use the screenshot below as reference when entering the Site information and click
“Generate database script…”
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
4.
Action
Save both scripts to the desktop of DDC1_56
Note: Two scripts are generated:
5.
1.DB creation script (save as creation.txt)
2.DB mirroring script (save as mirroring.txt)
Copy the DB creation script to \\SQLServer\c$
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
6.
Action
Logon to the SQLServer VIRTUAL MACHINE as training\administrator with
password Citrix123 and launch SQL Server Management Studio by double clicking the
icon on the desktop and Click Connect:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
Browse to the root of the C:drive on SQLServer and open the db creation script
previously copied from DDC1_56
Click format  Word Wrap and review the information at the beginning of the script:
The following key information is provided:
1.The script needs to be run using SQLCMD from the command line or from SQL
Server Management Studio in SQLCMD mode.
2. Before running the script, an empty database named CitrixXenDesktopDB needs to
be created using the Latin1_General_CI_AS_KS collation.
Note: SQL 2008 R2 default collation is SQL_Latin1_General_CP1_CI_AS
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
8.
Action
Right click on the Databases node and select New Database
On the General Tab enter CitrixXenDesktopDB as the Database name and leave all
other values as default:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
Action
Click on the Options Tab and select the following:
Collation: Latin1_General_CI_AS_KS
Recovery model: Simple
Compatibility level: SQL Server 2008 (100)
Click OK to create the Database
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
Action
Highlight the newly created CitrixXenDesktopDB database  right click and choose
“New Query”
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
11.
Action
Click Query from the file menu and select SQLCMD Mode
Note: a depressed icon will confirm that SQLCMD Mode is enabled
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
12.
Action
Copy and paste the entire contents of the DB creation script into the new query
window  click Execute to run script:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
13.
Action
Verify that the creation Script completes successfully. Check messages tab for
confirmation. If any errors are returned check the following before running the script
again:
1.Query is being run against the correct Database i.e. CitrixXenDesktopDB (see drop
down box)
2.Database collation is set correctly to Latin1_General_CI_AS_KS
3.SQLCMD Mode is enabled (depressed icon)
4.Database is named correctly (right click on database and select rename if typo exists)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
14.
Action
Verify that the various Schemas have been created by clicking on the
CitrixXenDesktopDB database and expanding the Tables node
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
15.
Action
Navigate to CitrixXenDesktopDB\Programmability\Stored Procedures  right
click on chb_Config.GetSchemaVersion and select Execute Stored Procedure 
click OK
Exercise 1: Manually creating a XenDesktop 5.x site Database
Note: Database Schema version = 5.6.0.0
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
16.
17.
Action
Switch back to the DDC1_56 virtual machine (Logon again if necessary training\administrator with password Citrix123)
Now that the XenDesktop database has been manually created  click next on the Site
page of the Desktop Deployment wizard
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
18.
Action
Complete the Licensing section using the screenshot below as reference
Enter ad.training.lab:27000 for the License Server  click Connect  leave Citrix
XenDesktop Enterprise selected as the licensed product and click Next
Exercise 1: Manually creating a XenDesktop 5.x site Database
.
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
19.
Action
Complete the Connection section using the Host connection details provided by your
trainer.
Note: Do not use 108.168.156.72 as the address of your Host. This is used below as an
example only.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
Note: The connection name will appear in Desktop Studio under the connections node
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
and is essentially a combination of Host Type and connections details (address and
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
credentials) - Name accordingly.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
20.
Action
Complete the Host section as per the screenshot below and click Next:
Host name: Xenserver
Network: Internal
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
21.
Action
Complete the Storage section using the screenshot below as reference and click Next:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
22.
Action
Review the configuration summary before clicking Finish to complete the initial
configuration:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
23.
Action
Click on the Powershell tab and click Launch PowerShell to bring up a PoSH
instance with the XD5 snap-ins/cmdlets pre-loaded:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
24.
Action
Observation (no requirement to complete the following step): An XD admin can
also create individual DB creation scripts for each service directly via PowerShell if
required
Run the following commands to create a full database script for each of the key
controller services:
get-brokerdbschema –databasename CitrixXenDesktopDB –servicegroupname Training
– scripttype fulldatabase > c:\brokerfulldb.sql
get-configdbschema –databasename CitrixXenDesktopDB –servicegroupname Training
> c:\configfulldb.sql
get-hypdbschema –databasename CitrixXenDesktopDB –servicegroupname Training >
c:\hypfulldb.sql
get-acctdbschema –databasename CitrixXenDesktopDB –servicegroupname Training >
c:\acctfulldb.sql
get-provdbschema –databasename CitrixXenDesktopDB –servicegroupname Training
> c:\provfulldb.sql
get-pvsvirtual
machine
dbschema
Exercise 1: Manually
creating
a XenDesktop
5.x site–databasename
Database
CitrixXenDesktopDB > c:\pvsvirtual
machine fulldb.sql
Overview
Other values supported by the –scripttype parameter include:
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script-Instance
is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real-Login
world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone-Evict
SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
For more detailed information on each of these options use the help precursor along
with the –full parameter
e.g. help getbrokerdbschema
Step-by-step
guidance -full
Follow theNote:
stepsifbelow
to complete
the task.
the scripttype
parameter
is not included then the database script defaults to
fulldatabase
Estimated time to complete this lab: 40 minutes.
http://support.citrix.com/static/kc/CTX127254/help/GetStep Ref:
Action
BrokerDBSchema.html
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
25.
Action
This exercise is now complete
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

As part of the quick deploy or Desktop deployment wizards, XenDesktop
will automatically create the Site database.

Desktop Studio can be used to generate DB generation and mirroring scripts
which can be given to an SQL admin
For more background information on configuring a XenDesktop 5 database and
using PoSH see the following KB articles:
How to Configure a XenDesktop 5 Site to Use an Existing SQL Database
http://support.citrix.com/article/CTX128008/
PowerShell reference:
http://support.citrix.com/static/kc/CTX127254/help/Get-BrokerDBSchema.html
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
1.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 2: Database Access and Permissions
Overview
In this exercise we will look at how the Controller services access and interact with the site Database. We
will also look at the slight differences when services are accessing the database locally as opposed to
remotely.
Step-by-step guidance
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Follow the steps below to complete the task
Estimated time to complete this lab: 40 minutes.
Step Action
1. Logon to the SQLServer virtual machine as training\administrator with password Citrix123
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
Action
Launch SQL Server Management Studio by double clicking the icon on the desktop  select
(local) from the Server name drop down list & Click Connect:
Note: SQL Server Management Studio may already be open from the previous exercise.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
Action
In the object Explorer window on the left hand side, expand the following view:
Databases\CitrixXenDesktopDB\Security\Users
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Note: All XD5.x controller services access the site database using the Active Directory machine
account loginguidance
of the DDC they are running on. These logins are created as needed when
Step-by-step
controllers are added to the site. Within the database, the machine logons are mapped one-towith
a dedicated
per-machine
Follow theone
steps
below
to complete
the task. user. Each such user has the same name as the logon to
which it relates (E.G. ‘DOMAIN\MACHINE$’) and are made members of various DB roles
turn are granted
permissions on Specific Schema Tables, Stored procedures &
Estimated which
time toincomplete
this lab: various
40 minutes.
Synonym’s.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
4.
Action
Right click on the Training\DDC1_56$ user to view role memberships:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
The controller
machine accounts
andthe
users
in the Deployment
database are wizard
grantedinonly
the minimum
This scriptNote:
is generated
while configuring
a site using
Desktop
Desktop
Studio.
XenDesktop
database
for the
to operate.toOne
of athe
inherenton a
In the real access
world, to
it isthequite
possible that
an XDrequired
admin will
not services
have permissions
create
database
issuesInwith
authentication
that byscript
default
thatgiven
the SA
full who
access
to,the
standalonesecurity
SQL server.
thisSA
situation,
the DB is
creation
canis be
to alogin
SQLhas
admin
has
complete to
control
SQL Serverdatabase.
instance and all of its databases.
appropriateand
permissions
createof,
thethe
XenDesktop
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
4.
5.
Action
Review: XenDesktop Database Roles
Logon to the DDC2_56 virtual machine as training\administrator with password Citrix123
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
6.
Action
Launch Desktop Studio from the start menu and Select Desktop deployment from center
pane:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
Enter Support for the site name, leave “Use default database” checked and click Next:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
8.
Action
Click OK when asked if you would like XenDesktop to create the database automatically:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
Action
Accept all defaults on the licensing page and click Next:
Note: for
the purpose
of this5.xexercise
there
Exercise 1: Manually
creating
a XenDesktop
site Database
is no real requirement to point to a valid license
server as we can use the built-in 30 day free trial.
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
Action
As per Exercise 1, complete the Connection section using the Host connection details provided
by your trainer.
Note: Do not use 108.168.156.72 as the address of your Host. This is used below as an example
only.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
11.
Action
Complete the Host section as per the screenshot below and click Next:
Host name: Xenserver
Network: Internal
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
12.
Action
Complete the Storage section using the screenshot below as reference and click Next:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
13.
Action
Review the configuration summary before clicking Finish to complete the initial configuration:
Note: Database server on this occasion is the local default SQL Express instance
Exercise 1: Manually
creating a XenDesktop 5.x site Database
(.\SQLEXPRESS)
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
14.
Action
Click Start All programs  Microsoft SQL Server 2008 R2  SQL Server Management
Studio  Select DDC2_56\SQLEXPRESS for Server name from the drop down box and
click connect:
You can also connect to the local instance of SQL Express by specifying the following as the
Server name:
.\sqlexpress
(local)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
15.
Action
In the object Explorer window on the left hand side, expand the following view:
Databases\CitrixXenDesktopDB\Security\Users
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
Note: When a Controller is installed on the same machine as the XenDesktop database the NT
appropriate permissions to create the XenDesktop database.
AUTHORITY\NETWORK SERVICE rather than the machine a/c is mapped to a database
user a/c and used by the services to logon to and perform actions against the database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step Action
25. This exercise is now complete
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

XenDesktop 5.x supports SQL windows integrated authentication ONLY.
SA authentication is not supported as services use the AD machine a/c of
the controller they are running on to access the Database.

The use of machine accounts for database access removes the security
concerns associated with SQL authentication while at the same time ensuring
that only machines that have been configured with appropriate database
access at the database server can act as XenDesktop controllers for a
particular site.

Controller services access the database using one of two accounts depending
on the location of the SQL database in relation to the specific service.

Remote services = DOMAIN\MACHINE$
 Local services = NT AUTHORITY\NETWORK SERVICE
For more background information on database permissions see the following KB
article:
Database Access and Permission Model for XenDesktop 5:
http://support.citrix.com/article/CTX127998
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
26. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 3: Using PowerShell to reset the
Controller services DB connection strings
Overview
In this exercise we will learn how to use PowerShell to reset each of the controller services DB
connections strings to a null value. For each service to communicate with the site database, they must be
told how and with what conditions they can connect to the database. The db connection string is used for
this purpose and it can only be manipulated directly using PoSH.
Step-by-step guidance
Follow the steps below to complete the task
Estimated time to complete this lab: 15 minutes.
Step Action
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
1.
Action
Logon to the DDC2_56 virtual machine as training\administrator with password Citrix123
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
Action
Open services.msc and stop the SQL Server (SQLEXPRESS) service:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
3.
Action
Browse to C:\Program Files\Microsoft SQL
Server\MSSQL10_50.SQLEXPRESS\MSSQL\DATA and delete the following files:
CitrixXenDesktopDB
CitrixXenDesktopDB_log
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
4.
Action
Launch Desktop Studio (Start  Desktop Studio) and when asked to “Specify the address of
a Controller in the Site you wish to administer” leave the radio button for “This machine”
selected and click OK:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
5.
6.
Action
Click OK when the error message below is returned:
Note: do not close the Select XenDesktop Site window after dismissing the above error
Launch PoSH by clicking on the taskbar icon  type asnp citrix* to load all XenDesktop 5
snapin’s/cmdlets
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
Type get-brokerdbconnection to review the DB connection string used by the broker service
Note: based on the previous exercise, all services will still be pointing to the SQLEXPRESS
instance on DDC2_56
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
8.
Action
Type set-brokerdbconnection –dbconnection $null to set the DB connection string to
DBUnconfigured:
Note: If you receive an error run the above command again.
Do this for the rest of the services also:
Set-configdbconnection –dbconnection $null
Set-hypdbconnection –dbconnection $null
Set-acctdbconnection –dbconnection $null
Set-pvsvmdbconnection –dbconnection $null
Set-provdbconnection –dbconnection $null
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
Action
Minimize the PowerShell window and click OK on the Select XenDesktop Site window
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step Action
10. Observation: Desktop Studio will launch successfully now that the services have been reset to
DBUnconfigured.
Can you figure out why Quick deploy is greyed out and resolve this issue?
Note: Do not go ahead and configure a site
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step Action
11. This exercise is now complete
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
The key takeaways for this exercise are:

The only way to view, reset or change the DB connection string for any of
the controller services is by using PowerShell and the get/set%service%dbconnection cmdlets

NOTES
It may be necessary to change dbconnection strings if moving or restoring a
database to another server, configuring mirroring or trying to resolve
Desktop Studio functionality issues.
For more background information on using PowerShell to administer and configure
XenDesktop 5 refer to the following KB article:
XenDesktop 5.6 SDK Cmdlet Help
http://support.citrix.com/article/CTX127254/
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
51. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 63
Services
Exercise 4: Monitoring & Supporting the
XenDesktop Site Database
Overview
In this exercise we will explore the usage of several techniques for troubleshooting and extracting data
from the XenDesktop site database.
Step-by-step guidance
Follow the steps below to complete the task
Estimated time to complete this lab: 45 minutes.
Step Action
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 64
Services
Step
1.
Action
Logon to the DDC1_56 virtual machine as training\administrator with password Citrix123
and Launch Desktop Studio to continue the initial Desktop Deployment wizard process
which began in Exercise 1.
Two Options:
1.Click on Initial configuration tab while Desktop Studio node is selected and select
Configure on the machine creation window
2. Right click the machine node and select New Catalog
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 65
Services
Step
2.
3.
Action
Select Existing for machine type and click Next:
Click Add VMs and select Win7VDA1 & Win7VDA2 from the list of machines and click
OK:
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 66
Services
Step
4.
Action
Enter the corresponding AD accounts for the VMs and assign VDA1 to user1 and VDA2
to user2 as seen below:
Note: Type training\Win7VDA1 and click OK (repeat the process for Win7VDA2 (repeat
similar process when assigning users)
5.
Click Next twice and name the catalog “Win7 Existing” before clicking Finish
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 67
Services
Step
6.
Action
Once the machine creation step is complete. Click Configure under the User assignment
window to create a Desktop Group. As an alternative, you can also right click on the
Machines node and select new desktop group…
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 68
Services
Step
7.
Action
Highlight the Win7 Existing catalog and click Next:
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 69
Services
Step
8.
Action
Select both machines and click Next:
9.
Click Next on the Delegation screen
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 70
Services
Step
10.
Action
Enter the following details on the Summary screen and click Finish:
Display name: My Desktops
Desktop Group name: XP Existing
Note: Based on the Desktop Group properties (AutomaticPowerOnForAssigned) both
assigned desktops should start automatically
11.
Click “Go to site dashboard” on the Initial Configuration Tab
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 71
Services
Step
12.
Action
Observation: The “PoolSize” option is missing from private Desktop Groups properties as
the requirement for assigned private Desktops would be for all desktops to be powered on
initially and not bound by an admin defined “PoolSize” value. A Desktop group inherits its
“DesktopKind” value depending on what catalog it is created from. As you can see from
the screenshot below, Desktops created from an Existing catalog are considered private
Desktops.
Get-BrokerDesktopGroup:
Note: Although not configurable through the UI, “PoolSize” can be configured for a
private desktop group by editing the existing power time scheme associated with the
desktop group or creating a new power time scheme.
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 72
Services
Step
13.
Action
Information: To view detailed information about Power Time Schemes associated with
Desktop groups an administrator should use PoSH and the GetBrokerPowerTimeScheme cmdlet
Note: The DesktopGroupUID parameter determines which Desktop group a specific
power time scheme is associated with:
About Get-BrokerPowerTimeScheme:
Note: Each desktop group in the site can have a number of power time schemes associated
with it, and these time schemes control how the power states of machines in the group are
managed. Each power time scheme covers one or more days of the week, and defines which
hours of those days are considered peak times and which are off-peak times. In addition, the
time scheme defines a pool size value for each hour of the day for the days of the week
covered by the time scheme. No one desktop group can be associated with two or more
time schemes that cover the same day of the week. For any day of the week not covered by
any power time scheme, it is assumed that all hours are off-peak and no pool size
management is required for any of the hours.
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 73
Services
Step
14.
15.
16.
Action
Tip: To view the UID and DesktopKind associated with a Desktop Group an administrator
can use the Get-BrokerDesktopGroup cmdlet:
Note: the Win7 Existing Desktop group’s UID is 4 which we can see form the screenshot
in step 13 is associated with the two default power time schemes: Weekdays and Weekend.
Logon to the Win7Client virtual machine as training\administrator with password Citrix123
and Launch Internet Explorer and enter 192.168.10.14 in the address bar and hit return.
Logon using the following details:
Username: user1
Password: Citrix123
Domain: training.lab
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 74
Services
Step
17.
Action
Launch a desktop by clicking on the Desktop icon
Note: If the Desktop icon appears grey it has more than likely not registered successfully
with one of the controllers and needs further investigation. Raise this issue with the trainer.
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 75
Services
Step
18.
19.
20.
21.
22.
23.
24.
25.
Action
Confirm that the virtual desktop successfully loads and then logoff from both the desktop
and Web Interface
Log back on to Web Interface as User2 with password Citrix123 (Domain:training.lab)
Confirm that the virtual desktop successfully loads and then logoff from both the desktop
and Web Interface
Logon to the SQLServer virtual machine as training\administrator with password Citrix123
Navigate to \\AD\software\Tools
Copy the XDDBDiag2.1 folder to the local C: Drive
Launch a command prompt and navigate to C:\XDDBDiag2.1
Run XDDBDiag windows SQLServer CitrixXenDesktopDB
Note: XDDBDiag connects to the database directly and does not have any dependency on
the broker service.
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 76
Services
Step
26.
Action
Summary information is displayed on the screen and a ZIP file is created in the same
directory with detailed output:
SQLSERVER_XDDBDiag_Output.zip
If no problems have been found then XDDBDiag.exe will report the same. See above:
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 77
Services
Step
27.
Action
Extract the contents of the ZIP file and open some of the files to view their contents. The
below files can be useful for troubleshooting:
sqlConnectionLog – Displays all connection attempts within the past 48 hours. It will also
capture connection errors and brokering resolution timings.
sqlVDAStates – Will display VDA information such as version, last de-registration reason,
and last contact time
28.
Launch SQL Server Management Studio while logged into SQLServer and logon to the
local instance
29.
Right-click the localhost node and select Activity Monitor
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 78
Services
Step
30.
31.
Action
Click the Processes heading and then click in the Application column to filter by Citrix
Right-click on some of the processes and choose Details
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 79
Services
Step
32.
33.
Action
Observation: The details dialog will show the last Transact-SQL command that was run
which is typically a stored procedure with some or no parameters. Try to locate the stored
procedures that are being called from Programmability -> Stored Procedures and execute
them to a new query editor window for inspection.
Copy the XD5_SQL2008R2_and_SQL2008_Profiler_Template folder from
\\AD\software\Tools to the C: Drive on SQLServer
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 80
Services
Step
34.
Action
Switch back to SQL Server Management Studio and select Tools->SQL Server Profiler
from the file menu:
35.
Click Connect on the “Connect to Server” dialog and then click Cancel on the Trace
Properties screen:
36.
Select File->Templates->Import Template
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 81
Services
Step
37.
Action
Browse for “XD5 SQL2008R2 Profiler Template.tdf” and click open
Note: click OK on import notification
38.
Select File->New Trace and click Connect again on the “Connect to Server” dialog
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 82
Services
Step
39.
40.
Action
Select the XD5 SQL2008R2 Profiler Template from the “use this temple” drop down list
and Click the Events Selection tab  Organize Columns and move TextData and EndTime
to the beginning of the Columns section  click OK
Click on the General tab and click Run to start the profiler trace:
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 83
Services
Step
41.
42.
43.
Action
Observation: The trace is now running and capturing data from the database:
With the trace running, switch to the Win7Client virtual machine and logon into Web
Interface at http://192.168.10.14 as User1 with password Citrix123 (Domain:training.lab)
Switch back to the running trace and pause it:
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 84
Services
Step Action
44. LSpend a few minutes looking through the entries in the TextData column. You’ll notice
oseveral calls to stored procedures as well as several SELECT and UPDATE SQL
cstatements.
a
Note: In a production environment experiencing issues, errors will show up in red and most
problem statements can be run against the database directly.
45. Close SQL Server Profiler when done reviewing the trace
46. Switch to the DDC1_56 virtual machine and logon as training\administrator with password
Citrix123
47. Launch Performance Monitor through Start->Run [type Perfmon and hit return]
48. Click the Performance Monitor node on the left side
49.
Click the green plus sign to add a counter
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 85
Services
Step
50.
Action
Browse to Citrix Broker Service -> Database Connected and click Show description. As
shown, this is a Boolean counter that reports if the Broker Service has a connection with the
database (1) or not (0).
Note: the Database Connected counter is available for all Controller services.
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 86
Services
Step
51.
52.
Action
Click the Add button and then OK
Right-click on the graph and go to Properties
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 87
Services
Step
53.
Action
Under the Data tab, change the scale to 10.0
Note: Ensure that the Database Connected counter is the only counter listed. Remove any
other default counters.
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 88
Services
Step
54.
Action
Under the General tab, change the Duration to 1000 and click OK
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 89
Services
Step
55.
56.
Action
Observation: By Hovering the mouse pointer on the counter marker shows a current value
of 1.000 i.e. broker service is connected to the database
Switch to the SQLServer virtual machine and disable the network adapter
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 90
Services
Step
57.
58.
59.
Action
Switch back to the DDC1_56 virtual machine and note that the counter is now reporting a
value of 0.000 i.e. broker service is not connected to the database
Re-enable the network adapter on the SQLServer virtual machine
This exercise is now complete
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 91
Services
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

XDDBDiag can be used to obtain detailed information directly from the
XenDesktop database – regardless of if the site is operational or not

The SQL Activity Monitor is useful for managing real-time connections to
the database

SQL Server Profiler can be used to trace the inner workings of the database

Performance Monitor will provide various metrics on the operation of the
XenDesktop site
-
XenDesktop 5 SQL Profiler Template:
http://support.citrix.com/article/CTX127257
Exercise 4: Monitoring & Supporting the XenDesktop Site Database
Page 92
Services
Exercise 5: Configuring SQL Mirroring &
testing failover
Overview
In this exercise we will reconfigure an existing XenDesktop site to use a mirrored SQL database. In an
actual production environment, these steps would be completed during a maintenance window. The steps
presented here are mainly taken from http://support.citrix.com/article/CTX127538. Note that to
configure a site for SQL mirroring during the initial site setup, refer to
http://support.citrix.com/article/CTX127359.
Step-by-step guidance
Follow the steps below to complete the task. Ensure that the SQLServer2 virtual machine is running.
Note that PowerShell cmdlets are not case-sensitive but are shown capitalized for readability purposes.
PowerShell accepts standard command prompt input and supports autocomplete with the tab key as well.
Estimated time to complete this lab: 90 minutes.
Step Action
1.
Logon to the DDC2_56 virtual machine as training\administrator with password Citrix123.
Exercise 3: Setting Up SQL Mirroring
Page 93
Services
Step
2.
3.
Action
Launch Desktop Studio from the Start menu and select Join existing deployment from
the Center pane:
Enter ddc1_56.training.lab and click OK
Exercise 3: Setting Up SQL Mirroring
Page 94
Services
Step
4.
Action
Select Yes when asked if you would like XenDesktop to update the database automatically
5.
Observation: DDC2_56.training.lab has now been added to the same site as DDC1_56 I.E. Training
Exercise 3: Setting Up SQL Mirroring
Page 95
Services
Step
6.
Action
Tip: To verify the name of a XenDesktop 5 site use PoSH and the get-brokersite cmdlet:
Note: Name = Training
7.
Tip: To view all controllers in a site use PoSH, and the get-brokercontroller cmdlet.
8.
9.
10.
11.
Logon to the DDC1_56 virtual machine as training\administrator with password Citrix123.
Launch a new PowerShell prompt by clicking on the blue PowerShell icon on the taskbar.
Type ASNP Citrix.* and press Enter to load the Citrix snap-ins/cmdlets.
Browse to \\AD\software\Scripts and copy the Site Prep.ps1 file to the root of the C:
Drive on DDC1_56
Type get-executionpolicy inside the PoSH session, and verify the value is set to
unrestricted.
Navigate to C:\> and type:
.\”site prep.ps1”
12.
13.
Hit return to run the site prep script.
Exercise 3: Setting Up SQL Mirroring
Page 96
Services
Step
14.
Action
The SDK will now unregister the XenDesktop services against the database for each broker
in the site. The database itself will still exist however.
17.
Note: DO NOT CLOSE THIS INSTANCE OF PoSH
Close the Desktop Studio console on bother DDC1_56 and DDC2_56
Switch to the SQLServer virtual machine, and logon as training\administrator with
password Citrix123
Launch SQL Server Management Studio, and logon to the local instance
18.
Expand the Databases node, right-click CitrixXenDesktopDB and click properties
15.
16.
Exercise 3: Setting Up SQL Mirroring
Page 97
Services
Step
19.
20.
21.
Action
Click Options on the left side, and change the recovery model from Simple to Full and
click OK
Note: For more information on SQL Server recovery models, refer to
http://msdn.microsoft.com/en-us/library/ms189275.aspx.
Right-click CitrixXenDesktopDB and go to Tasks > Back Up
Ensure the backup type is set to Full and click OK
Exercise 3: Setting Up SQL Mirroring
Page 98
Services
Step
22.
23.
Action
Click OK on the dialog once the backup process completes.
Copy the backup file from C:\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup over to
\\SQLServer2\C$\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL\Backup
Exercise 3: Setting Up SQL Mirroring
Page 99
Services
Step
24.
Action
From within SQL Server management Studio, connect to the SQLServer2 instance by
clicking Connect in Object Explorer and choosing Database Engine
25.
Enter SQLServer2 for the server name and click Connect
26.
Right-click the Databases node under the SQLServer2 instance and select Restore
Database
Click the radio button next to From device and click the search button to the immediate
right
27.
Exercise 3: Setting Up SQL Mirroring
Page 100
Services
Step
28.
29.
Action
Click Add and browse for the backup file at C:\Program Files\Microsoft SQL
Server\MSSQL10_50.MSSQLSERVER\MSSQL\
Click OK on both dialogs to return to the Restore Database screen.
Select CitrixXenDesktopDB from the drop-down under To database
Exercise 3: Setting Up SQL Mirroring
Page 101
Services
Step
30.
Action
Select the available backup set by clicking in the Restore box
Exercise 3: Setting Up SQL Mirroring
Page 102
Services
Step
31.
Action
On the Options tab and select “Leave the database non-operational…”
Click OK
Exercise 3: Setting Up SQL Mirroring
Page 103
Services
Step
32.
Action
Click OK on the dialog once the restore operation completes.
Exercise 3: Setting Up SQL Mirroring
Page 104
Services
Step
33.
34.
Action
Under the SQLServer instance  Right Click CitrixXenDesktopDB under the databases
node and select Tasks > Mirror:
Observation: At this point the CitrixXenDesktopDB database has not been configured for
mirroring. See Status above.
Click Configure Security.
Exercise 3: Setting Up SQL Mirroring
Page 105
Services
Step
35.
Action
Click Next on the first screen
Exercise 3: Setting Up SQL Mirroring
Page 106
Services
Step
36.
Action
Click Next on the Include Witness Server screen since we will be working with a witness
server instance
Exercise 3: Setting Up SQL Mirroring
Page 107
Services
Step
37.
Action
Click Next on the Choose Servers to Configure screen
Exercise 3: Setting Up SQL Mirroring
Page 108
Services
Step
38.
Action
Click Next on the Principal Server Instance screen to accept the defaults of SQLServer as
the principal.
Exercise 3: Setting Up SQL Mirroring
Page 109
Services
Step
39.
40.
Action
On the Mirror Server Instance screen, select SQLServer2 from the drop down box.
Click Connect in the dialog and then click Next in the wizard to proceed.
Exercise 3: Setting Up SQL Mirroring
Page 110
Services
Step
41.
Action
In the Witness Server Instance screen, select <Browse for more…> from the drop-down
menu.
Exercise 3: Setting Up SQL Mirroring
Page 111
Services
Step
42.
Action
Enter or select ad\SQLExpress and click Connect before clicking Next to proceed.
Exercise 3: Setting Up SQL Mirroring
Page 112
Services
Step
43.
Action
In the Service Accounts screen, type TRAINING\SQLService in each of the fields and
click Next
Note: The SQLService account has been created previously, is used as the account on each
of the instances, and has a corresponding instance login.
Exercise 3: Setting Up SQL Mirroring
Page 113
Services
Step
44.
Action
Review the settings, and then click Finish.
Exercise 3: Setting Up SQL Mirroring
Page 114
Services
Step
45.
46.
Action
The endpoints will be configured for mirroring.
Click Close when finished.
Click Start Mirroring on the Database Properties dialog.
Exercise 3: Setting Up SQL Mirroring
Page 115
Services
Step
47.
Action
Database mirroring has now been configured and the status should show as fully
synchronized. Click OK on the database properties dialog.
Exercise 3: Setting Up SQL Mirroring
Page 116
Services
Step
48.
Action
CitrixXenDesktopDB on SQLServer should now show as (Principal, Synchronized) in
Object Explorer while CitrixXenDesktopDB on SQLServer2 should now show as (Mirror,
Synchronized / Restoring…)
Note: When the mirror server becomes sufficiently caught up to the principal server, the
mirroring state changes to SYNCHRONIZED. The database remains in this state as long as
the principal server continues to send changes to the mirror server and the mirror server
continues to apply changes to the mirror database.
If transaction safety is set to FULLautomatic failover and manual failover are both
supported in the SYNCHRONIZED state, there is no data loss after a failover.
If transaction safety is off, some data loss is always possible, even in the
SYNCHRONIZED state.
A Mirrored database will always show as Restoring and is never accessible unless failover
occurs
Exercise 3: Setting Up SQL Mirroring
Page 117
Services
Step
49.
Action
Task: Test the failover process.
Right-click the localhost instance on SQLServer and select Stop  Click Yes to confirm:
50.
51.
52.
53.
Wait a few seconds and then refresh the view under the SQLServer2 instance
The CitrixXenDesktopDB under the SQLServer2 instance should now show as (Principal,
Disconnected)
Note: Disconnected means that the partner has lost communication with the other partner
Right-click the localhost instance for SQLServer and select Start. Click Yes on the
confirmation dialog.
Wait a few seconds and then refresh the view under both the localhost instance and the
instance for SQLServer2.
Exercise 3: Setting Up SQL Mirroring
Page 118
Services
Step
54.
55.
Action
The localhost instance should now show the CitrixXenDesktopDB as (Mirror,
Synchronized / Restoring…) while the SQLServer2 instance of the database shows as
(Principal, Synchronized).
Let’s now swap the roles back. Right-click the CitrixXenDesktopDB from SQLServer2 and
go to Tasks > Mirror
Exercise 3: Setting Up SQL Mirroring
Page 119
Services
Step
56.
57.
Action
Click the Failover button and then click Yes on the dialog
Click Yes on Database Properties dialog
Exercise 3: Setting Up SQL Mirroring
Page 120
Services
Step
58.
59.
60.
61.
62.
63.
Action
Refresh the view and notice that the localhost instance of SQLServer is acting as the
principal with the database on SQLServer2 acting as the mirror
Under the SQLServer2 instance, navigate to Security > Logins
Right-click Logins and select New Login
Enter TRAINING\DDC1_56$ in the Login name field and click OK
Right-click Logins again and select New Login
Enter TRAINING\DDC2_56$ in the Login name field and click OK
Exercise 3: Setting Up SQL Mirroring
Page 121
Services
Step
64.
65.
66.
67.
68.
Action
Switch back to the DDC1_56 virtual machine and the existing PowerShell window
Browse to \\AD\software\Scripts and copy the SetMirrorDBConnection.ps1 file to the
root of the C: Drive
Navigate to C:\> and type .\SetMirrorDBConnection.ps1 and hit return to run the DB
Mirror Connection script
The XenDesktop services should now be configured for use with the SQL Mirroring setup.
Run Get-BrokerServiceStatus and confirm that the output shows as OK.
Switch back to the SQLServer virtual machine and using through SQL Management Studio,
Stop the SQL Service on SQLSERVER or Localhost depending on how you are connected
to the database.
Note you can also use services.msc to stop the SQL Server service
Exercise 3: Setting Up SQL Mirroring
Page 122
Services
Step
69.
Action
Switch to the DDC1_56 virtual machine and run Get-BrokerServiceStatus again to
confirm that the status shows as OK.
NOTE: If the DBRejectedConnection is returned then make sure you review steps 60-64
70.
For more information re: Return status see
http://support.citrix.com/static/kc/CTX127254/help/Get-BrokerServiceStatus.html
Switch back to the SQLServer virtual machine and stop the service on AD (you will need to
connect to ad\sqlexpress first). Click Yes on the dialog.
Note: at this point, the SQL services on local (SQLServer) and AD\sqlexpress
(ad.training.com) are stopped.
Exercise 3: Setting Up SQL Mirroring
Page 123
Services
Step
71.
Action
Switch to the DDC1_56 virtual machine and run Get-BrokerServiceStatus again to
check the status one more time. It should now show as Pending Failure as SQL Mirroring
requires 2 out of the 3 servers to be available at all times:
Get-BrokerServiceStatus will return various values until the final DBNotFound value is
returned:
72.
73.
74.
Switch back to the SQLServer virtual machine and start the service on ad\sqlexpress.
Switch to the Win7Client virtual machine and logon as training\administrator with
password Citrix123
Launch Internet Explorer and logon to the Web Interface at http:// 192.168.10.14 as
User1 with password Citrix123 (Domain: Training)
Exercise 3: Setting Up SQL Mirroring
Page 124
Services
Step
75.
76.
77.
78.
Action
Launch a connection to the desktop to confirm that the site will continue to function with
the SQLServer instance down:
Logoff the virtual desktop
Start the SQL service on SQLServer
This exercise is now complete.
Exercise 3: Setting Up SQL Mirroring
Page 125
Services
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

SQL Server Mirroring provides high availability for a XenDesktop 5
database in the event that any one SQL server goes down

The High safety with automatic failover mode is the preferred choice when
using SQL Server Mirroring in order to ensure a seamless transition in the
event of a failure

The connection string of the XenDesktop services must be reconfigured
using the PowerShell SDK in order to support SQL Mirroring
Ref Articles:
How to Reconfigure a XenDesktop Site to Use a Mirrored Database
http://support.citrix.com/article/CTX127538How
How to Configure XenDesktop for SQL Database Mirroring
http://support.citrix.com/article/CTX127359
Exercise 3: Setting Up SQL Mirroring
Page 126
Services
Exercise 6: Monitoring MCS tasks using the
XenServer console & PowerShell
Overview
In this exercise, you will create pooled desktops with Machine Creation Services and use PowerShell
cmdlets to learn what type of information regarding Machine Creation Services can be accessed via the
SDK. You will also learn what commands can be used on XenServer to determine how much storage is
consumed by MCS.
Step-by-step guidance
Follow the steps to complete the tasks:
Estimated time to complete this lab: 45 minutes.
Step Action
Create pooled desktops with Machine Creation Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
1.
2.
Action
From within XenCenter, check the UUID of the Storage Repository used by Machine
Creation Services (MCS) by clicking on the local storage object:
Logon to the ad.training.lab virtual machine as training\administrator with password
Citrix123
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
3.
Action
Launch putty.exe from the desktop shortcut and connect to your host console using IP
address or FQDN:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
4.
Action
Login to the host console using the provided credentials:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
5.
Action
Type df –h and hit return to see the disk space usage of the SR matching the UUID from
step 1:
Example: Use% = 18%
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
6.
7.
8.
Action
Logon to the DDC1_56 virtual machine as training\administrator with password Citrix123
If you already have virtual machines running (Win7VDA1, Win7VDA2), enable
maintenance mode for the Win7 Existing desktop group in Desktop Studio and shutdown
the virtual machines
Note: If Desktop Studio returns an error or when launched, defaults to the initial setup
wizard screen – consult the Trainer.
Right-click the Machines node in Desktop Studio and select Create Catalog.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
Action
Select Pooled from the Machine Type drop down box and Click Next:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
11.
12.
13.
Action
Select Win7Master as the Master Image and click Next
Enter 2 for the Number of virtual machines to create. Leave all else default and click
Next
Select the VDI OU and type Pooled## for the Account naming scheme
Click Next twice, and enter a catalog name of Pooled Windows XP  Click Finish
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
14.
Action
Click on the PowerShell tab under the Desktop Studio node and start a PowerShell instance
using the “launch PowerShell” button:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
15.
Action
Run Get-ProvTask – active $true and take a moment to browse the output. Run the
cmdlet multiple times during the catalog creation to get the current status (TaskProgress) of
the task:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
16.
Action
After the task completes, run Get-ProvScheme and take a moment to look through the
output:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
17.
18.
Action
Run Get-Provvm and take a moment to look through the output here as well:
Repeat Steps 3, 4 & 5 again and compare the amount of space used on the local SR by
running df –h again
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
19.
Action
This Exercise is now complete
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

Run df –h can be used to determine accurate disk consumption as an
alternative to checking values in XenCenter

Use XenDesktop PowerShell cmdlets to get detailed information on
machine creation tasks
Refer to CTX127254 for more details on each XenDesktop 5 cmdlet
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
76. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 8: Machine Identity Agent Deep Dive
Overview
In this exercise, we will take a closer look at how the Machine Identity Agent (Pvs for VMs service)
provides a unique identity for each virtual machine.
Step-by-step guidance
Follow the steps below to complete the task:
Estimated time to complete this lab: 45 minutes.
Step Action
1. Manually start-up and logon to one of the desktops created in the previous exercise
(Pooled01 or Pooled02) as training/administrator with password Citrix123 (Start one of
them if neither is running.)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
Action
Observation: As part of the MCS process, a 16MB disk is created and attached to each
VM. This disk is known as the Identity disk and holds the machine identity i.e. computer
name and password:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
3.
4.
Action
Open Computer Management by right-clicking Computer in the Start menu, and clicking
Manage:
Select Disk Management under the Storage node
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
5.
Action
Observation: The Identity disk is attached and online but has no drive letter assigned:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
6.
Action
Right-click on the New Volume and select Change Drive Letter and Paths, and observe
that the disk is actually mounted against the file system. You can manually mount it against
a drive letter if you wish but there is not requirement to do this:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
Open Windows Explorer and navigate to the path as per the previous step i.e. C:\Program
Files\Citrix\PvsVm\Service\PersistedData
Exercise 1: Manually creating a XenDesktop 5.x site Database
Note that the folder cannot be opened because the logged on user (Administrator) does not
Overview
have permission to access the folder.
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
8.
9.
Action
Click Cancel to dismiss the above warning
Right-click the PersistedData folder and select Properties
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10
.
Action
Select the Security tab and click on Continue:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
Action
Change the owner to Administrator and tick the “replace owner on subcontainers and
objects” and click OK.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
11.
Action
Click Yes and OK on the following pop-up windows:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
12.
Action
Click OK to close the PersistedData folder properties window
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
13.
Action
Click Organize  Folder and Search options and select “Show hidden files and folders”
and untick “Hide protected operating system files” under the View Tab and click OK (click
yes to dismiss warning):
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
14.
Action
Click on the PersistedData folder in Explorer.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
15.
Action
Observation: As mentioned previously, the Identity disk can also be mounted to a drive
letter as seen in the screenshot below:
Note: The advantage of mounting to a derive letter is that you do not need to change any
permissions to access the content i.e. the CTXSOSID and VdaState INI files:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
16.
Action
Open CTXSOSID.INI and VdaState.ini in the PvsVm folder, and view the information
stored in each file:
NOTE: If Administrator does not have permission to access the PvsVm folder, open the
folder’s properties, and add training\administrator in the Security tab to give Read
permission.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
17.
19.
Action
Browse in the root of the C drive, and open the personality.ini file with Notepad and review
the contents:
Note: personality.ini is created when installing the VDA software and populated by MCS
during catalog creation. It contains details re: the Disk mode (Shared or Private) and the
Controllers to be used for registration.
Close all open windows and shutdown the VM
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
20.
21
Action
Detach the identity disk through XenCenter from the VM you shut down in the previous
step:
Start the same VM and Logon as training\administrator with password Citrix123
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
22.
23.
Action
Observation: The OS retains the initial identity it received from the _IdentityDisk before it
was detached, but the disk can no longer be accessed through windows Explorer and going
forward XenDesktop will not be able to maintain the identity i.e. update the machine a/c
password based on the Domain – This will eventually cause issues and force the desktop to
fall of the Domain:
Shutdown the machine
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
24.
25.
26.
Action
From within XenCenter, click on the storage tab of the same VM and attach re-attach the
previously detached Identity disk:
Start the VM
Observation: You can now browse to the contents of the _IdentityDisk through explorer
and view the machine specific details.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
Machine specific information (The machine Identity if you will) is stored in a
number of files on the Identity and Diff disk:

CTXSOSID.INI (Identity Disk)

VdaState.ini (Identity Disk)

personality.ini (Diff Disk)
The bootstrap process of Machine Identity Service Agent reads the identity disk and
uses the information it obtains from the ‘CTXSOSID.INI’ file to inject the identity
required into the windows instance. This process also involves writing to a
‘personality.ini’ file that can be used to provide a list of controllers to register against
and/or input to the other processes.
NOTES
The Machine Identity Agent is made up of two elements:
 Bootstrap
 Machine Identity Agent Service
The Machine Identity Agent is a service and responsible for controlling the identity
of the computer within the domain and maintaining the computer AD passwords.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 9: Using XD Ping to Troubleshoot
DDC & VDA settings
In this exercise we will view various configuration settings in a XenDesktop 5.6 environment using XD
Ping
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 5 minutes.
Step Action
26. Log on to the DDC1_56 virtual machine with the credentials provided.
27. Open the Tools folder located on the desktop of the DDC. Copy the XDPing application
to the root of C:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
28.
29.
30.
Action
Open the command prompt as administrator and run the XDPing application from its
location on the C: Drive, using the /? switch to display available options through the tool.
Note: The tool also performs a check to insure you are using the latest version upon
launch.
Type XDPing /firewall to view firewall settings, port #s and assigned protocols etc.
Type XDPing /configfirewall to configure firewall exceptions that enable the VDA to
communicate properly with DDC1_56.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
31.
32.
Action
Next, since the time on the VDA and DDC must not differ by more than 5 minutes, type
XDPing /host DDC1_56 DDC2_56 /CheckAllDDCTimes
Look for output similar to the following:
Note: If you do not provide the names of DDCs running in your environment, only the
time on the local machine will be returned.
Open Task Manager and stop the Citrix Broker Service.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
33.
34.
Action
Type XDPing in the open cmd prompt. Your output should resemble the following:
Note: The Summary section of the returned information points directly to the
CitrixBrokerService as not running.
Switch over to the Win7VDA1 virtual machine, and log in with the Admin credentials
provided. Navigate to \\AD\software\Tools and copy then paste the XDPing application
to the root of C:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
35.
36.
Action
Open the command prompt as an Administrator. Change directory to C:\ and type
XDPing /host Win7VDA1.
Browse the data returned. Locate the Controllers section. XDPing will ping registered
Controllers/DDCs and display OK or ERROR based on the response.
Do not close the command prompt.
Note: The returned data will even contain important events logged to the Event Log in the
last hour.
Enter XDPing>VDA.txt in the command prompt. This creates a text file of the returned
data.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
37.
Action
Enter VDA.txt to open the text file in Notepad.
Summary
Key
Takeaways
The key takeaways for this exercise are:

XDPing can be utilized to quickly pinpoint errors in DDC or VDA
communication, errors with firewall configurations, service interruptions and
domain membership.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
NOTES
Sometimes a VDA may seem to be a member of the domain, when in fact it is not.
XDPing can diagnose this as a problem very quickly. It is a relatively easy command
line tool that customers should be utilizing to query their XenDesktop environments
before engaging with Citrix Technical Support.
The below example illustrates problems with the VDA domain membership:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 10: CDF Tracing
In this exercise we will collect, view and save trace data from a XenDesktop 5.6 environment.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 5 minutes.
Step Action
1.
Log on to the DDC1_56 in your lab environment with the credentials provided.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
Action
Navigate to \\AD\Software\Tools and copy the CDFControl folder to the C: drive.
3.
Create a folder on the Desktop named ‘CDFTraceFiles’.
4.
Launch the CDFControl tool.
5.
6.
Select Tools>Options to open the CDFControl Trace Settings dialog.
Set the ‘Trace file path (for capturing trace)’ to the folder created on the Desktop in step
2, and name the file CDFTest.etl
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
Configure the TMF search path to access the TMF files required to interpret the captured
data to point to: C:\TMF
Optional: Check ‘Real-time viewing’ to view captured data in real-time.
8.
Note: The public TMF files have previously been copied to DDC1_56 as
\\Supimages1\tmfspub\xaxd is not accessible from Softlayer.
Click Save.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
Action
For the purposes of this exercise, we will select ‘All Modules’ from the Trace Categories
dropdown.
Note: Best practice is to select specific modules in an effort to limit the amount of data
captured.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
11.
Action
Click “Start Tracing” to begin collecting data.
Stop services such as (ConfigurationService and CitrixHostService) and open Desktop
Studio. You may be prompted to enter an address for the Controller you wish to administer.
Select This machine and click OK.
The following message appears as a result of the stopped service. Click OK.
12.
Click Stop Consuming on the CDFControl tool.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
13.
14.
Action
Go to File > Parse Trace and select the CDFTest.etl file created above.
Click Open.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
15.
Action
To enable column shading, go to View > Expert Shading > Enable Shading. Search for
a specific string using View > Find or Ctrl + F. In particular, search for key words Error
and Failed. Examine the line items containing these key words.
Note: The ‘Src’ and ‘Line’ columns only display ****** as these pertain to source code
references and this information is not available when using the Public TMF files.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
16.
17.
Action
Go to File > Save Viewer Output, name the file CollectedTraceData and click Save.
Go to Tools > Expert Control to view only collected data related to known failures and
errors.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
18.
Action
Examine the Message column. Notice the multiple references to ConfigurationService.
Select all rows returned by Expert Control (use Shift key to multi-select). Right click, and
select Copy(message only).
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
19.
Action
Open Notepad and paste contents copied from Expert Control. Using Ctrl + F, and search
the contents for the work ‘Error’.
In this short example, we see how to capture and search trace data on a XD 5.6 Controller.
20.
21.
Restart the Configuration Service.
Start the CDFControl tool if not already running. Go to Tools > Collect Perf Data.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
22.
Action
Click Browse Counters. Use Ctrl key to multi select counters. Expand the Process counter
and select % Processor Time, Handle Count, Thread Count and Virtual Bytes (). Expand
the Citrix Broker Service counter and select Brokered Sessions and Database Connected.
Check ‘Collect selected performance counter with each trace”, and set ‘Sample
interval (in seconds): to 10.
Click OK.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
23.
24.
25.
26.
27.
28.
Action
Go to View > Clear Viewer to remove any previous trace data collected.
Select ‘All Modules’ from the Trace Categories dropdown.
Click Start Tracing (ensure real-time tracing is enabled in the options).
Open Internet Explorer from the Client machine, and initiate Desktop session. Log in
using the user credentials provided.
Stop the trace and review the data.
Open the CSV file that was created during the trace in the Desktop folder created earlier,
and review the data.
End of Exercise
Summary
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Key
Takeaways
Use CDFControl to collect data on specific modules. Use the viewing options
available within the tool to quickly locate and view “Errors” and “Failed” lines of
code from collected data. Remember to run to appropriate version of the tool (32 or
64 bit)
Exercise 11: Enabling Clear Text Logging for
key Broker Services
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 15 minutes.
Step Action
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
38.
40.
41.
Action
To enable logging on the DDC, log on to the DDC1_56 machine with the credentials
provided.
Create a folder on the root of C: called XDLogs where the Network Service has NTFS full
control.
To enable logging for the Broker Service, go to C:\Program Files\Citrix\Broker\Service.
Open the BrokerService.exe file in Notepad.
42.
Note: It is best practice to make a backup of this file prior to making changes to the
original.
Search the document for the <appSettings> tag, and change the code to the following lines:
39.
<appSettings>
<add key="LogToCDF" value ="1"/>
<add key="LogFileName" value ="C:\XDLogs\Broker.log"/>
<add key="OverwriteLogFile" value ="0"/>
</appSettings>
43.
44.
45.
46.
Note: “LogToCDF” is set to 1 by default to enable CDF tracing for all .Net services
Save the file and restart the Broker service.
Repeat steps 12-15 for the ADIdentity Service. Remember to change “\Broker.log” from
the previous step to ADIdentityLog.
Start the Task Manager, and stop the CitrixBrokerService and the ADIdentity Service.
Log on to the Win7Client machine and try starting a Desktop session.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
47.
48.
49.
50.
51.
52.
53.
Action
Switch back to the DDC1_56 VIRTUAL MACHINE , and open the C:\XDLogs folder.
Open the ADIdentityand log, and search for the string ‘failed’. You should see the
following line in the log file:
CitrixADIdentityService:Connecting to ServiceInstance with uid
http://DDC.training.com/Citrix/ADIdentityService/IServiceAPI failed.
Open the Broker log file, and search for the string ‘failed’ and ‘failed with error’.
Note: We are not concerned with line items like, ‘failed, step back to parent…’
These are false positives in the code to allow time for procedures to be executed in core
code.
Let’s now disable logging for the Broker and ADIdentity services. Open C:\Program
Files\Citrix\Broker\Service and remove the code added to the <appSettings>section in
step 14.
Repeat the previous step for the ADIdentity Service, and remove the code added to that
config file. Logging has now been disabled for these two services.
Open Task Manager, and stop the Broker and ADIdentity services.
Open C:\XDLogs and delete the log files and the XDLogs folder.
Navigate to \\AD\Software and copy the Service Checker application.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
54.
55.
56.
57.
Action
You will see n Exception message similar the following:
The message points to the Broker service as being unavailable.
Open the Task Manager and start the Citrix Broker service.
Note: The Broker service must be running to launch the Service Checker application.
Click the Refresh button in Service Checker, or reopen the application if closed.
The Service Checker should indicate the following message: AD Identity Service not
started! Click Yes to start the service.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
58.
Action
The tool will load all Citrix services currently running. There is also an option to Reset
Service Instances, providing a quick and easy method to rest Citrix services.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
59.
60.
61.
Action
Open the Tools folder at \\AD\Software again, and copy over the LogEnabler folder.
Launch the LogEnabler application. Check each of the listed Citrix Services to enable
logging.
Check the Overwrite Existing Log Files check box to overwrite logs each time they are
collected.
Go to C:\ and notice the XDLogs folder has been created by the Logging Enabler tool, as
well as a log file for each of the services.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step Action
62. TTo disable logging, check the services you wish to stop logging and click Disable Logging.
Note: Logging Enabler can also be used to enable logging on the VDA.
Summary
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Key
Takeaways
NOTES
The key takeaways for this exercise are:

CDF Tracing is enabled by default for all .Net Services

Clear text logging must be manually enabled and configured by editing each
service.Config file

Tools such as XenDesktop service checker can be used to monitor the state
of key controller services and restart them if needed

Logging enabler is a great tool which can be used to automate the clear text
logging facility for the .net services on Controllers and VDAs
Ref: How to Enable the Controller Service Logging Feature of XenDesktop 5 http://support.citrix.com/article/CTX127492
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 12: PortICA and VDA Logging
In this exercise we will look at the available options to enable logging in a XenDesktop 5.6 environment.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 5 minutes.
Step Action
1.
To enable PortICA logging on the Win7VDA1 VIRTUAL MACHINE , log on as an
administrator in the lab environment with the credentials provided.
2.
Create a new folder called XML at C:\Program Files\Citrix\ICA
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
3.
Action
Open notepad and enter the following lines of code:
<?xml version="1.0" encoding="utf-8"?>
<Config xmlns="Portica.xsd">
<Portica>
<LogFile>
<LogLevel>9</LogLevel>
</LogFile>
<CdfTrace>
<LogLevel>9</LogLevel>
</CdfTrace>
<FunctionTrace>
<LogLevel>9</LogLevel>
</FunctionTrace>
</Portica>
</Config>
4.
5.
6.
Note: LogLevel options are 0, 1, 5, or 9 (0 being the lowest, and 9 capturing all available
output.
Name the file PortICAConfig.xml and save in C:\Program Files\Citrix\ICA.
Restart the Citrix ICA Service.
Log on to Win7Client virtual machine as training\administrator with password Citrix123
and Launch Internet Explorer and enter 192.168.10.14 in the address bar and hit return.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
On the XenDesktop log on screen, log on as User1\Citrix123\Training to start the desktop
session.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
8.
9.
10.
Action
Once log on has been successful, switch back to WinVDA1, and locate
C:\Windows\ServiceProfiles\LocalService\AppData\Local\Temp
Note: for a Windows XP OS, use the file path
C:\Documents and Settings\LocalService\Local Settings\Temp
The log files are created with the following format: porticaSvc_<timestamp>.log
Note: the portICA log files do not overwrite previously captured logs.
Now that PortICA logging has been enabled, let’s proceed to enable logging for the services
on the VDA.
Go to %ProgramFiles%\Citrix\Virtual Desktop Agent\ and open the
WorkstationAgent.exe.config file in Notepad.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
11.
12.
13.
14.
Action
Search for the <appSettings> tag and replace existing code with the following lines:
<appSettings>
<add key="LogToCDF" value ="1"/>
<add key="LogFileName" value ="c:\XDLogs\vda_log.log"/>
<add key="OverwriteLogFile" value ="1"/>
</appSettings>
Save, and close the file.
Create a folder at C:\ called XDLogs.
Open Task Manager, and restart the WorkstationAgent service to start logging.
15.
Note: You do not have to restart the desktop to initiate the logging process.
To disable logging, stop the WorkstationAgent service and delete the XDLogs folder on C:.
Summary
Key
Takeaways
The key takeaways for this exercise are:
PortICA logging is not enabled by default on the Virtual Desktop Agent. PortICA
logging, in addition to enabling the Workstation Agent log, can be a useful tool
when troubleshooting issues with the Virtual Desktop Agent and the ICA stack.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 13: Using WinRM.exe to troubleshoot
Desktop Director Issues
Overview
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
In this exercise, you will use the WinRM command which is helpful when isolating the cause of Desktop
Director Issues.
Step-by-step guidance
Follow the steps to complete the tasks:
Estimated time to complete this lab: XYZ minutes.
Step Action
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
1.
Action
As a pre-requisite for this exercise, add User10 as an Help desk Administrator by clicking on
Configuration  Administrators node in Desktop Studio, and selecting Add
Administrator.
Note: Make sure Enable this Administrator/group is checked. Also ensure the Win7
the Desktop Groups tab as in the below
screenshot.
Exercise 1: Manually
a XenDesktop
site selected
Database under
Existingcreating
Desktop
Group has5.x
been
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
2.
3.
4.
5.
6.
7.
Action
Go to the Win7Client virtual machine and logon to the Web Interface at
http://192.168.10.14 as User1 with password Citrix123 and check the machine name.
Switch to the DDC1_56 virtual machine and logon as help desk administrator with the
following credentials:
User name: user10
Password: Citrix123
Open the Desktop Director console by double-clicking the icon on the desktop.
Type User1 in the search box to see the details of the user’s session.
Take a look at the machine/session details and HDX information, and check if all the
attributes are displayed.
Open a command prompt and run the following commands in order to see if data is
returned via WinRM. Use the machine name from Step 2 as the hostname:
winrm get
wmi/root/cimv2/Win32_ComputerSystem?name=<hostname> fragment:TotalPhysicalMemory -r:<hostname>
winrm get wmi/root/citrix/Citrix_VirtualChannel_Flash r:<hostname>
8.
Open a command prompt as administrator, and run the same commands and observe if you
can obtain data via WinRM.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
10
.
11
.
12
.
Action
Switch to Win7Client and turn to the launched virtual desktop. Open the command
prompt and run as administrator.
Run the following to grant the required permissions to access information via WinRM:
D:\x86\Virtual Desktop Agent\ConfigRemoteMgmt.exe
/configwinrmuser training\helpadmin
Switch back to DDC1_56 and run the commands as user10 in Step 7 to obtain data via
WinRM.
Turn to the Desktop Director console, and refresh the session details page of User1.
Observe that all the attributes in machine/session details and HDX panel.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
NOTES
The key takeaways for this exercise are:

You can use the WinRM command to isolate Desktop Director issues:
whether the cause resides in Desktop Director itself or on DDC (WinRM).
Refer to eDocs for the required permissions on the desktop machines to retrieve
information via WinRM.
Exercise 14: Changing the WCF ports used for
communication between DDCs and VDAs
Overview
By Default, XenDesktop 5.x brokers and VDAs use port 80 for all WCF communication. In this exercise,
you will learn how to change the default ports used on both the DDC and VDA for site communication
[HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\VirtualDesktopAgent\Installdata\WCF_PORT]
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step-by-step guidance
Follow the steps to complete the tasks:
Estimated time to complete this lab: 45 minutes.
Step Action
1. Logon to the DDC1_56 virtual machine as training\administrator with password Citrix123
2. From a command prompt browse to the following directory:
C:\Program Files\Citrix\Broker\Service
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
3.
Action
Type BrokerService.exe /show to view the WCF port used by the Broker to
communicate with the VDA.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
4.
Action
Type BrokerService.exe –vdaport 89 to change the WCF port used to 89.
Type BrokerService.exe /show again to confirm change.
Note: BrokerService.exe –vdaport <port> achieves the following:
 Changes the port number in the broker service configuration file
(‘BrokerService.exe.config’)
 Change the windows firewall settings to allow comms on the port
 Change the Windows HTTP sharing settings (see ‘netsh http add/remove/show
urlacl’) to allow listening on the port/URL combinations needed
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
5.
Action
Logon to the AD.training.lab VIRTUAL MACHINE as training\administrator and
password Citrix123. Launch the Group Policy Management from the shortcut on the
desktop, and edit the CTX_GPO Group Policy Object
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
6.
Action
Expand Computer Configuration\Policies\Citrix Policies and edit the existing machine
policy named “Registration”.
Add the following setting:
Controller Registration Port: 89
Note: The Controllers setting was previously configured to facilitate the registration
process of machines in the lab environment.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
7.
Action
Logon to the Win7VDA1 VM as training\administrator with password Citrix123
Open the command prompt and run:
gpupdate /force /target:computer
Note: The WCF port used by the VDA to communicate with the DDC (when using
registry based registration) can also be manually configured by creating the
ControllerRegistrarPort (REG_DWORD) value under
HKEY_LOCAL_MACHINE\SOFTWARE\Citrix\VirtualDesktopAgent\
Exercise 1: Manually creating a XenDesktop 5.x site Database
Gotcha: If Reconfiguring the VDA itself and changing the default WCF port used for
Overview
incoming communications (not to be confused with the ControllerRegistrarPort above) the
ControllerRegistrarPort registry value is actually created and inherits the WCF port set
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
during VDA reconfiguring process. This can cause issues if you are using registry based
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
registration and want the WCF ports to be different on both ends. In this situation, the
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
ControllerRegistrarPort will match the WCF_PORT value created during install and not
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
the port recently changed on the DDC for incoming VDA communication.
appropriate permissions to create the XenDesktop database.
Ref: http://support.citrix.com/article/CTX131263 (Fixed in Jasper)
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
8.
Action
Verify that the policy settings have taken affect by navigating to:
HKLM\Software\Policies\Citrix\VirtualDesktopAgent
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
9.
Action
Observation: The default VDA WCF port (incoming communication from Controllers)
C:\Program Files\Citrix\Virtual Desktop Agent\WorkstationAgent.exe.config
Note: This is the port configured during installation of the VDA and which defaults to 80
for XenDesktop 5.x VDA
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
Action
To change the WCF port used by the VDA for incoming communication reconfigure the
VDA installer through add/remove programs.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
11.
Action
Click “Reconfigure the VDA” and enter credentials if prompted.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
12.
Action
Change the port used by the VDA to register with the Controller (WCF port used for
incoming communications) to 85, and select “Configure at a later time”  Click Next &
Finish to complete the installation.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
13.
Action
Reboot VDA for changes to take effect.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
14.
Observation: Once rebooted, switch back to the Win7VDA1 machine, and review the
WCF_PORT value in the registry:
HKLM\SOFTWARE\Citrix\VirtualDesktopAgent\InstallData\WCF_PORT
(REG_SZ)
Note: This value is set by the meta-installer during initial install and re-configuring.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
15.
Observation: If re-configuring the VDA, and changing the WCF port for incoming
communication, the installer also creates the “ControllerRegistrarPort” (REG_DWORD)
value under HKLM\Software\Citrix\VirtualDesktopAgent, which the VDA will use to
communicate with the Controller(s) for registry based registration. By default, this registry
value does not exist and port 80.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
16.
As the ControllerRegistrarPort has previously been set via Group Policy, delete the value
under HKLM\Software\Citrix\VirtualDesktopAgent.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
17.
Observation: When re-confining the VDA, the meta-installer also carries out some other
actions similar to the BrokerService.exe –vdaport <port> command in step 4.
 Changes the port number in the Desktop service configuration file
(‘WorkstationAgent.exe.config’)
 Changes the windows firewall settings to allow comms on the port
 Changes the Windows HTTP sharing settings (see ‘netsh http add/remove/show
urlacl’) to allow listening on the port/URL combinations needed
C:\Program Files\Citrix\Virtual Desktop Agent\WorkstationAgent.exe.config
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
18.
19.
Observation: After changing the WCF ports used for incoming communications on the
VDA and Controllers, and matching the controller WCF port with the value stored in
ControllerRegistrarPort on the VDA – you should not encounter any registration issues.
Quick Steps
VIRTUAL MACHINE :
DDC1_56
Action:
Brokerservice.exe –vdaport 95
Observations:DDC1_56: VDA Port = 95; DDC2_56: VDA Port = 80 (never changed)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
20.
Restart Citrix Desktop Service on Win7VDA1 and review the most recent Application
event log messages:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
Win7VDA1
willthe
fail XenDesktop
to register with
any delivery controller (expected results as the
appropriateNote:
permissions
to create
database.
ControllerRegistrarPort value which is set via HDX policy (set to 89) does not match the
port used by the controllers for incoming VDA communications – now set to 95!
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
21.
22.
Edit the AD policy, and change the Controller registration Port to 95 to match DDC1_56.
From Win7VDA1  gpupdate /force /target:computer.
23.
Restart Citrix Desktop Service.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
24.
Observation: Win7VDA1 will fail to register with DDC2_56 because of a mismatch
between DDC WCF port (80) and ControllerRegistrarPort value on VDA(95)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
25.
Observation: Win7VDA1 will successfully register with DDC1_56 as the WCF port is set
on Controller 1 (95) matches the ControllerRegistrarPort (95) now set via the updated
policy on the VDA.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
The key takeaways for this exercise are:
NOTES
It is not recommend doing reconfiguration steps manually since there is quite a lot of
them. However, you can invoke the Vda Metainstaller from a command line using the
/RECONFIGURE and /PORTNUMBER options like this:

XenDesktopVdaSetup.exe /quiet /reconfigure /portnumber 80
That will change the port number and perform all reconfiguration steps without
invoking the UI.
Exercise 15: Configuring a site to allow OU
based registration to take place.
Overview
In this exercise, you will…
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step-by-step guidance
Follow the steps to complete the tasks:
Estimated time to complete this lab: 20 minutes.
Step Action
1.
2.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Launch PoSH and add the XD snapins/cmdlets by typing:
asnp citrix*
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
3.
Navigate to C:\Program Files\Citrix\Broker\Service\Setup Scripts
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
4.
Type .\Set-ADControllerDiscovery.ps1 –on –existingOuDn “ou=VDI,
dc=training, dc=lab” and hit return.
5.
6.
Note: Review highlighted message which states all DDCs need to be restarted, and all
VDAs need to have the FarmGUID value set correctly in the registry.
Restart the Citrix broker Service on both DDC1_56 and DDC2_56
Logon to the AD.Training.Lab virtual machine as training\administrator with
password Citrix123.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
7.
Launch Active Directory Explorer using the desktop shortcut, and browse to the VDI
OU. Verify the following objects have been created:
Controllers Security Group
Farm SCP OU
RegistrationServices OU
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
8.
Observation: Enabling advanced features for Active Directory Users and Computers
will allow you to view the newly created objects, but will not allow you to view
attributes and values. An advanced AD viewer tool like ADExplorer or ADSIEdit is
required.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
9.
Logon to Win7VDA1 and reconfigure the VDA installation through add/remove
programs.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
10.
Action
Select Training from the “Select from Active Directory” dropdown.
Click Next.
Click Close.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
11.
Open the registry on the Win7VDA1 VIRTUAL MACHINE , and verify the
FarmGUID value has been created under
HKLM\SOFTWARE\Citrix\VirtualDesktopAgent.
Note: Ensure that the value matches the value highlighted in yellow in step 4 when
running the script: 95bd188b-e931-452e-9e78-5cb697deb948
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
12.
Observation: The FarmGUID value can also be centrally managed via the Site
GUID AD HDX policy.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
13.
Verify the Win7VDA1 can register successfully with either of the two Controllers by
reviewing the application event logs.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
14.
Did you kwnow? Now that we have configured the XD site to accept OU based
registrations, VDAs will still be able to use registry based registration as a fallback if
the FramGUID value is missing or invalid.
15.
Launch Desktop Studio on DDC1_56 and remove DDC2_56 from the Training site
by right clicking on the Controller under the Configuration\Controllers node and
selecting Remove Controller.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
16.
Click Yes.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
17.
Click Yes when asked if you would like XenDesktop to update the database
automatically.
Note: Allowing XenDesktop to update the database automatically will ensure the
Controller is gracefully removed from the site, and all service instances are removed
from the service groups.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
18.
When the error below is returned, click details and copy the text into an instance of
notepad.exe and review.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Note: removal has failed and thrown an exception due to the Database being mirrored
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
19.
Connect to the SQLServer2 instance from SQL management Studio on either
SQLServer or SQLServer2, and break the mirror by right clicking on the
CitrixXenDesktopDB database  Tasks  Mirror
Note: If for any reason, SQLServer is the Principle, Synchronized, then break the
mirror on this instance instead.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
20.
Click Yes when asked to confirm the action and click OK.
21.
Logon to DDC2_56 and open an instance of PowerShell with the XenDesktop
snapins loaded. Verify the execution policy, and if set to restricted, change to
unrestricted by typing: Set-ExecutionPolicy unrestricted
Select Y when prompted.
22.
Repeat the above step on DDC1_56.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
23.
Log onto DDC1_56 and DDC2_56 and connect to \\AD\Software\Scripts and copy
the breakmirror.ps1 script to the local C: on each server, and run within the PoSH
session.
Note: This will reset the services on both controllers to DBUnconfigured, and point
all the services to the configured database on SQLServer2 (working database server
after breaking the mirror).
As per step 19, If for any reason, SQLServer is the Principle, Synchronized, then break
the mirror on this instance instead and edit the breakmirror.ps1 script to point to
server value to sqlserver rather then sqlserver2
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
24.
Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123 and launch Desktop Studio.
25.
Repeat steps 15-17 to remove DDC2_56 from the Training site.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
Action
26.
From with an existing or new PoSH session, browse to C:\Program
Files\Citrix\Broker\Service\Setup Scripts run the following command:
.\ Set-ADControllerDiscovery –sync –verbose
Note: Running the Set-ADControllerDiscovery PoSH script with the –sync switch
makes sure the OU used for AD-based controller discovery has the correct set of
controller machines in it. (This option should always be used after controllers are
added to or removed from the site.)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
The key takeaways for this exercise are:

NOTES
Exercise 16: Configuring and managing
XenDesktop 5 using PowerShell (Optional
Exercise)
Overview
In this exercise, you will…
Step-by-step guidance
Follow the steps to complete the tasks:
Estimated time to complete this lab: n/a.
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Step
1.
Action
Using the XenDesktop 5.6 SDK Cmdlet Help, explore what information can be retrieved
and what actions can be carried out using the PoSH SDK
http://support.citrix.com/static/kc/CTX127254/help/index.htm
2.
This exercise is complete
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Summary
Key
Takeaways
The key takeaways for this exercise are:

NOTES
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Lab Notes:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
VDA registration is controlled by a pre-configured AD policy called Registration –
see below:
Note:
-There should be no requirement to change this policy setting.
-AD Computer policy applied at machine start-up and regular AD policy update intervals
(can also be manually updated by running gpupdate /force /target:computer)
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
DHCP has been enabled on AD.Training.Lab with the following range to support
MCS based labs:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Troubleshooting:
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Solution:
Reset config service connection string using powershell
-Close Desktop Studio
-Launch powershell and load XD cmdlets using asnp citrix* command
-Run set-configdbconnection –dbconnection $null
-Relaunch Desktop Studio and select Desktop Deployment again
Exercise 1: Manually creating a XenDesktop 5.x site Database
Overview
In this exercise we will manually create a XenDesktop 5.x Database using the built-in DB creation script.
This script is generated while configuring a site using the Desktop Deployment wizard in Desktop Studio.
In the real world, it is quite possible that an XD admin will not have permissions to create a database on a
standalone SQL server. In this situation, the DB creation script can be given to a SQL admin who has the
appropriate permissions to create the XenDesktop database.
Step-by-step guidance
Follow the steps below to complete the task.
Estimated time to complete this lab: 40 minutes.
Step Action
101. Logon to the DDC1_56 virtual machine as training\administrator with password
Citrix123
Services
Revision History
Revision
Change Description
Updated By
Date
1.0
Original Version
Allen Furmanski
09/12/2011
1.1
Updated draft
Mick Glover
24/05/2012
1.2
Updated draft
Mick Glover
11/06/2012
1.3
Include labs from Miho and Kim
Mick Glover
25/06/2012
1.4
Cleanup and verification
Mick Glover
02/07/2012
1.5
General edits
Mick Glover
25/07/2012
About Citrix
Citrix Systems, Inc. (NASDAQ:CTXS) is the leading provider of virtualization, networking and software as a service
technologies for more than 230,000 organizations worldwide. Its Citrix Delivery Center, Citrix Cloud Center (C3)
and Citrix Online Services product families radically simplify computing for millions of users, delivering applications
as an on-demand service to any user, in any location on any device. Citrix customers include the world’s largest
Internet companies, 99 percent of Fortune Global 500 enterprises, and hundreds of thousands of small businesses
and prosumers worldwide. Citrix partners with over 10,000 companies worldwide in more than 100 countries.
Founded in 1989, annual revenue in 2008 was $1.6 billion.
http://www.citrix.com
© 2010-2011 Citrix Systems, Inc. All rights reserved. Citrix®, Citrix Delivery Center™, Citrix Cloud Center™,
XenApp™, XenServer™, NetScaler®, XenDesktop™, Citrix Repeater™, Citrix Receiver™, Citrix Workflow
Page 253
Services
Studio™, GoToMyPC®, GoToAssist®, GoToMeeting®, GoToWebinar®, GoView™ and HiDef Corporate™ are
trademarks of Citrix Systems, Inc. and/or one or more of its subsidiaries, and may be registered in the United States
Patent and Trademark Office and in other countries. All other trademarks and registered trademarks are property of
their respective owners.
Page 254