Share via

Multiple sessions for users in AVD, FSLOGIX is Unable to logoff user session from SA-AVD-004

Chelsea Tech 0 Reputation points
2026-05-01T19:57:01.34+00:00

Multiple sessions for users in AVD, FSLOGIX is Unable to logoff user session from SA-AVD-004

Azure Virtual Desktop
Azure Virtual Desktop

A Microsoft desktop and app virtualization service that runs on Azure. Previously known as Windows Virtual Desktop.


2 answers

Sort by: Most helpful
  1. Nikhil Duserla 9,775 Reputation points Microsoft External Staff Moderator
    2026-05-19T09:39:21.7966667+00:00

    Hey Chelsea, it sounds like FSLogix is unable to detach the user’s profile VHD on SA-AVD-004 because a previous session is still “in use.” When a user disconnects without actually logging off, FSLogix leaves the VHD mounted and locked—so any new or second session can’t attach and you can’t cleanly log them off. Here’s what you can try:

    1. Configure session time-outs in Group Policy • Open your Session Host OU GPO under Computer Configuration → Administrative Templates → Windows Components → Remote Desktop Services → Remote Desktop Session Host → Session Time Limits • Set “Set time limit for disconnected sessions” (e.g. 15–30 minutes) • Set “Set time limit for idle Remote Desktop Services sessions” (e.g. 1–2 hours) • Enable “End session when time limits are reached” This makes sure disconnected sessions are terminated and FSLogix can detach the VHD.
    2. Enable automatic cleanup of invalid sessions • On all session hosts, create or set the DWORD CleanupInvalidSessions = 1 under HKLM\SOFTWARE\FSLogix\Apps • This tells FSLogix to find and clear orphaned mounts on next sign-in.
    3. If you need true concurrent sessions on the same profile • Under HKLM\SOFTWARE\FSLogix\Profiles, set ProfileType = 3 (Try Read/Write, fall back to Read-Only) on every host. • Only use this if you really intend multiple simultaneous logins; otherwise leave ProfileType = 0.
    4. Manually identify and clear stuck sessions/processes • From an elevated prompt on SA-AVD-004 run: qwinsta /server:SA-AVD-004 → Note SessionID(s) in “Disc” or “Unknown” state logoff <SessionID> /server:SA-AVD-004 • If you get Access Denied, run query process /id:<SessionID> → Kill hanging processes with taskkill • Or use the Azure Portal → Host pools → Session hosts → Log off each session for the affected user, then wait ~60 sec for the VHD to release.
    5. Review FSLogix logs for error codes • Open Event Viewer > Applications and Services Logs > FSLogix > Operational • Look for Event ID 33 (VHD attach failure) or 25 (profile load failure) with “locked” in the message • That confirms the disk is still in use

    Hope that helps! If you still see issues, could you share:

    • The output of qwinsta/query user on SA-AVD-004

    • Any FSLogix error codes from the Operational log

    • The current values of CleanupInvalidSessions and ProfileType in your registry

    • Your FSLogix version

    Reference List

    1. RDS Session Time Limits (GPO) https://learn.microsoft.com/windows-server/remote/remote-desktop-services/remote-desktop-session-host/manage-session-time-limits
    2. CleanupInvalidSessions https://learn.microsoft.com/fslogix/reference-configuration-settings#cleanupinvalidsessions
    3. Concurrent/multiple connections https://learn.microsoft.com/fslogix/concepts-multi-concurrent-connections
    4. FSLogix troubleshooting & logs https://learn.microsoft.com/fslogix/troubleshooting-events-logs-diagnostics

    Note: This content was drafted with the help of an AI system. Please verify the information before relying on it for decision-making.

    Was this answer helpful?

    0 comments No comments

  2. Dio Xavier 284.3K Reputation points Volunteer Moderator
    2026-05-01T20:20:10.52+00:00

    Hello

    Welcome to the Microsoft Azure Community

    Good afternoon. Thank you for contacting us and detailing your scenario. This error occurs when FSLogix cannot correctly terminate the user profile on the host SA-AVD-004, usually due to a stuck session, locked VHDX, SMB/Azure Files storage, or FSLogix version. Quick suggestions:

    • Execute the following command in PowerShell to check for disconnected sessions, typing the commands one by one, followed by Enter:

    query user

    qwinsta

    logoff IDSSESSION

    • Update FSLogix and validate Defender exclusions.
    • Check Azure Files/SMB connectivity/performance.
    • Compare SA-AVD-004 with the other hosts in the pool.

    Let us know the result.

    Reference technical documentation:

    https://learn.microsoft.com/en-us/fslogix/troubleshooting-container-locked

    https://learn.microsoft.com/en-us/fslogix/troubleshooting-error-codes

    If the answer helped solve the problem, please mark it as a Helpful Answer. This action closes the thread, indicates the correct solution, and helps others with the same question find the answer more easily. If you still need support or have new questions, feel free to use this same post.

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.