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.
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
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.
Right click the “Masters” Device Collection and click on Create Device.
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).
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.
Click Next
Enter the server name of the Provisioning Services server where you stored the vDisk and click Next
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”)
Click Next
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.
Click Next
Click Next
Click on Optimize for Provisioning Services
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.
Click Finish
Click Yes to reboot the server.
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.
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.
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
- Stop the SMS Agent Services
- Move the SMSCFG.ini from C:\Windows to D:\Windows (for example)
- 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
- Stop all AppSense Services
- Open Add/Remove programs and remove all AppSense Configurations (NOT the agents)
- 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
- Stop the RES Workspace Manager Services
- Delete the files and folders under “C:\Program Files x86\RES Software\Workspace Manager\Data\DBCache”
- DELETE the following registry key “HKLM\Software\Wow6432NOde\RES\Workspace Manager\UpdateGUIDs”
- 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.
Click Edit Configuration
Click on Prepare this server for imaging and provisioning
Only select Remove this current server instance from the farm and click Next
Click Apply
Click Close (NOT REBOOT!)
Logoff with the domain account and logon with the local Administrator account to clean op unnecessary user profiles.
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.
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
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.
[…] previous blog was about how to create a Citrix XenApp 6.5 vDisk. In this blog I will show you how to update this vDisk with Provisioning Services vDisk versioning […]
Excellent blog on XA with PVS .
[…] this steps I already created a vDisk as described in this blog: How to create a Citrix XenApp 6.5 vDisk (will also apply for XenDesktop […]
You’re simply the best. Very easy to follow a step-by-step guide.
Thanks!
I don’t know how I am landed here but I don’t regret it.
Bookmarked your blog, thank you very much for sharing your knowledge…I really appreciate it.
Thanks!
Amazing work 🙂 keep it going !
Thanks.
Thanks Robin for the great step by step.
I was wondering if you or anyone else has managed to find a way to script the ImageWizard.exe task in order to automate this fully by running a pre-configured script.
I searched everywhere but there is no mention by anyone not even Citrix Blogs about this.
Cheers
This is an excellent explanation. Can you please also tell us how to use an existing image to create a second image, update it and deploy as a hard disk in the test environment?
Cheers
You can copy the vdisk (in explorer), rename it and than import it to PVS. You can also use vDisk versions as discribed here: http://www.robinhobo.com/how-to-update-a-xenapp-6-5-vdisk-with-provisioning-services-versioning/
Hi Robin,
Thank you so much for this great explanation.
I have only one question : how PVS manage the join-off / join-in AD domain with a new name and a new SID ?
Thanks again,
Kevin.
You must create the AD accounts manually within the PVS console. Make sure you have enabled “Enable Active Directory machine account password management” on the vDisk.
Hi Robin,
Thanks a lot for these all important topics.
Can you share all important things about Netscaler 10 for whcih can help in exam prepration.
Thanks once again
This is better than the documentation even Citrix provides. Thank you for doing this.
Hi Robin,
Great article although I have a question. I am using PVS 7.1 and have followed your article through. All is OK but when I get to step 6 things don’t seem to work. I have logged back in (booting from vmxnet NIC as this VM runs on a vSphere 5.5) and am presented with 3 fixed disks. C: which is the original OS disk – it still has the windows logo on the icon in My Computer. E: which is system reserved and F that is a copy of C:. Both E and F were created by XenConvert. Your article says to format the local hard disk. i can’t do this as when I right click the disk and click format I get the “You cannot format this volume” error.
What could I be doing wrong? Thanks for any help!
Paul.
I thing you still booting from harddisk and not vDisk.
Dear Robin,
Thanks a lot for sharing your Citrix skill among us.
once again thanks!!!
Milind
Hi Robin,
Thanks very much for sharing this topic .
regards
prahallad
Hi Robin,
it’s worth cleaning up the Citrix policies, and Microsoft Group policies.
i.e.,
Delete the HKLM\Software\Policies\Microsoft Key
Delete the HKCU\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects Key
1.C:\ProgramData\Citrix\GroupPolicy
2.C:\ProgramData\CitrixCseCache
3.C:\Windows\System32\GroupPolicy\Machine\Citrix\GroupPolicy
4.C:\Windows\System32\GroupPolicy\User\Citrix\GroupPolicy
Citrix.commands.remoting service will not start:
http://discussions.citrix.com/topic/309116-citrix-xenapp-commands-remoting-service-timing-out/
check for the post from me.
apply similar config for Citrix EUM service as this wont start.
UPDATED:
HKLM\Software\Microsoft\Windows\CurrentVersion\Group Policy Objects Key
Hi Pavon, thanks for the information you provided. If you have a vDisk with policies applied to it in write mode this is the way to clean it up. Better to always edit the vDisk on a machine with an account in a OU with “block policy inheritance” on it so no policy will ever applied on it (except the forced one).
Hi Robin,
Thanks for the wonderful article.
I followed it and now have a working vDisk but the event logs are showing a few troubling errors:
1, (2001) Microsoft Antimalware encountered error trying to update signatures.
2, (23) The event logging service encountered an error (res=5) while initializing logging resources for channel System.
Others are to do with group policies.
Any ideas will be greatly appreciated
Hi Jim, is the Microsoft Antimalware using the Windows Update services? And have you disabled it?
Awesome blog. Thanks for the details.
Thanks!
Hi Robin,
Thanks first and foremost for breaking down this down topic to such a simple set of steps. I have also read the vdisk versioning blog post and is of similar vein and thanks for that too.
Thanks Nalin!