How to resolve FsLogix error with status code 0x00000064

Issue

In a Citrix VAD or Microsoft RDS or Windows Virtual Desktop environment you may come across the following FsLogix error status code 0x00000064. Similar behavior can occur with FsLogix error status codes 0x00000016 or 0x00000009.

The FsLogix log (user profile) may report any of the following:

[ERROR:00000002] Prep2 (The system cannot find the file specified.)

[ERROR:00000020] Delete profile failed for sid [usersid], Cleaning up manually. (The process cannot access the file because it is being used by another process.)

Resolution

First of all gracefully logoff the affected user(s) and set the affected servers in maintenance mode.

Watch the status of the file (SMB) sessions originated from the affected user(s) to the FsLogix file server. Only when all file handles and sessions are gracefully terminated, proceed to the next step.

Cleanup the local profile folders which may have remained as leftover in the Citrix VDA or Microsoft RDS Session Hosts. You may need to use an advanced user profile deletion tool such as delprof2.exe to properly cleanup the local fslogix profile folders. In some cases you may need to logoff all users and reboot the server in question in order to release some processes which are running by the SYSTEM account on the local profiles, before they can be deleted.

Ensure that you check the following registry keys on the Citrix VDA or Microsoft RDS session host server(s) in question and delete all entries associated with the affected user(s). In order to identify which AD SID corresponds to each user, make use of Powershell or the PsGetSid tool from SysInternals.

  • HKLM\Software\FSLogix\Profiles\Sessions<UserSID>
  • HKLM\Software\Policies\FSLogix\ODFC\Sessions<UserSID>
  • HKCU\Software\FSLogix\ODFC\Sessions

In case any vhd(x) FsLogix containers have been moved on the file server to a different target path, you will also need to recheck the NTFS permissions and the NTFS owner of each affected vhd(x) file. In case the owner has been changed, you will need to revert the owner but to the original domain user, in order for each user to be able to read and load their own profiles.

After the above cleanup steps you should be good to go. Disable maintenance mode on your Citrix VDA or Microsoft RDS servers and instruct your users to connect again.

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.

Was this article helpful?

Related Articles