Skip to end of metadata
Go to start of metadata


In many environments it is desirable that the user have concurrent access to their Office 365 Container, or, in other words, have their O365 VHD attached to several computers at the same time.

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

VHDAccessMode Setting

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

Mode ‘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).
Mode ‘1’ (Network)
On Logon
  • 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 O365 VHD.

On Logoff

  • 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. This will only succeed if this is the last session that is ending.
  • Client deletes the difference disk.

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)
On Logon
  • 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.
On Logoff
  • Client detaches the difference disk.
  • Client attempts to merge the difference disk. This will only succeed if this is the last session that is ending.
  • Client deletes the difference disk.

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)
On Logon
  • Client searches for a per session VHD(X) that is not currently in use
  • If one is found, it is directly attached and used
  • If one is not found, one will be created and used
  • If a new VHD is created and this results 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 logoff.
On Logoff
  • Client detaches the VHD(X)
  • If the VHD(X) is marked for deletion, it is deleted


Notes:

  • 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 (e.g. 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 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).  Therefore only the last session will be able to 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.