At Citrix Consulting, we are often asked for a step-by-step process to seal a vDisk while performing a minor update when the customer uses Citrix PVS (or MCS). Major vDisk update, or vDisk creation require additional steps.

CCS

There are already many sites and blogs providing such information, and few Citrix KB articles cover some part of it (when dealing with KMS for example), but there was no Citrix public source providing a step by step process based on our experience.

Of course, these steps are not written in stone (especially since they are online…) and all customers environments are different, so please share your own experience in the comment section below.

Please note this process is intended for XenApp/XenDesktop 7.5 and later. XenApp 6.5 requires additional steps (XenApp Server Config tool, clear the LHC…).

  1. Run chkdsk C:\ and reboot
  2. Clean-up event logs if they are not redirected to the cache disk :
    • Via PowerShell -> Get-EventLog -List |%{$_.clear()}
    • wevtutil cl system
  3. if vSphere is used, delete « ghost » NICs :
    • open elevated prompt
    • type : ” SET DEVMGR_SHOW_NONPRESENT_DEVICES=1 “ and validate
    • type : ” Start devmgmt.msc ” and validate
    • click on View and ” Show Hidden Devices “
    • delete « ghost » NICs
  4. run slmgr.vbs /dlv to ensure a proper KMS server and license configuration
  5. If MS Distributed Transaction Service is installed, run msdtc.exe -reset
  6. if MS Message Queuing is installed, clear its cache :
    • NET STOP MQAC
    • NET STOP MSMQ
  7. Run Disk Cleanup on C:\ drive as elevated administrator
  8. Delete local profiles that are not required
  9. Stop Citrix Profile Manager service
  10. If Citrix Profile Manager is configured via GPO, check that its INI in C:\Program Files\Citrix\User Profile Manager has been renamed
  11. Delete Citrix Profile Manager logs from c:\Windows\System32\LogFiles\User Profile Manager if not redirected to the cache disk
  12. if using App-V or similar technology, check for updated App-V content to update the precache within the vDisk image
  13. Perform required “de-personalization” for your antivirus (refer to their KB, as the process will differ based on the vendor)
  14. Perform required “de-personalization” for your monitoring agent (SCOM, Tivoli..)
  15. Perform required “de-personalization” for your other agents (AppSense, RES, SCCM..)
  16. Perform a full antivirus scan on the virtual machine
  17. Stop Client DHCP service
  18. Run elevated : “regedit /s DHCP_clear.reg” (see Dave’s post)
  19. Perform a Defrag on the virtual machine
  20. PvD only: run inventory (with machine shutdown option ticked)
  21. Shutdown the machine if PvD is not used
  22. Perform a defrag of the VHD by mounting it in a WS2012R2 server, on a merged VHD.

Many thanks to Martin Latteier, Sasa Petrovic and Simon Jackson for their help and suggestions

A future update will have a PoSh script to automate some of these steps…

Frederic Serriere,
Architect, Citrix Consulting EMEA