VHD (short for Virtual Hard Disk) is a file type spec that allows a hard drive system to be contained into an individual file. This file can be used as a boot partition on physical hosts and virtual machines. The VHD format is NOT proprietary to Citrix but is rather a Microsoft-maintained technology. We use it in PVS as a virtual disk image of an Operating System that a PVS target device can boot to from the network. For more information on VHD, visit this MSDN web resource.
Many of us, logging geeks, are used to debugging problems in our infrastructure by looking at historical logs (which most every application nowadays has) to pinpoint these issues. Why? Because generally logs never lie. And people do.
If you deploy or manage a Citrix environment, you are also well aware by now how important logs are for troubleshooting regardless if you do it yourself or you call Citrix Support. In PVS 5.x and 6.x, if logging is enabled, you would normally see the following logs under C:\ProgramData\Citrix\Provisioning Services\Logs:
Each log corresponded to a process. For instance, if you are troubleshooting an issue with the Console GUI you would be looking at Console.log, the stream process would log to StreamProcess.log, etc. In PVS 7.x, however, server-side historical logging is no longer enabled through PVS nor it’s located under the same directory. Our modules are now integrated in Citrix Diagnostic Facility (or CDF) much like XenApp, XenDesktop and Citrix Receiver/ICA Client. There are two options that you can use to generate and collect a single CDF trace from PVS:
1. CDF Control (download it from CTX111961)
This tool is nice and easy. All you need to do is download it on your PVS server, extract it, run it as an Administrator, and start a trace (preferably select all modules). This works great if your issue is reproducible at will (for example, a MAPI error when launching the PVS Console). The trace is generated as a .ETL file in the same folder you installed CDF Control and can be viewed from the same tool or parsed to a .CSV file to open in a more convenient program such as Excel.
2. CDF Monitor (download it from CTX129537)
This is a very, very powerful utility. A bit more complex to install but adds a real value to your environment. It runs as a Windows service and generates a circular CDF trace under C:\Windows\CDF Monitor. There is a config file that comes with it and for PVS there is an extra step to go to CTX138698 and download the PVS-specific config and place it in the CDF Monitor installation folder to replace the original one. Luckily, full instructions on how to deploy CDF Monitor are provided in the same article. I highly recommend this tool for capturing intermittent issues and root cause analysis of production outages.
Note: CDF tracing is only integrated with PVS 7.x. There are no CDF modules for previous versions. Target-side logging can still be enabled from the PVS Console and is logged into CDF. ConfigWizard and Console logs are still available under the old folder.
Enjoy the deep dive!
My name is Konstantin Cvetanov and I am a Technical Consultant in Atlanta, Georgia. I specialize in design and implementation of virtualization solutions for companies of all sizes and industries. Before my current role, I worked at Citrix as an Escalation Engineer fixing issues of high complexity, mitigating production outages, and finding bugs in the code. During my time at Citrix I specialized in the Provisioning Services product line and that’s when I made this website to share my experience with other IT enthusiasts out there. I’ve recently added new sections to talk about other products like XenDesktop and NetScaler, but make no mistake – PVS will always be my baby!
DISCLAIMER: The knowledge produced on this website is only for the purposes of helping the community through sharing personal experience and point of view and in no way does it represent any support statements from the company I work for nor it bears any responsibility from Citrix.
In today’s HOW-TO edition we’ll cover a fairly simple but very important method: applying a cumulative hotfix that requires a full reinstall of PVS on your two HA configured Provisioning servers. Here are the steps:
1. Download a hotfix such as CPVS61019 from https://support.citrix.com.
2. Stop the Stream service on PVS01. Your targets should fail over to PVS02. Reinstall PVS Console and Server software from the hotfix package on PVS01.
3. Rerun the PVS Configuration Wizard. When presented with farm options, select “Farm is already configured.”
4. Breeze through the Config Wizard. Fortunately, the tool selects by default your previous configuration settings, so no need to change anything unless you really need to. If the process completes successfully, Soap and Stream services will be restarted automatically.
5. Stop the Stream service on PVS02. Your targets should fail over to PVS01. Repeat the same procedure 1-3 on PVS02. You can then rebalance your targets manually if needed.
6. You are done.
Note: I generally recommend scheduling a maintenance window for updating your servers. Even though the procedure can be finished in 10 minutes, you don’t want to find yourself in a situation where HA failover doesn’t work as expected and you lose half of your connections when stopping the services.
Easy wasn’t it? 🙂
As many of you have noticed, PVS 7.1 has a brand new cache type called “Cache in Device RAM with Overflow on Hard Disk.” This new feature of PVS is designed to provide better performance by combining the light speed of RAM with the efficiency of hard disk storage and at the same time avoiding previous hurdles such as unexpected BSOD when using RAM cache due to the memory getting filled up. The new differencing format of the file (VHDX) also resolves the issue when caching to device HD where applications accessing printer drivers would randomly crash.
As some of you have noticed, however, target device performance has not increased dramatically in terms of speed. In fact, some folks out there with IOMeters have reported that IOPs have not improved at all with the new cache type. This is currently a known issue due to a problem turning on the RAM portion of the cache and I know for a fact that Citrix is working on fixing it in the next hotfix release for PVS 7.1. So stay excited!
The RAM portion of the this cache type is fixed in CTX140338 which is a target device hotfix.
If you ever get locked out of your PVS Console because someone in your organization changed Active Directory membership groups around, you will need to find out what security groups have permission to access the farm. It’d be super-easy if you could just open your Console…Security tab under Farm Properties. But what if you lost access?
…Fortunately there is a way because it’s all in the database. All you need to do is login to your SQL server, launch SQL Management Studio, expand the PVS database, right-click on the dbo.AuthGroup table, select top 1000 rows, and you will see a list of all the AD user groups that have permissions to access the farm. Then you will most likely realize that your Console user is NOT a member of any of those groups!
Reverse imaging can be a tedious procedure for some of us but is necessary to keep our vDisks up-to-date with hypervisor tools and cumulative hotfixes for PVS. Here are my 14 steps:
01. Boot your target device to the vDisk you want to reverse image with additional disk attached (same size or larger than the vDisk).
02. Make sure the new disk is visible in Windows Disk Management and mounted as a drive (i.e. D:\).
03. Use BNImage or XenConvert to copy the vDisk to the added drive (both tools are located under C:\Program Files\Citrix\Provisioning Services).
04. Make sure the new volue is set to Active in Disk Management.
05. Set the device to boot from Hard Disk in the PVS console.
06. Boot the device to Hard Drive by manually changing the boot order in BIOS.
07. Remove any antivirus software (Reboot).
08. Remove PVS target device software (Reboot).
09. Update hypervisor tools if necessary (Reboot).
10. Install latest PVS target device software (Reboot).
11. Run the PVS Imaging Wizard (System will reboot automatically and will continue to finish the conversion process). Before reboot change the boot order in BIOS to Network boot.
12. Switch the device to boot from vDisk in the PVS console (in Private or Maintenance Mode).
13. Install Antivirus software.
14. You are done.
What are yours? 🙂
CPVS61019 (widely known as Hotfix 19) is the most current patch for PVS 6.1. It contains both server and target binaries and it’s essentially a full reinstall of PVS. Yes, it does require reverse imaging to upgrade your targets but in turn you get a whole lotta fixes from Stream Process to HA failover and Console performance improvements. Highly recommended! Get it here.
In order to work properly in a read-only OS environment, PVS requires persistent storage for a write cache. All data about activities during a vDisk connection is written to this temporary file called write cache. WC (yes, looks awful lot like the European term for toilet) only grows in size and never decreases. Fortunately enough, it is flushed upon reboot. You have three places you can store the WC – locally on the target device hard drive, in the target RAM, or in a directory on the Provisioning Server itself. The new version of PVS 7.1 allows for a forth option – cache on RAM with overflow on HD.
Citrix Provisioning Services is a UDP-based streaming technology designed to deliver an operating system (vDisk) to client devices over the network. PVS uses PXE protocol specs (UNDI) to boot a target device (PXE client) and deliver a bootfile program that contains the instructions necessary to login to a Provisioning Server and start streaming the virtual disk over the network.
There are three really great things about PVS:
1. Single image management
Imagine you have a data center with 100 XenApp servers. Using traditional methods of server management, you would need to login to each and every one of them to make changes such as application updates, Windows patches, and lots of different things or maybe use GPOs to enforce certain modifications, etc.
With Citrix Provisioning Server (PVS) you can use a designated machine as a golden image, create a virtual disk from its hard drive, and assign it to hundreds or even thousands of servers for OS delivery. Since a vDisk has 2 modes – read/write and read-only, you can modify the image in read/write (Private mode) from one device and then stream to all your devices in read-only (Standard mode). That way all the changes made in Private mode update the VHD and can then be streamed to the rest of your devices in Standard mode propagating the changes you made instantaneously!
2. The Power of Read-Only
Read-only VHD is a truly powerful feature of PVS. Every time a machine is connected to a virtual disk from PVS, any changes made by users to the OS (outside of their roaming profiles) are flushed upon reboot! So, let’s say for instance, user John logs into a provisioned target device (e.g. XenApp server, XenDesktop, Windows endpoint, etc.) and messes with network adapter settings, clock, registry, etc., those changes are gone once the machine is shut down. Also, think about viruses! 🙂
PVS is fully enterprise-ready. Not only you have the option of adding existing machines to Device Collections in the PVS Console but in a virtual environment you can spin them yourself! XenDesktop Setup Wizard and Streamed VM Setup Wizard are at your disposal to quickly create new VMs on the fly when you need them.