Migrating FSLogix profiles to new share

This will serve as a guide for moving FSLogix profiles from a File Server, or existing azure file share to a new storage account. This guide assumes you are using Nerdio Manager, but the same can be done through native Azure and with GPOs or Intune.

Prepare for Cutover

  1. This process will need to be completed after hours when no users are logged into the session host. Prepare all end user’s to log out at a certain time.

  2. Login to your Nerdio instance, browse to AVD > User Sessions and make sure no users are logged on. If there are, select their name and hit “send message” to inform them they will be signed out in 10 minutes and to save any work. Once that 10 minutes passes, select “log off” for each user.

  3. Power down the host’s, and during this process check the option to block auto-scale actions for 24 hours.

  4. If migrating from an FS, login to the server > navigate to computer management > shared folders > open files, make sure there are no open files within the fslogix profile share.

  5. This guide assumes you have already created a new storage account for the profiles, joined it to the AD Domain or Entra Domain Services, and set the SMB Share Contributor role for a security group of AVD user’s, as well as configured file level NTFS permissions.

Cutover

  1. Login to a VM with access to both shares, if migrating from a File Server login to the FS itself.

  2. Copy the script below, and paste it into Powershell ISE or a Text Editor.

  3. .\azcopy.exe copy "<SOURCE STORAGE ACCOUNT URL/FOLDER><SAS KEY>" "<DESTINATION STORAGE ACCOUNT URL><SAS KEY>" --recursive --preserve-permissions=true --preserve-smb-info=true

  4. In the Azure Portal, navigate to Storage Accounts, and select the storage account you will be copying profiles to. Double check that the file share has enough provisioned capacity for all profiles to be copied. Generate a Shared Access Signature, and set the expiry date to 2 or 3 days. Copy the SAS key into the text editor.

  5. Next, copy the Share URL by clicking File Shares > FSLogix Profile Share > Share URL. Copy this into the text editor as well. Repeat the steps above if you are copying from a source storage account to a new storage account, which would give you two share URLs and two SAS keys.

  6. In the script where it says SOURCE SA URL, either paste the source storage account Share URL with the SAS key appended after beginning with ?, or paste just the source profile directory from the FS.

  7. Do the same for the DESTINATION SA URL section, paste the Share URL followed by the SAS Key.

(Examples below with made up SAS keys)

  1. Example for FS:

.\azcopy.exe copy "F:\PROFILES" "https://testdata.file.core.windows.net/fslogixprofiles?sv=2022-11-02&ss=f&srt=sco&sp=rwdlc&se=2024-02-20T06:44:42Z&st=2024-02-16T22:44:42Z&spr=https&sig=F4MQ%2Fved98lyI6XjQnJRNAaAbHKLMlodV3noOvJCfoE%3D" --recursive --preserve-permissions=true --preserve-smb-info=true

  1. Example for Storage Account to Storage Account:

.\azcopy.exe copy "https://nerdiolab.file.core.windows.net/fslogixnerdiolab?sv=2022-11-02&ss=bfqt&srt=sco&sp=rwdlacupiytfx&se=2024-02-16T06:34:44Z&st=2024-02-15T22:34:44Z&spr=https&sig=Pfa4hJjOF610ovlFwJUOOPTAFcYx6LWmN%2BmiOwC7jRA%3D" "https://robstgaccount.file.core.windows.net/newtestfsrob?sv=2022-11-02&ss=f&srt=sco&sp=rwdlc&se=2024-02-16T06:34:41Z&st=2024-02-15T22:34:41Z&spr=https&sig=0IAL%2BSe4%2Bm7NxDpN7GtNhHRH3S7bzk57icfWpeRjp74%3D" --recursive --preserve-permissions=true --preserve-smb-info=true

  1. Run the copy script. Profiles should begin copying over to the new share immediately. The preserve permissions and preserve SMB info parameters will make sure NTFS permissions are the exact same when copied.

  2. Once the copy is complete, take a look over the copied profiles and make sure the VHDX’s are present, and the sizing looks the same on both ends.

  3. If using NMM, navigate to AVD > Host Pools > Properties > FSLogix. If set to default, take note of the current FSLogix settings (The most important ones being Volume Type, and FlipFlopProfileDirectoryName).

If FlipFlopProfileDirectoryName is set to 1, make sure it is set to 1 when switching to a custom profile, if volume type is VHD and all the profiles are VHD (not VHDX), make sure this is also set accordingly.

  1. Select the new FSLogix profile share and remove the old share path. At the bottom, check “Apply to Existing Hosts” which will re-image the hosts. Save and Close.

  2. If not using NMM, you will need to modify the VHDLocations GPO targeting the AVD Hosts, removing the old share and adding the new one. Once you start the host’s back-up, it should apply that GPO and point to the new share path.