How to perform graceful FsLogix profile cleanup

Table of Contents

Case #

Your are running FsLogix as the profile mechanism in a VDI environment (RDS, Citrix VAD, VmWare HorizonView, etc). Users complain that they receive FsLogix related errors when launching a VSI session. This is frequently related to FsLogix profiles either being corrupt on the SMB shared storage or more frequently that the FsLogix local profile copies are corrupt, inconsistent or have not been deleted properly from the VDI session machine.

Solution #

To resolve the above cases, follow the process below to perform graceful FsLogix profile cleanup:

  1. Set your affected VDI server(s) in maintenance/drain mode and communicate the logoff maintenance to affected user(s).
  2. Logoff all affected user sessions from the session machines.
  3. Open compmgmt.msc and navigate to the Shared Folders --> Sessions node after connecting to the hostname/IP of your file server/cluster.
  4. After all sessions of the affected user(s) to the file server/cluster are closed proceed to the next step. Do not proceed if any file handles are still open and do not attempt to manually terminate them, as this action will lead the profile to an inconsistent state.
  5. Open File Explorer on all affected session machines and check C:\Users folder. There should be no leftovers from the FsLogix profile folder nor from the local_username folder. If such leftovers exist, then you should first run the DelProf2.exe or similar profile cleanup tool to remove them. If this does not work either, you will have to logoff all users from the affected session server, reboot the server and run the profile deletion tool after the reboot.
  6. Open regedit.exe on the affected session machines. Navigate to Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Check all profile keys one by one and delete any which correspond to logged off users. They may be leftovers in the form of a backup entry.
  7. At this point you have a clean state and you can have your VDI users logon again.

It is always a good practice to also schedule periodic health checks of your FsLogix profiles. Utilizing the fslshrinkdisk script on official FsLogix GitHub account should be part of this periodic maintenance.

You can find more detailed guidance and step-by-step procedures for analyzing and troubleshooting Citrix Virtual Apps and Desktops organized by category in my Citrix Virtual Apps and Desktops Troubleshooting e-book.

Powered by BetterDocs