This article describes how to configure XenDesktop 5 with Microsoft Hyper-V and System Center Virtual Machine Manager (SCVMM).
Although there is formal product documentation that covers the use of XenDesktop 5 in a Microsoft Hyper-V and SCVMM environment, this formal documentation assumes that the reader is used to using these Microsoft products.
The purpose of this article is to record the steps necessary to establish an example configuration of XenDesktop 5 in a Microsoft Hyper-V and SCVMM environment. Although this article does not cover the steps necessary to install and configure Hyper-V or SCVMM, it makes fewer assumptions about the reader’s previous experience with these Microsoft products.
While this article only attempts to record a single XenDesktop 5 configuration, it is expected that it also acts as an aid for anyone who is required to create a similar configuration.
This scenario uses a separate SQL 2008 server; however, if you are only creating a Proof of Concept environment, you can use SQL express, which can optionally be installed as part of XenDesktop 5.
Install SCVMM PowerShell SDK on your XenDesktop 5 Desktop Delivery Controller (DDC). Alternatively, install the entire SCVMM management console.
Create a network share for Virtual Desktop Agent (VDA) virtual machines on the Hyper-V server. Ensure it is writable by the SCVMM user on the XenDesktop 5 DDC.
This scenario uses a (non-default) Active Directory Organizational Unit for Virtual Desktop Agent or DDC interaction.
The starting point for this article is the Configuration of XenDesktop 5; it does not include the Installation phase.
On the SQL server, create a clean, empty database.
Note: The collation sequence for this database must be Latin1-General_CI_AS_KS, which is generally not the default.
On the XenDesktop 5 DDC, choose Desktop deployment.
Fill in the information in this page.
This scenario assumes the license file is in the normal location.
Enter the name of the database created in step 1.
Do not click Test connection at this point; instead, click Generate to generate a script to create a database schema. This script pops up for your inspection.
Save the script as something.sql and copy it to the SQL server.
On the SQL Server, execute the script as a query, ensuring that SQLCMD mode is selected.
On the DDC, click Test connection to test your newly created database.
Click Next.
Fill in the information in this form:
Address is the IP address of the SCVMM server that knows about your Hyper-V server.
If your XenDesktop Controller (DDC) is not in the same domain as your Hyper-V server, you might be required to ensure that the preceding user is authorized to control the Hyper-V server.
Hyper-V can be configured to store its authorization configuration in Active Directory (AD) or in a local XML file. After the initial installation it will always be configured to use a local XML file located at \programdata\Microsoft\Windows\Hyper-V\InitialStore.xml on the system partition.
Open the Run dialog (start it from the Start menu or press Windows Key + R).
Run mmc.exe.
Open the File menu and select Add/Remove Snap-in.
From the Available snap-ins list, select Authorization Manager.
Click Add then click OK.
Click on the new Authorization Manager node in the left panel.
Open the Action menu and select Open Authorization Store.
Choose XML file for the Select the authorization store type then use the Browse to open \programdata\Microsoft\Windows\Hyper-V\InitialStore.xml on the system partition (programdata is a hidden directory so you must type it in first).
Click OK.
Expand InitialStore.xml > Microsoft Hyper-V services > Role Assignments then select Administrator.
Open the Action menu and select Assign Users and Groups then From Windows and Active Directory.
Enter the name of the user that you want to control Hyper-V and click OK.
Close the MMC window (you can save or discard your changes to Console 1 - this does not affect the authorization manager changes that you just made).
The user that you added can completely control Hyper-V, even if they are not an administrator on the physical computer.
Click Next.
On the next screen, click Add and identify the Hyper-V server, Store (//share), and network to be used.
Note: If no Storage is returned after browsing to the Cluster (Hyper-V server), it might be that the user selected in a previous screen has not been authorized to control the Hyper-V server.
Click OK.
Click Next to review the Initial configuration.
On the domain controller, create an OU called Rhone5133 (for example)
On the XenDesktop controller run the following PowerShell commands, and restart the Controller Services.
>CD “C:\program files\Citrix\Broker\Service\Setup Scripts”
>Set-executionpolicy remotesigned
>.\Set-ADControllerDiscovery.ps1 -on -containingOuDn "OU=Rhone5133,DC=ny2,DC=phony,DC=com"
Restart the Citrix Broker Service on your XenDesktop controller.
On the Virtual Desktop Agent (VDA) master virtual machine, choose Install Virtual Desktop Agent.
Choose Advanced Install.
Click Next.
Select the OU that you have recently created.
Click Next to review the summary and choose Install.
When the installation is complete, you must restart the virtual machine to complete the installation.
Close the virtual machine and take a snapshot.
Note: This snapshot will be used as the master virtual machine for Virtual Desktop Agents created by the XenDesktop controller.
On the DDC, choose Machine creation.
Click Configure.
Make your choices and click Next.
Select your master image and click Next.
Click Next.
Select the OU where you want the computer accounts stored.
Devise a naming scheme ending with one or more # symbols.
Click Next.
Click Next.
Click Finish, and wait for your virtual machines to be created.
On the DCC, for User assignment, choose Configure.
Click Next.
Select the users and groups that are permitted to use the machines.
Click Next.
Select the help desk administrators that are permitted to manage this Desktop Group.
Click Next.
Click Finish.