The Windows Virtual Desktop service recommends FSLogix profile containers as a user profile solution. FSLogix is designed to roam profiles in remote computing environments, such as Windows Virtual Desktop. It stores a complete user profile in a single container. At sign in, this container is dynamically attached to the computing environment using natively supported Virtual Hard Disk (VHD) and Hyper-V Virtual Hard disk (VHDX). The user profile is immediately available and appears in the system exactly like a native user profile. This article describes how FSLogix profile containers used with Azure Files function in Windows Virtual Desktop.

Video Walk-Through

Best practices for Windows Virtual Desktop

Windows Virtual Desktop offers full control over size, type, and count of VMs that are being used by customers. To ensure your Windows Virtual Desktop environment follows best practices:

  • Azure Files storage account must be in the same region as the session host VMs.
  • Azure Files permissions should match permissions described in Requirements – Profile Containers.
  • Each host pool must be built of the same type and size VM based on the same master image.
  • Each host pool VM must be in the same resource group to aid management, scaling and updating.
  • For optimal performance, the storage solution and the FSLogix profile container should be in the same data center location.
  • The storage account containing the master image must be in the same region and subscription where the VMs are being provisioned.

Step-by-Step Guide:

Note: If you're looking for comparison material about the different FSLogix Profile Container storage options on Azure, see Storage options for FSLogix profile containers.

Download the FSLogix agent and install it in your Windows Virtual Desktop image – virtual machine. FSLogix is available for download here

Install the FSLogixAppsSetup agent in the image

Wait for the installation to be finished…

The configuration part of FSLogix Profile Container can be performed in either registry settings or group policy files. The most simple and effective method is using the registry settings below.

Open regedit.exe and browse to “HKEY_LOCAL_MACHINE\Software\FSLogix\Profiles”

Create REG_SZ value name “VHDLocations” and enter new Azure Files network file share path (e.g. \\fslogixwvddemo.file.core.windows.net\fslogixprofiles)

Create DWORD value name “Enabled” and give it value 1.

Create DWORD value name “DeleteLocalProfileWhenVHDShouldApply” and give it value 1. The one deletes existing local profiles before logon – this avoids errors.

Create DWORD value name “FlipFlopProfileDirectoryName” and give it value 1. The one changes the folder name to USERNAME-SID which is much easier during troubleshooting or maintenance search-related work.

Tip: The most important settings for the usage of FSLogix Profile Container are the Enabled and VHDLocations registry setting. There are some other settings that I default recommend to enable. The VolumeType setting changes to disk type to VHDX. You can provide more maintenance tasks via PowerShell with VHDx so I advise changing that from default VHD to VHDx.

Note: If you are using Windows 10 Enterprise single and multi-session or Windows Server 2019, you don’t have to enable the RoamSearch setting. The Search DB is already stored in your user profile.

See here all the other advanced registry settings for FSLogix Profile Container.

When you implement Windows Virtual Desktop on a larger scale – you could run into limitations of Azure Files. Premium storage accounts have up to max 100k IOPS per share with 5 GBps per share at about 3 ms latency. The rule of the thumb is that one user consumes between 5 and 15 IOPs (depending on the type of workload).

To work around this limit and stack up more Azure File shares to create more capacity – there is an option to create filters based on Active Directory groups. You must create an additional registry hive with the SID of that specific group after Software\FSLogix\Profiles and in that hive, you can create all the settings that must overrule the standard Profiles hive settings. This creates the option to filter/overrule settings for users that are members of the Active Directory Group – with effectively increasing on capacity – you can stack as much as storage accounts as you need to accommodate more IOPs.

HKLM\SOFTWARE\FSLogix\Profiles\ObjectSpecific\S-1-5-21-306146113-3061682913-806882557-2166\

Create in the registry hive a REG_SZ value name “VHDLocations” and enter the new (extra)Azure Files network file share path (e.g. \\fslogixwvddemo2.file.core.windows.net\fslogixprofiles). Repeat this for every group you create.

Read heremore about the FSLogix ObjectSpecific settings.

Verify FSLogix Profile Container on Azure Files

Logon as a specific user and check if the Profile Container is being created on the Azure Files share. See the example below.

Or open the Disk Management (diskmgmt.msc) Console on your Windows Virtual Desktop – Windows 10 single – or multi-session virtual machine and see if it directly from there. All set!

Cheers!

Leave a Reply