Configure Profile Container and Office for concurrent or multiple connections

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 users 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 users 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 Office containers. Profile containers use a configuration called ProfileType and the Office container uses a configuration called VHDAccessMode. Each configuration operates differently.

Warning

OneDrive does not 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 or Office 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 Office container. Concurrent connections require additional registry entries to allow these types of connections which are outlined below. 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

fDenyTSConnections

Path: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

Type: DWORD

Value: 0

fSingleSessionPerUser

Path: HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server

Type: DWORD

Value: 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 Office container. This scenario is only supported through the use of VHD(x) differencing disks as described below. Unlike, concurrent connections, no additional 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

ProfileType

Note

A value of 0 (default) is the normal behavior for the VHD(x). This VHD(x) is also know as the VHD(x) base disk. Any other value will implement VHD(x) differencing disks.

Path: HKLM\SOFTWARE\FSLogix\Profiles

Type: DWORD

Default Value: 0

Accepted values and use:

0: Normal/Default Behavior

  • Sign on:
    • Client tries to directly attach the VHD(x) file. No difference disks are used. If a concurrent access is attempted, it will fail with a sharing violation (error 20)
  • Sign out:
    • Client detaches the VHD(x)

1: Computer attempts Read/Write lock

  • Sign on:
    • Client attempts to open the RW.VHD(x) difference disk with Read/Write access. If it is successful, it merges the difference disk to the parent. If it completes the merge, the RW.VHD(x) file is deleted.
    • Client creates a new RW.VHD(x) difference disk.
    • Client attaches the RW.VHD(x) as the Profile VHD.
  • Sign out:
    • Client detaches the RW.VHD(x) difference disk (the user's Profile VHD/X).
    • Client attempts to open the RW.VHD(x) difference disk with Read/Write access. If it is successful, it merges the difference disk to the parent. If it completes the merge, the RW.VHD(x) file is deleted.

2: Computer attempts Read Only

  • Sign on:
    • Client attempts to open the RW.VHD(x) difference disk with Read/Write access. If it is successful, it merges the difference disk to the parent. If it completes the merge, the RW.VHD(x) file is deleted.
    • Client attempts to delete the previous RO difference disk (if it exists).
    • Client creates the new RO difference disk.
    • Client attached the RO difference disk as the user's Profile VHD.
  • Sign out:
    • Client detaches the RO difference disk.
    • Client deletes the RO difference disk.
    • Client attempts to open the RW.VHD(x) difference disk with Read/Write access. If it is successful, it merges the difference disk to the parent. If it completes the merge, the RW.VHD(x) file is deleted.

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.

Office Container VHD(x) Differencing Disks

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

VHDAccessMode

Note

A value of 0 (default) is the normal behavior for the VHD(x). This VHD(x) is also know as the VHD(x) base disk. Any other value will implement VHD(x) differencing disks.

Warning

Using VHDAccessMode value 1 or 2 should NOT be used if the Office container is being used with Outlook Cached Mode or OneDrive. Use VHDAccessMode 0 or 3. Failure to follow this direction could lead to data loss.

Path: HKLM\SOFTWARE\FSLogix\ODFC

Type: DWORD

Default Value: 0

Accepted values and use:

0: Normal/Default Behavior

  • Sign on:
    • Client tries to directly attach the VHD(x) file. No difference disks are used. If a additional access is attempted, it will fail with a sharing violation (error 20)
  • Sign out:
    • Client detaches the VHD(x)

1: Network-based differencing disk(s)

  • Sign On
    • Client attempts to open the merge.vhd(x) difference disk with Read/Write access. If it is successful, it merges the difference disk to the parent. If it completes the merge, the difference disk file is deleted.
    • Client attempts to remove any previous difference disk for this machine (%computername%_ODFC.VHD(x)) on the network share.
    • Client creates a new difference disk named %computername%_ODFC.VHD(x). This difference disk is created on the network share next to the parent VHD(x) file.
    • Client attaches the difference disk as the Office container VHD(x).
  • Sign out
    • Client detaches the difference disk.
    • Client attempts to rename the difference disk to merge.vhd(x). If this rename is successful, the client attempts to merge the difference disk. The merge will only succeed if it's the last session that is ending.
    • Client deletes the difference disk.

2: Local-based differencing disk(s)

  • Sign On
    • Client attempts to remove any previous difference disk (%usersid%_ODFC.VHD(x)) for this user from the temp folder.
    • Client creates a new difference disk named %usersid%_ODFC.VHD(x). This difference disk is created in the temp directory.
    • Client attaches the difference disk as the Office container VHD(x).
  • Sign out
    • Client detaches the difference disk.
    • Client attempts to merge the difference disk. The merge will only succeed if it's the last session that is ending.
    • Client deletes the difference disk.

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 is directly attached and used
    • If not found, one will be created and used
    • 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 and will be deleted on sign-out.
  • Sign out
    • Client detaches the VHD(x)
    • If the VHD(x) is marked for deletion, it is 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.