Users connect to virtual and remote desktops or remote applications in various ways, depending on how these environments are configured. Understanding the terminology used when users connect to these remote systems is crucial. Below is an overview of common connection types:
-
Standard Connection
- A user establishes a single remote session on a Windows computer, providing a full desktop or remote application experience.
-
Concurrent Connection
- A user creates a remote session on a Windows computer, accessing a full desktop or remote application. Subsequently, the same user initiates a second remote session on the same Windows computer, again accessing a full desktop or remote application. This is known as a concurrent connection, where multiple sessions from the same user exist simultaneously on a single machine.
-
Multiple Connections
- A user establishes a remote session on a Windows computer, accessing a full desktop or remote application. Then, the same user initiates new remote sessions on different Windows computers, each providing a full desktop or remote application experience. This scenario is termed multiple connections, indicating sessions from the same user spread across several machines.
Note:
Configuration differs between profile containers and ODFC containers when using concurrent or multiple connection types. Profile containers utilize the ProfileType
setting, while ODFC containers employ VHDAccessMode
. Each setting dictates how these connection types operate.
Warning:
OneDrive does not support concurrent or multiple connections using the same container under any circumstances. Refer to the OneDrive documentation for detailed information.
Prerequisites
Before configuring concurrent or multiple connections, ensure you have installed and configured profile containers as a foundational step.
Concurrent Connections
Concurrent connections are implemented when a user requires multiple sessions (more than one) on a single computer using the same profile or ODFC container. Enabling concurrent connections necessitates specific registry entries. This configuration supports both VHD(x) base disks and VHD(x) differencing disks.
Warning:
Concurrent connections are not supported for session hosts running in Azure Virtual Desktop host pools.
Required Settings
Registry Key: HKLMSYSTEMCurrentControlSetControlTerminal Server
Value Name | Value Type | Value |
---|---|---|
fDenyTSConnections |
DWORD | 0 |
fSingleSessionPerUser |
DWORD | 0 |
Setting both fDenyTSConnections
and fSingleSessionPerUser
to 0
allows for multiple remote sessions on the same machine, enabling concurrent connections.
Multiple Connections
Multiple connections are used when a user needs to establish multiple sessions (more than one) across different computers while utilizing the same profile or ODFC container. This scenario exclusively supports VHD(x) differencing disks. Unlike concurrent connections, no additional configuration beyond the use of differencing disks is necessary for multiple connections to function.
Analyzing Container VHD(x) Differencing Disks for Profile Containers
Both concurrent and multiple connections rely on a specific profile container configuration to effectively utilize VHD(x) differencing disks.
To enable Concurrent/Multiple connections, the ProfileType
setting must be set to 3
.
Computer Attempts Read/Write Lock, Reverts to Read-Only:
- Sign-in Process:
- The client checks for the existence of the
RW.VHD(x)
file. - If
RW.VHD(x)
is not found, the client assumes the RW (Read-Write) role, performing the same steps as whenProfileType
is set to1
. - If
RW.VHD(x)
is present, the client acts as the RO (Read-Only) role, following the procedures similar toProfileType
set to2
.
- The client checks for the existence of the
Note:
- RO differencing disks are stored locally in the temporary directory, named
%usersid%_RO.VHD(x)
. - RW differencing disks are located on the network alongside the parent VHD(x) file, named
RW.VHD(x)
. - Merge operations are designed to be resilient and can be safely interrupted and resumed. For instance, if a client initiates a merge operation and is interrupted or shuts down, another client can safely continue and complete the merge. This is why both RO and RW clients attempt merge operations.
- Merge operations on ReFS file systems (where differencing disks and the parent volume reside on the same ReFS volume) are nearly instantaneous, regardless of the disk sizes involved.
- Merge operations can only be executed when there are no open handles to either the differencing disk or the parent VHD(x). RO clients also attempt to merge the RW VHD(x) as it might represent the last disconnected session.
ODFC Container VHD(x) Differencing Disks
Concurrent and multiple connections require specific ODFC container configurations to leverage VHD(x) differencing disks.
For Concurrent/Multiple connections, the VHDAccessMode
type needs to be set to 3
:
Session-Based Local VHD(x)
-
Sign-in Process:
- The client searches for a session-based VHD(x) that is currently not in use.
- If an available VHD(x) is found, it is directly attached and used.
- If no available VHD(x) is found, a new one is created.
- If a new VHD is created, and this results in the number of session-based VHD(x) files exceeding the number specified in the
NumSessionVHDsToKeep
setting, the oldest VHD(x) is marked for deletion upon logout.
-
Logout Process:
- The client detaches the VHD(x).
- If the VHD(x) is marked for deletion, it is then deleted.
Note:
- Local differencing disks are stored in the local temporary directory, named
%usersid%_ODFC.VHD(x)
. - Network-stored differencing disks are located next to the parent VHD(x) file and are named
%computername%_ODFC.VHD(x)
. - Merge operations are robust and can be interrupted and continued safely. For example, if one client starts a merge operation and is interrupted, another client can safely resume and finish the merge.
- Merge operations on ReFS file systems (where differencing disks and the parent volume are on the same ReFS volume) are almost instantaneous, regardless of the size of the differencing disks.
- Merge operations can only occur when no handles are open to the differencing disk or parent VHD(x). Consequently, only the last session to disconnect can successfully merge its differencing disk.
- Session-based VHD(x) files are named
ODFC-%username%-SESSION-<sessionnumber>.VHD(x)
where<sessionnumber>
is an integer from 0 to 9. - The maximum number of session-based VHD(x) files is 10.