Jump to content
Welcome to our new Citrix community!
  • 0

Windows 10 VDI Elastic Layer VHD Not Detaching On User Logoff

Satoshi Kubo


I've been testing Elastic Layering work on our Windows 10 VDI environment, but having issue with App Layering not detaching Elastic Layer.

I am actually investigating black screen at user logon and machine hang at "shutting down" screen at user logoff.

Now I turned on maintenance mode that a user was on, then logged off the user from Studio.
Then I logged on with a local admin user to shutdown the machine for maintenance, and realized from diskmgmt.msc that Elastic layer disk for logged off user is still attached.


Is this an expected behavior to leave VHD (for an elastic layer that only the logged off user is assigned) attached?
Or is there a configuration mistake that is preventing this VHD to be detached?

I want to rule out this from being the cause of black screen and/or shutdown hang.

VMWare ESXi 6.7
Citrix Virtual Desktop and Apps 7.15 LTSR CU4
MCS (Both static and random machine catalog, static is keep data on local disk)

Windows 2016 Datacenter file servers

Server 1) FSLogix profile share (ReFS, no clustering or DFS-R)

Server 2) App Layering share for Elastic Layers (ReFS, no clustering or DFS-R)


Windows 10 LTSB 1607 64bit (KMS activation)

Citrix App Layering (Elastic Layers only. No User Layer)

Citrix VDA agent 7.15 LTSR CU4 (In Platform Layer)

Citrix WEM 1909 (In Platform Layer)

(Citrix User Profile Management not installed)
Office 2013 Professional Plus (KMS, we don't use Office 365, In a separate Application Layer)
FSLogix 2.9.734930108 (Search roaming disabled, Altitude set to 138010. In a separate Application Layer)

ESET Endpoint Security 7.2.2055.0 (Realtime protection and HIPS enabled but all option disabled, all recommended exclusion applied. In a separate Application Layer)


Recommendations in Rob's Citrix blog article has all been applied.

Citrix App Layering and FSLogix profile containers


2020-07-16 20:32:21,025 INFO 59 ActiveDirectoryInfoService: Access to Active Directory restored. Machine groups refreshed.
2020-07-21 21:35:44,651 INFO 47 RequestService: Starting request 4 on behalf of MY-DOMAIN\username
2020-07-21 21:35:44,666 INFO 47 SessionEventHandler: Received logoff event
2020-07-21 21:35:44,666 INFO 47 SessionEventHandler: logging out user DOMAIN\username (S-1-5-21-<<user's SID>>)
2020-07-21 21:35:44,666 INFO 47 LogonInfoService: User MY-DOMAIN\username is not a local user
2020-07-21 21:35:44,666 INFO 47 LogonInfoService: User MY-DOMAIN\username (S-1-5-21-<<user's SID>>) is an elastic layer user. Elastic layers are enabled.
2020-07-21 21:35:44,666 INFO 47 SessionDynamicLayeringService: Will not detach layers for session host
2020-07-21 21:35:44,666 INFO 47 SessionEventHandler: Finished processing logoff event
2020-07-21 21:35:44,666 INFO 47 RequestService: Ending request 4 started on behalf of MY-DOMAIN\username
2020-07-21 21:36:54,621 INFO 47 RequestService: Starting request 5 on behalf of MY-MACHINE-NAME\admin

Edited by skubo22
added environment and software usage description
Link to comment

14 answers to this question

Recommended Posts

  • 0

App Layering does not detach layers that happens when the user logs out and the desktop is rebooted.


Are you just using elastic layering or are you also using the user layer?  If you are using the user layer make sure you dont configure delete profile at logoff.  You say your using MCS just make sure you do have the desktop reboot at logoff or elastic layering wont work correctly.



Link to comment
  • 0

Thank you Rob for your comment.


I see that Elastic Layers not detaching with user log off is an expected behavior. Thanks!


FYI, I've edited the opening post and added that I don't use user layer but only elastic layers.

Also added MCS and file server info.

Yes, in my environment, the delivery controller/MCS reboots the machines when user logs off.


So, my background issue of machines hanging at "Shutting down" screen is not caused by this behavior itself.

However, it may worth to mention that when I turn off elastic layer altogether at App Layering image template, blank screen at logon and hang at "shutting down" (auto shutdown at user log off by delivery controller/MCS) issues go completely away.


Right now I am going to end up with having to maintain many image templates instead of utilizing elastic layers.

Link to comment
  • 0
10 hours ago, Raymond Colon said:

To be certain. Are you using a session host? Also, see the below blog and confirm you have applied the altitude change to FSLogix, as noted.


What happens if you enable Elastic Layering and disable FSLogix? This would be a test to determine if the two filters are causing a conflict.


Good point. I'll try without FSLogix.

I'm not sure what you mean by a session host. It is Windows 10 machines configured with VDA agent, only 1 user to logon at a time. Not a RDS session host server if that's what you mean.

I've followed recommendations from mentioned Citrix blog by Rob during setup.


However, looking at it again, I notice for the first time the Micah Adamson's MSDN article (https://social.msdn.microsoft.com/Forums/windows/en-US/660959a4-f9a9-486b-8a0d-dec3eba549e3/using-citrix-app-layering-unidesk-with-fslogix?forum=FSLogix) referred in the Citrix blog says:



App Layer = Doesn't work well (FSLogix should NOT be installed here)


My installation of FSLogix is in a separate Application Layer.

I'll try FSLogix installation to the Platform layer after trying without.

Edited by skubo22
Link to comment
  • 0

Thanks Rob and Raymond.


Here are test results with suggested combinations.

So, I'm successful if I choose either one of Elastic Layering or FSLogix.


1) Elastic Layering = "Application Layering" & FSLogix Application Layer Removed & User with Elastic Layering assignments

Result = No black screens at logon or hanging at "Shutting down" screen

2) Elastic Layering = "None" & FSLogix in Application Layer & User with no Elastic Layering assignments

Result = No black screens at logon or  hanging at "Shutting down" screen

Link to comment
  • 0
16 hours ago, Rob Zylowski1709158051 said:

Could you try with just fslogix, OS and platform layer?  I am still hoping to rule out the interaction with other layers especially AV as that also has a filter driver.


Tried the minimum configuration.

Seems to have no blank screen issue during several tries. But every time user logoff, I got the hang at "Shutting down" issue (viewed in VMware Remote Console).


After exactly 15 minutes of hanging "Shutting down" screen, VM is powered off (seems to be by DDC/MCS?).



Windows 10 LTSB 1607 64bit (KMS activation, OS Layer)

Citrix VDA agent 7.15 LTSR CU4 (In Platform Layer)

Citrix WEM 1909 (In Platform Layer)

(Citrix User Profile Management not installed)
FSLogix 2.9.734930108 (Altitude set to 138010. In a separate Application Layer)

No other applications

No A/V

Published with Elastic Layers only. No User Layer.

Link to comment
  • 0

That result definitely complicates the discovery process.


I seem to remember one other post about the shutdown issue where FSLogix was locking a file so the shutdown was not working right.  I cant seem to find it now googling though.  I think I remember if you recycled the FSlogix service it was able to work.  Obviously that doesn't help the issue. 


As for the black screen it would be good to find out which layer is causing that when added back in.  Normally I recommend taking half the layers and adding them back in.  If you get the black screen remove half at a time until you find the issue layer.  I might however start with AV as we know it also has filter drivers.  When you find which layer it is I would try recreating the layer just to see if that will fix the issue.   If it doesnt then you would probably have to deal with procmon to see what process is a problem.

Link to comment
  • 0

Hi Rob, thank you for your comment.


I'll try adding back layers until I get back the black screen with suggest way.


I have also tried without WEM to make a really minimal configuration: Left with OS Layer (OS + Windows Update + VS Redistributables + .Net) , VDA in Platform Layer, and FSLogix in Application Layer..that's all. Elastic Layer turned on but no layer assignments to users, no User Layer. And still had hang at "Shutting down" issue.


It'll take time but I am thinking of rebuilding this minimal configuration from scratch.

For now, we'll go into production with Elastic Layer (hence also User Layer) turned off in ELM image template.

At least our configuration is stable without Elastic Layer.

Link to comment
  • 0

For what it is worth, I have also experienced a hang on shutdown with MCS Persistent VDI (Win10).  This started approximately 6 weeks ago and for the most part does not reoccur for a specific VDI after doing a Reset (VMWare) on that system.  We're not using FSLogix or AppLayering on these VDI at all.  Due to lack of time, I've not been able to spend much time troubleshooting  this and as such don't have the cause.  I did observe that on some of the machines, I could see a McAfee service stopped unexpectedly in the event log.  I can't be certain this event was appearing on all these machines though.

Link to comment
  • 0

@David Clark1709160691, thanks for the comment.


My event log is empty during hang. Event Log service has already stopped before hang, judging from the last minute event log entries.

However BrokerAgent.exe, and service processes for FSLogix and App Layering are still alive, according to shutdown trace.


I couldn't identify any cause -- too many services/processes (including FSLogix and App Layering services, BrokerAgent, etc.) are alive during trace I kept running for 3 minutes and any could have been the cause of shutdown hang.


I might do procmon and/or shutdown trace with Windows Performance Toolkit again, hoping for new findings.

Link to comment
  • 0


Hi there,

we have a very similar or maybe same problem :

some machines are hanging during shutdown with eiter a black screen or the typical "windows is shutting down" message.

Users that had a problematic machine also complain about bad performance.

But this also happens to machines that are being composed. So those machines are not becoming available for use and are showing as "problematic" in view administrator.


This is happening after updating to ELM, which we did last monday.


I already tried to update vmtools and also recreated the platform layer from scratch - but the problem persists.


horizon view 7.12

vsphere 6.0u3

tools 11.1

win10 1809



Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...