Citrix Personal vDisk: Troubleshooting and Fixing Misbehaving Applications

Background Info

At a client site recently I found myself troubleshooting an issue with an Oracle JD Edwards (JDE) application that was installed on the Windows 7 master image in a XenDesktop 5.6 environment utilizing Machine Creation Services (MCS) along with Personal vDisk (PvD). The client was getting very frustrated with Citrix XenDesktop since PvD was not saving their user’s settings and work they performed within the JDE application after either an administrator or the user restarted their VM. These particular users were developers and at times would code for hours or even days. So, losing days’ worth of work was not acceptable not to mention the main reason the client invested in Citrix XenDesktop was to utilize PvD in lieu of dedicated desktops to save on management and storage cost. For some reason Personal vDisk was not capturing everything they did within the JDE application. Yet, it was working as it should for all other applications. So, I went on a mission to find out why.

Although PvD is designed to intercept all I/O request, I found that it may not write some of those request to the PvD. But, instead it may direct those writes to the “C: drive” which in the case of this client was the MCS differencing disk. The Differencing Disk automatically gets overwritten by a snap shot of the Base VM every time a user Shutdowns there machine or a power command is sent from XenDesktop Director or Studio. Hence the JDE application settings are being overwritten.

Personal vDisk Troubleshooting and Update Process

Collect / Review Logs on VDA

One of the first steps in troubleshooting a PvD issue is to gather and review the logs on a Virtual Desktop Agent (VDA) that is experiencing the issue. To do this:

  • Log onto the VDA
  • Open an Administrator command prompt
  • Navigate to: C:\Program Files\Citrix\personal vDisk\bin
  • Run ctxpvd.exe -log to create a single PVDLOGS folder under the %temp% directory that contains all the PvD related logs in one place. This keeps you from having to browse to multiple folders to locate the logs.
  • Click Start, type %temp% to launch windows explorer and locate the PVDLOGS folder
  • Review the logs files and look for errors and failures.
  • A great reference for understanding PvD logs can be found here: Understanding Personal vDisk (PVD) Log Files

Review file write activity of the application

If no obvious failures are found in the PvD log files as was this case, the next step it to understand how the application (JDE) behaves and what it’s attempting to write to the hard drive while it’s running. In order to observe an application’s file write behavior perform the following.

  • Download and install Microsoft’s Systernals Suite, You’ll only need the Process Monitor utility. But, it’s good to have all the tools on hand.
  • On the VDA experiencing the problem, run Procmon.exe from the folder you extracted the Systernals Suite to.
  • Select File and un-check Capture Events. This will stop Process Monitor from collecting until you are ready to start your application.


  • Start by including the Operation Filters “WriteFile” and “CreateFile”. To do this Select Filter from the File Menu bar and then Filter. In the 1st drop down list select “Operation”, select “is” in the 2nd drop down, and finally WriteFile for 3rd drop down. Click Add. Repeat this process for the CreateFile Operation.



  • When you are ready to capture events for your application, Select File and select “Capture Events”.
  • Start your application and log in if it is password protected.
  • You’ll notice your application starting along with a whole host of others. Go into your application and perform what you would consider normal task or operations for this application.
  • Once you feel comfortable that you’ve captured enough file writes for your app, Stop the capture process.
  • Save your Process Monitor log. File / Save. This will allow you to go back and reload this capture at any time.
  • You now can start filtering out other unnecessary Process Names that are not relevant and narrow down the list only to your application. In this case with the JDE Application the primary Process Names are Oracle.exe, activConsole.exe, and TNSLSNR.exe.
  • You can also save your filters to a file and import them into Process Monitor so they can be used again and again.
  • Look for file writes being performed by your application that are only going to C: drive and not Personal vDisk hidden “V: drive”. If you see files that are only being written to C: drive that must be kept persistent as part of the users PvD, make note of them.
  • Notice in the sample below the highlighted in yellow “C:\Oracle\oradata\E1LOCAL\CONTROLFILE\O1_MF_83ZFP01M_.CTL” and “C:\Windows\jde.ini” are only being written to C:. However, other files such as “V:\E910_1\system\bin32\activConsole.exe.Local” and “V:\E910_1\system\bin32\activConsole.exe.Local” highlighted in Red are being written to both C: and V:.


  • Along with combing through the list of files from the Process Monitor console you can also take advantage of the Process Monitor File Summary reports. This will reduce the amount of time it takes to comb through a very large list of files. Trust me it can be a huge time saver. To access the reports, Select Tools, File Summary. You’ll notice 3 tabs (By Path, By Folder, By Extension). Browse through all the Tabs again looking for files not being written to V: drive. Depending on your application will depend on which Tab will help you the most or you may find all of them useful.



  • If you need to send one or all three list to someone else for further analysis, you can simply click Save to export the reports in .csv format.
  • Seen below, I found it useful to import them all into one single Excel Workbook with 3 Worksheets formatting each worksheet as a Table. This helps with sorting and viewing the data.



Modify PvD Rules File

Once you know the files that need to be included in the PvD, you can modify the files_rules.txt file to include them in the PvD catalog. This must be done on your “Base VM” or “Golden Image”. The rules files are located in C:\ProgramData\Citrix\personal vDisk\Config.


Highlighted below are the changes I made to the files_rules.txt file.


Note: If your current version of XenDesktop is 5.6.0, any file rule modifications will be overwritten if you upgrade to 5.6.7. So, always backup your changes.

Update Inventory and Resize UserData.VHD

After you’ve modified the rules files it’s necessary to re-inventory the Base VM.  Updating the inventory on the Base VM can be done 2 ways.

1. Select Update Inventory from the Citrix Start Menu folder


2. Open Administrator command prompt. Browse to C:\Program Files\Citrix\personal vDisk\bin and type CtxPvd.exe –s inventory.

  • While the inventory is running open an explorer window and browse to \ProgramData\Citrix\personal vDisk\. Be sure to pay attention to the size of the VHD temporary template file, UserData.vhd.tmp. The default size is 2GB and can easily be reached after modifying the files_rules.txt file as it did in this case.
  • If the inventory process fails (Like it did with the JDE Application) check the size of the UserData.vhd.tmp file. If it’s over 2GB, then this is more than likely the reason for the Update Inventory failed and the UserData.vhd.tmp file needs to be resized. To resize the VHD template file perform the following.
  • Open an administrator command Prompt, browse to folder C:\Program Files\Citrix\personal vDisk\bin.
  • Run VHDtool grow -n “C:\ProgramData\Citrix\personal vDisk\settings\UserData.vhd” -s 16106127360
  • In my case I needed to increase the template to 15GB.

NOTE: The -s is the desired size in bytes.

  • After the size has been expanded re-run the inventory.
  • After running a successful inventory review the PvDSvc.log.txt file located at C:\ProgramData\Citrix\personal vDisk\LOGS\.
  • You will notice the folders and files that you just added to the Files_Rules.txt file are now being written to the V: drive. The message in the log file will indicate the file “got relocated to the guest volume”.


  • Shutdown and take a snap shot of the Base VM.
  • Update the XenDesktop Catalog “update machines” with the new Snap Shot version of the Base VM.
  • Retest the application and confirm settings are now being saved after a Shutdown.

Additional PvD Info

Resetting a user’s Personal vDisk

From time to time the need arises to reset a user’s Personal vDisk back to default. This can occur if the users installs something that make adversely affect there machine. In the JDE case when a users P: drive runs out of space the local Oracle database becomes corrupted and resetting the PvD places the default databases back on the users P: drive thus resolving the issue.

Note: Resetting a users PvD will remove any user installed applications and Shutdown the user’s VM.

Resetting a user’s PvD can be accomplished in two ways:

1.  A reset can be done from an Administrator command prompt by running CtxPvd.exe –s reset from the User’s VM.


2.  From within Desktop Director by selecting “Reset Personal vDisk” under Machine Details of the user’s machine

Citrix Personal vDisk Guides

1. Citrix Personal vDisk Implementation Guide:

2. Citrix Personal vDisk Planning Guide:

3. Citrix Personal FAQ:


About the Author

Greg Bourgeois, CCA

Seasoned IT Professional backed by over 16 years of IT experience with broad experience in planning, designing, implementing and supporting core IT infrastructure solutions utilizing Microsoft and Citrix technologies.  Focused in Enterprise Application and Desktop Virtualization Assessment, System Design & Implementation.  

This entry was posted in General Citrix and tagged . Bookmark the permalink.

One Response to Citrix Personal vDisk: Troubleshooting and Fixing Misbehaving Applications

  1. WOW just what I was looking for. Came here by searching for white paper on cloud computing

Leave a Reply to investing in cloud computing Cancel reply

Your email address will not be published. Required fields are marked *


− 5 = two

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>