Jul 03 2020 02:00 AM
Jul 03 2020 02:00 AM
Windows Virtual Desktop
Teams cached data causes large Profile Container! Take action and save Azure File Share space!
Understanding user profiles: WVD and FSLogix
With Windows Virtual Desktop we can provide virtual workspaces (Full Desktop experience) or applications only (RemoteApp). Conditional access in conjunction with Azure Multi Factor Authentication the user will get a safe sign in experience. In order to save user profile settings it is highly recommended to configure FSLogix Profile Containers. Each time the user signs in the full profile will be loaded (in the background the VHD/VHDX will be attached to the Windows 10 multi-session host) without the needs of reconfiguring the Outlook profile for instance.
Issue: Newly created, or clean, user profile approximately 4.5GB in size?!
Once Teams is installed according to the Teams for VDI installation guidelines (source) and the user starts Teams for the first time I noticed that the profile container size significantly increased within minutes. Weird, right?!
Windows reports that the profile size of the user is only 425MB in size. FSLogix agent reports a 4,4GB profile container. In order to validate, I double checked the size in Azure Files as well which also shows 4,4GB.
How is this even possible?! It’s a clean profile! After further investigation I found out a uservoice topic already exists where this issue is reported. https://microsoftteams.uservoice.com/forums/555103-public/suggestions/34622569-teams-windows-client-...
The cause was explained and confirmed by many others. I also tested this myself, a host pool with Teams and a host pool without Teams. Without Teams the user profile container was approximately 400MB in size.
Which options do we have now?!
Fix: Optimize FSLogix, create exclusions for Teams cached data
The next step by step will explain the solution that worked and has been tested succesfully. Teams performance is still very good, as well for stability. More information about how to create exclusions can be found here https://docs.microsoft.com/en-us/fslogix/manage-profile-content-cncpt .
Things to accept;
I have prepared the XML file. Copy below text into a new text file, save this as “redirections.xml” and store the file in a file share that can be accessed by the user (read permissions is sufficient!). During sign on, the FSLogix copies the XML file to %localappdata%\FSLogix .
<Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Service Worker\CacheStorage</Exclude>
<Exclude Copy="0">AppData\Roaming\Microsoft\Teams\Application Cache</Exclude>
<Exclude Copy="0">AppData\Roaming\Microsoft Teams\Logs</Exclude>
I stored the XML file in NETLOGON location.
Configure the GPO:
Ensure the WVD virtual machines are updated with “GPUPDATE /FORCE” or provide a reboot when no users are signed in.
Delete existing user profile container, of course in agreement with your user!
Result: FSLogix Profile Container without Teams cached data, major reduction in size!
Double check on Azure File Share also reports only 200MB in size. Yeah!
Have a lovely day!
Sep 03 2020 07:22 AM
Can the same be done with the Office 365 container? We're not using the profile container.
Sep 03 2020 09:48 AM
The redirections.xml file only works in conjunction with a Profile Container, not with the Office container. If you would like to include or exclude Teams data, you could enable or disable the following GPO setting: Include Teams data in container
Hope this helps!
Sep 03 2020 10:29 AM
Thank you. We do include Teams data in the office container but have no way to exclude the recommended exclusions to avoid at least some of the bloat.
Sep 23 2020 04:00 PM
We are trying to implement FSLogix in our VMWare Horizon environment. Setup is simple, FSLogix agent, Instant Clone pool and a share for the VHDX files. When implementing the redirections.xml configuration with a GPO, the user profile is unable to get reattached (Status 0x00000017 Reason: 0x00000000 Error Code: 0x0000000D). If we do not implement the redirection.xml, we do not have that issue. I've tried with an empty XML only containing the following:
<?xml version=”1.0″ encoding=”UTF-8″?>
But we are still getting the error. So here are the scenarios:
1. New VHDX, no redirections.xml, it works. Sign-out and sign-in, still works.
2. New VHDX, redirections.xml, first sign in works, sign-out and sign-in, User profile failed to attach. After that, even when I remove the redirections.xml GPO, the VHDX is unusable.
Dec 10 2020 05:00 AM
What would happen if we deselect Teams from the Office container. Is the data then redirected to the normal FSL profile where it is possible to use the exclusions??
Dec 20 2020 05:37 AM
As mentioned, the below redirection can also be done using registry keys, Can you please mention the path where we have to put the registry key?
Dec 20 2020 11:25 PM
Key path: HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Profiles
Data:path to XML folder, only mention the folder NOT XML file!
Hope this helps :)
Dec 21 2020 08:11 AM
I am seeing a huge amount of LRS hot writes, some posts I saw suggest working with the redir.xml file to exclude apps.
So far all I am excluding it Teams folders.
Is there a way to find out what is writing so much into my VHDX's because is starting to cost a bit?
Mar 12 2021 01:23 AM