Dela via


Concurrent or multiple connections to a single container

Users connect to Virtual and Remote Desktops or Remote Applications in different ways depending on how those environments are configured. The following outlines some terminology used when users connect to these remote systems:

  • Standard connections
    • User creates a single remote session on a Windows computer through a full desktop or remote application experience.
  • Concurrent connections
    • User creates a remote session on a Windows computer through a full desktop or remote application. The same user creates a second remote session on the same Windows computer through a full desktop or remote application.
  • Multiple connections
    • User creates a remote session on a Windows computer through a full desktop or remote application. The same user creates a new remote session on a different Windows computer through a full desktop or remote application.

Note

When working with concurrent or multiple connection types, the configuration is different between Profile and ODFC containers. Profile containers use a configuration called ProfileType and the ODFC container uses a configuration called VHDAccessMode. Each configuration operates differently.

Warning

OneDrive doesn't support concurrent or multiple connections using the same container, under any circumstance. Please see the OneDrive documentation on this topic.

Prerequisites

Before configuring for concurrent or multiple connections, install and configure profile containers.

Concurrent connections

Concurrent connections are used when a user needs to have more than one (1) session on a single computer using the same Profile or ODFC container. Concurrent connections require other registry entries to allow these types of connections. This scenario supports the use of both VHD(x) base disk and VHD(x) differencing disks.

Warning

Concurrent connections are NOT supported by Session Hosts running in an Azure Virtual Desktop Host Pool.

Required Settings

Registry Key: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

Value Name Value Type Value
fDenyTSConnections DWORD 0
fSingleSessionPerUser DWORD 0

Multiple connections

Multiple connections are used when a user needs to have more than one (1) session, each on a different computer, using the same Profile or ODFC container. This scenario is only supported using VHD(x) differencing disks. Unlike concurrent connections, no other configuration is required beyond the differencing disks.

Profile container VHD(x) differencing disks

Concurrent and Multiple connections require specific configuration for the Profile container in order to make use of VHD(x) differencing disks.

To use Concurrent\Multiple Connections, the ProfileType must be set to 3.

Computer attempts Read/Write lock, revert to Read Only:

  • Sign on:
    • Client checks to see if a RW.VHD(x) file exists. If it doesn't, the client takes the RW role and performs the same steps as ProfileType = 1. If the RW.VHD(x) file does exist, the client takes the RO role and does the same steps as ProfileType = 2.

Note

  • RO difference disks are stored in the local temp directory and are named %usersid%_RO.VHD(x).
  • The RW difference disk is stored on the network next to the parent VHD(x) file and is named RW.VHD(x).
  • The merge operation can be safely interrupted and continued. (e.g. If one client begins the merge operation and is interrupted or powered off, another client can safely continue and complete the merge). This is why both RW and RO clients attempt a merge operation.
  • Merge operations on an ReFS file system, where the difference disk and the parent are on the same ReFS volume, are nearly instantaneous regardless the size of the difference disk.
  • Merge operations can only be done if there are no open handles to either the difference disk or the parent VHD(x). The RO client also attempts to merge the RW VHD(x) as it may be the last session to disconnect.

ODFC container VHD(x) differencing disks

Concurrent and Multiple connections require specific configuration for the ODFC container in order to make use of VHD(x) differencing disks.

To use Concurrent\Multiple Connections, the VHDAccessMode Type need to be 3:

Session-based local VHD(x)

  • Sign On
    • Client searches for a session-based VHD(x) that isn't currently in use
    • If found, it's directly attached and used
    • If not found, one is created
    • If a new VHD is created, resulting in session-based VHD(x) files greater than the number specified to keep in the setting, NumSessionVHDsToKeep, the VHD(x) is marked for deletion on sign out.
  • Sign out
    • Client detaches the VHD(x)
    • If the VHD(x) is marked for deletion, it's deleted

Note

  • Local difference disks are stored in the local temp directory and are named %usersid%_ODFC.VHD(x).
  • Difference disks stored on the network are located next to the parent VHD(x) file and are named %computername%_ODFC.VHD(x).
  • The merge operation can be safely interrupted and continued. (e.g. If one client begins the merge operation and is interrupted or powered off, another client can safely continue and complete the merge).
  • Merge operations on an ReFS file system, where the difference disk and the parent are on the same ReFS volume, are nearly instantaneous regardless the size of the difference disk.
  • Merge operations can only be done if there are no open handles to either the difference disk or the parent VHD(x). Therefore, only the last session can successfully merge its difference disk.
  • Session-based VHD(x) files are named ODFC-%username%-SESSION-<SessionNumber>.VHD(x) where <SessionNumber> is an integer from 0 - 9.
  • The maximum number of session-based VHD(x) files is 10.