Problem:
When using FSLogix Profile Containers, user assigned App-V applications either fail to appear in the Start Menu, or appear with white icons. Globally assign App-V applications behave correctly.
This happens most commonly on the first logon however it can happen on subsequnet logons with inconsistent behaviour.
If you exclude AppData\Local\Microsoft\AppV using redirections.xml then the problem is more apparent. However excluding this directory is a common solution to this problem with other profile management solutions. Exluding this directory forces a refresh of the Copy on Write (COW) Local data location at each logon.
This was observed in the following environment.
HyperVisor: Hyper-V with SCCM
Operating System: Windows 2016 Server (build 1607)
Citrix XenApp build 1906 (MCS Non-Persistent)
App-V dual-admin mode
FSLogix Version:
2.9.7117.27413
Profile Container Mode: 1 with Concurrent Access Mode |
|
Cause:
From the FSLogix point of view, I can only assuming this is a matter of timing.
From the App-V point of view, there should be a GUID folder in the integration directory of the COW Local for each application. In this case, there should be four folders however there are only two (two applications function). On some occasions, the AppData\Local\Microsoft\AppV folder was not created at all (zero applications available). |
|
Troubleshooting:
Tried VHD and VHDX files to store the profile - no difference
Tried non-dynamic (fixed size) VHD(X) files on the assumption that growing the VHD(X) was the issue - no difference
Tried Mode 0 - This was more reliable but not suitable for multisession
Assumed there may be an issue with filter driver incompatibility - interesting subject, but offers no solution. Allocated Altitudes
Standard filter drivers on a Winodws 2016 RDS Server without App-V Client enabled or FSLogin installed. |
|
Filter drivers with the App-V Client enabled. |
|
Filter drivers with FSLogix additionally installed. |
|
Run "Sync-AppVPublishingServer 1" manually after logon - This fixed it, but did not fix up the application icons.
This made me assume that the Scheduled Task to sync the App-V publishing server was running before the VHD(X) file containing the user profile had been mounted.
The VHD(X) file is mounted at 31 seconds.
The App-V Sync happens a full three seconds later
So all appears to be in order however timing of the App-V sync does appear to be an issue.
Workaround / Fix 1:
When an App-V publishing server is added to a XenApp server using Add-AppVPublishingServer, a Microsoft Group Policy, or a Citrix Policy, a scheduled task is created to Sync the App-V client with the publishing server at user logon. Notice that the task runs using the BUILTIN\Users Group.
The task has the following trigger. The task runs at user logon. Notice there is no delay.
So let's increase the delay to give FSLogix some extra time to mount the VHD(X) and settle down.
Here come the problem. The 1_user_logon scheduled task is created programmatically by the App-V client. When you OK out of the scheduled task, you'll be prompted for the password for the BUILTIN\Users group. No idea what the answer is, therefore you cannot modify the scheduled task manually.
Even if you could modify the task, it is created dynamically at computer startup by the Microsoft or Citrix Policy so updating the master image isn't really an option.
Using Task Scheduler, export the scheduled task to C:\WIndows\Temp\1_user_logon.xml
Edit 1_user_logon.xml and add the following line to create a 10 second delay.
<LogonTrigger>
<StartBoundary>2008-06-22T12:00:00</StartBoundary>
<Enabled>true</Enabled>
<Delay>PT10S</Delay>
</LogonTrigger>
Save 1_user_logon.xml - ensure that the file is saved using UTF-16 / Unicode formatting otherwise you will probably experience errors when importing the task in the next step.
Create a PowerShell script with the following two lines
Unregister-ScheduledTask -TaskName 1_user_logon -Confirm:$False
Register-ScheduledTask -xml (Get-Content 'C:\WINDOWS\TEMP\1_USER_LOGON.xml' | Out-String) -TaskName "1_user_logon" -TaskPath "\Microsoft\AppV\Publishing\" –Force
|