Skip to end of metadata
Go to start of metadata


In many environments it is desirable that the user have concurrent access to their profile, or, in other words, have their Profile VHD attached to several computers at the same time.  For example, a user may be logged in on one computer for their desktop and simultaneously logged in to another machine that is providing a remote application.

FSLogix supports this scenario by using VHD difference disks.  How these disks are used is slightly different between Profile Containers and Office 365 Containers.

ProfileType Setting

The way Profile Containers uses difference disks is controlled via the "ProfileType" setting.  This setting can have a value of 0, 1, 2, or 3.

Type ‘0’ (Normal) - This is the default behavior if the setting is not present
On LogonClient 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).
On LogoffClient detaches the VHD(X).
Type ‘1’ (Read/Write)
On Logon
  • 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.

On Logoff

  • 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.
Type ‘2’ (Read Only)
On Logon
  • 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.
On Logoff
  • 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.
Type ‘3’ (Attempt RW role, but fall back to RO role if another client has the RW role)
On Logon

Client checks to see if a RW.VHD(X) file exists.  If it does not, 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 performs the same steps as ProfileType = 2.

Notes:

  • 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 (e.g. powered off), another client can safely continue and complete the merge.  This is why 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 big 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).  This is why the RO client also attempts to merge the RW.VHD(X).  It may be the last session to disconnect.