Configure Profile Container and Office for concurrent connections and multiple connections

Users connect to their stateless working environments in different ways, depending how desktops and applications are delivered. When using Virtual Desktops and Remote Applications users may:

  • Have one connection at a time
  • have multiple concurrent connections to a single instance of Windows
  • Connect to multiple instances of windows

It's important to configure Profile Container and Office Container correctly for use with concurrent connections and multiple connections.

Prerequisites

Before configuring for Concurrent or Multiple connections, install and configure Profile Container or Office Container

Concurrent Connections with Profile Container and Office Container

Concurrent connections refers to a user being allowed multiple, concurrent connections, to the same Windows instance. Concurrent connections would generally be used in specific environments, such as with a Citrix implementation. Set HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\TerminalServer\fSingleSessionPerUser (DWORD) = 0 to enable multiple connections manually.

After configuring the environment, Profile Container and Office Container are configured to support concurrent configuration by setting:

  • Profile Container: HKEY_LOCAL_MACHINE\SOFTWARE\FSLogix\Profiles\ConcurrentUserSessions(DWORD) = 1
  • Office Container: HKEY_LOCAL_MACHINE\SOFTWARE\Policies\FSLogix\ODFC\ConcurrentUserSessions(DWORD) = 1

Multiple Connections

Multiple Connections with Profile Container and Office Container is supported through the use of VHD(X) difference disks. The registry configuration and functionality for Office Container and Profile Container is different.

Multiple Connections with Profile Container

Profile Container is configured for multiple connections using ProfileType when configuring Profile Container ProfileType is set to 0, 1, 2 or 3.

Mode 0 (Normal / Default)

  • 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)

Mode 1 (Read / Write)

  • 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.

Mode 2 (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.

Mode 3 (Attempt Read/Write Fall Back 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.

General Information

  • 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. If one client begins the merge operation and is interrupted, For Example, powered off, another client can safely continue and complete the merge. For this reason, both the RW and RO clients begin by attempting a merge of the RW.VHD(X).
  • Merge operations on an ReFS file system, where the difference disk and the parent are on the same ReFS volume, are nearly instantaneous no matter how large the difference disk is.
  • Merge operations can only be done if there are no open handles to either the difference disk or the parent VHD(X). For this reason, the RO client also attempts to merge the RW VHD(X) as it may be the last session to disconnect.

Multiple Connections with Office Container

Office Container is configured for multiple connections using VHDAccessMode when configuring Office Container. VHD Access Mode is set to 0, 1, 2 or 3.

Mode 0 (Normal / Default)

  • 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)

Mode 1 (Network)

  • Sign On
    • Client attempts to open the merge.vhd(x) difference disk with Read/Write access. If it's 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 O365 VHD.
  • 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.

Note

Mode '1' (Network) should not be used if the O365 Container is being used with Outlook Cached Exchange mode. Use mode '0' or '3'.

Mode 2 (Local)

  • 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 O365 VHD.
  • 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.

Note

Mode '2' (Network) should not be used if the O365 Container is being used with Outlook Cached Exchange mode. Use mode '0' or '3'.

Mode 3 (Per Session)

  • Sign On
    • Client searches for a per session VHD(X) that isn't currently in use
    • If one is found, it's directly attached and used
    • If one isn't found, one will be created and used
    • If a new VHD is created, resulting in a number of per-session VHDs greater than the number specified to keep (NumSessionVHDsToKeep), this 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's deleted

General Information

  • 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).
  • When the difference disk is stored on the network, the merge operation can be safely interrupted and continued. If one client begins the merge operation and is interrupted, for example, 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, no matter how large the difference disk is.
  • 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.
  • Per-session VHD(X) files are named ODFC-%username%-SESSION-<sessionnumber>.VHD(X) where SessionNumber is an integer from 0 - 9.
  • The maximum number of per-session VHD(X) files is 10.