Friday 4 March 2016

How to create a Citrix XenApp 6.5 vDisk

How to create a Citrix XenApp_65 vDisk_banner
After installing and configuring Citrix Provisioning Services Server (as described here) and the Citrix XenApp 6.5 Controller (as described here) it’s time to create the Citrix XenApp vDisk, also known as the “Golden disk”, for the Citrix XenApp 6.5 running in Session-host mode only.
It is highly recommended to use Citrix Provisioning Services when deploying multiple XenApp servers in your farm (hardware must be equal). With Citrix Provisioning Services you can provide a single vDisk for all your XenApp servers. Booting all the XenApp servers from the same vDisk ensures that they all are equal, and since the vDisk is read only, all servers will be in “original clean state” after a reboot.
With that in mind, consider well what you install or configure in the vDisk because it will be present on each XenApp server booting from that vDisk. Additional steps should be taken for some software, for example software that’s need a unique ID or GUID. Also think about the software licenses.
In this step-by-step guide I will create and configure a Citrix XenApp 6.5 vDisk and I’ll give you some tips which you should be aware of. For this case I will use XenApp servers which have a local hard disk for the PVS cache files and some redirections (like the Windows paging file).
Step 1 – Creating and installing the “Master server”
Create a XenApp Master server, this is a server that have equivalent hardware specs with the other servers and will be used to create the Citrix XenApp vDisk. Configure this server to boot from network first.
Install Microsoft Windows Server 2008 R2 with all necessary updates and patches and join the server to the domain. Place the server in an Active Directory OU with little or no policies applied to it (keep the vDisk as clean as possible).
Install Citrix XenApp 6.5 and join the server to the current XenApp Farm. While configuring the XenApp installation, keep in mind to select Enable Session-host mode only as shown below.
How to create a Citrix XenApp vDisk_001
Install the necessary Citrix XenApp 6.5 updates and install the applications that must be available in the Citrix XenApp farm. It’s recommended to automate the installations, for example with Microsoft SCCM.
Step 2 – Create the vDisk within Provisioning Services
Open the Provisioning Services Console and go to Sites > “sitename” > vDisk Pool
How to create a Citrix XenApp vDisk_002
Right click vDisk Pool and click Create vDisk. Select the Store where the vDisk will reside, select a specific server for the vDisk (later you can change this to load balancing) and enter a Filename for the vDisk (anything you like).
Set the size for the vDisk. Normally I have enough of 30 to 50 gb, depending on the installed applications on the server. Set VHD type to Dynamic which means that only the space that is really needed will be used for storing the vDisk. With older versions of Provisioning Services, Dynamic vDisks could give performance problems, this is no longer the case with Provisioning Services version 6.1.
Click on Create vDisk. Check if the vDisk is in Private mode.
Step 3 – Create Target Device within PVS for the “Master Server”
Within the Provisioning Services Console, under Device Collections, create a Device Collection with the name Masters (or anything you like). This is not a required step but is recommended because it is easier to manage later.
How to create a Citrix XenApp vDisk_003
Right click the “Masters” Device Collection and click on Create Device.
How to create a Citrix XenApp vDisk_004
On the General tab, enter the name of the Master server. Select to Boot from Hard Desk and fill in the MAC address of the primary NIC of the Master Server (the NIC the Master server boots from).
How to create a Citrix XenApp vDisk_005
On the vDisk tab, Add the vDisk created in step 2 and click OK.
Step 4 – Running the Provisioning Services Imaging Wizard on the Master Server
Installing the Citrix Provisioning Services Target Device (as described here) and start the Provisioning Services Imaging Wizard.
How to create a Citrix XenApp vDisk_006
Click Next
How to create a Citrix XenApp vDisk_007
Enter the server name of the Provisioning Services server where you stored the vDisk and click Next
How to create a Citrix XenApp vDisk_008
Select Use existing vDisk and select the vDisk created in step 2
(When receiving the error “There are no vDisks available that are in Private mode and not locked accessible by the Server specified” make sure there is no Lock on the vDisk, you can remove the Lock in the PVS console by right click the vDisk and click on the option “Manage Locks”)
How to create a Citrix XenApp vDisk_009
Click Next
How to create a Citrix XenApp vDisk_010
The errors in this dialog means that the target vDisk is smaller than the local hard disk in the Master Server. If you get this errors you have to click on Autofit.
How to create a Citrix XenApp vDisk_011
Click Next
How to create a Citrix XenApp vDisk_012
Click Next
How to create a Citrix XenApp vDisk_013
Click on Optimize for Provisioning Services
How to create a Citrix XenApp vDisk_014
What to optimize depends on your environment, for example in most cases the Windows Autoupdate services can be disabled (also recommended sins the vDisk is read-only). But if System Center 2012 Endpoint Protection is used in the environment, the Windows Autoupdate services is needed for the anti-virus updates. Apply what is applicable for your environment and click OK.
How to create a Citrix XenApp vDisk_015
Click Finish
How to create a Citrix XenApp vDisk_016
Click Yes to reboot the server.
How to create a Citrix XenApp vDisk_017
After the reboot, logon with the same user account. Citrix XenConvert will automatically start to convert the files from the local hard drive to the vDisk.
How to create a Citrix XenApp vDisk_018
Click on Finish
Step 5 – Configure the Master Server to boot from vDisk
Within the Provisioning Services Console open the properties of the Master Server.
How to create a Citrix XenApp vDisk_019
On the General tab and change “Boot from” to vDisk. Click OK
Step 6 – Optimizing and finalizing the vDisk
Restart the Master Server so that it is booted from the vDisk. At this point you can apply optimizations to the vDisk. Which optimizations / tuning to apply depends on the environment. I’ll give you some examples that can be used in most cases.
First of all format the local hard disk of the Master Server and assign the drive letter D to it. By doing this you get the opportunity to redirect the paging file, the Windows Eventlogs and the Print Spooler to it.
Also apply the optimizations from the XenApp 6.x (Windows 2008 R2) – Optimization Guide like “Disable Large Send Offload” and “Disable TCP/IP Offload”.
Some software needs a unique ID or GUID. I hereby give you some examples and how to get this ID’s and/or GUID’s unique on each XenApp server that boots from the same vDisk. Please note that you cannot restart the server after applying these actions.
When using the SCCM Agent that needs to keep enabled
  1. Stop the SMS Agent Services
  2. Move the SMSCFG.ini from C:\Windows to D:\Windows (for example)
  3. Run under an elevated Command Prompt:
  • Mklink C:\Windows\SMSCFG.ini D:\Windows\SMSCFG.ini
  • Run CCMDELCERT.exe (not included in Window Server by default)
When using AppSense DesktopNow or Management Suite
  1. Stop all AppSense Services
  2. Open Add/Remove programs and remove all AppSense Configurations (NOT the agents)
  3. Clear the “Machine ID” and “Group ID” value from the following registry key; “HKEY_LOCAL_MACHINE\Software\AppSense Technologies\Communications Agent\”
When using RES Workspace Manager
  1. Stop the RES Workspace Manager Services
  2. Delete the files and folders under “C:\Program Files x86\RES Software\Workspace Manager\Data\DBCache”
  3. DELETE the following registry key  “HKLM\Software\Wow6432NOde\RES\Workspace Manager\UpdateGUIDs”
  4. CLEAR the following registry key “HKLM\Software\Wow6432NOde\RES\Workspace Manager\ComputerGUID”
Step 7 – Prepare the Master Server for Provisioning Services
For the final step before closing the vDisk, start the Citrix XenApp Server Role Manager.
How to create a Citrix XenApp vDisk_020
Click Edit Configuration
How to create a Citrix XenApp vDisk_021
Click on Prepare this server for imaging and provisioning
How to create a Citrix XenApp vDisk_022
Only select Remove this current server instance from the farm and click Next
How to create a Citrix XenApp vDisk_023
Click Apply
How to create a Citrix XenApp vDisk_024
Click Close (NOT REBOOT!)
Logoff with the domain account and logon with the local Administrator account to clean op unnecessary user profiles.
How to create a Citrix XenApp vDisk_025
Open the System Properties and go to the Advanced tab. By User Profiles click settings and delete the domain user with which you installed and configured Citrix XenApp.
As last, flush the DNS cache (ipconfig /flushdns) and run the Disk Cleanup program (cleanmgr.exe).
Shutdown the Master server.
Step 8 – Deploying the vDisk
Within the Provisioning Services console, open the properties of the vDisk.
How to create a Citrix XenApp vDisk_026
Change “Access mode” to Standard Image (multi-device, read-only access) and select the place where you want to store the cache files. Enable Active Directory machine account password management.
If you have more Citrix Provisioning Services servers in your environment, right click the vDisk and click on Load Balancing
How to create a Citrix XenApp vDisk_027
Select Use the load balancing algorithm and Rebalance Enabled. Click OK
Open Windows Explorer and copy the vDisk to the other servers.
For the Citrix XenApp Session-host mode only servers I always create a separate Device Collection. You can apply the vDisk to all Citrix XenApp Session-host mode only servers at once by drag and drop the vDisk to the respective Device Collection.
You can now boot all the XenApp servers from the new created vDisk.

No comments:

Post a Comment