none
How to manually copy an existing user profile into an FSLogix profile container RRS feed

  • General discussion

  • How to manually copy an existing user profile into an FSLogix profile container

    Currently FSLogix does not have an option to automatically import a user into FSLogix profile container solution, but you can do the conversion yourself.

     

     

    1. Find the location and name of the user you want to move

    This example uses a current user named: Bob

     

     

    2. Open an Administrator command prompt

    Navigate into the FSLogix Apps directory

    cd C:\Program Files\FSLogix\Apps

     

    Pull up the copy-profile command

    frx copy-profile

     


     

     

    3. Build your command string

    Choose the parameters that apply to your situation, in this example we are going to:

    • Give the output path for our vhd(x) -filename C:\Profile.vhd(x)
    • Enter in which user to copy            -username Domain\Username
    • Specify the size of the disk with      -size-mbs 10000
    • Make the disk grow as needed        -dynamic 1

     

     

    4. Perform the conversion

    frx copy-profile -filename C:\Users\Bob.vhdx -username Bob -dynamic 1 -size-mbs 10000

     After the process in finished, a clone of your user Bob account should be in a container under C:\Users\Bob.vhdx

     

     

    Troubleshooting

    It is possible that you may run into some errors when using and creating Profile Containers.

     

    (0x00000001D): the system cannot write to the specified device.

    This problem arises when you are attempting to migrate an existing user account to a profile container (vhd).

    Fix:

    Delete the following directory and all its contents. Re-running your command should result in a success.

    %Temp%\FrxMount

     

    (0x00000005): Access denied

    This problem arises when you are attempting to migrate an existing user account without administrator permissions

    Fix:

    You have to run the command using an administrator command prompt.

    Tuesday, June 25, 2019 9:11 PM
    Owner

All replies

  • Thanks a lot for this.

    Can you please assist how can I add the profile disk to the user.

    In group policy I only get the option to select the VHD location.

    Tuesday, July 9, 2019 11:39 AM
  • I never can get this to complete.  I do not have an FrxMount folder under %TEMP%, and I've tried this with a local and domain admin account on my profile, both running an elevated command prompt.  I used -verbose, and here is the output:

    VHD not found.  Creating...
    Create success.  Attaching...
    Attach success.  Getting physical path...
    Get physical path success.  Opening device...
    Open device success.  Initializing disk...
    Initialize disk success.  Getting volume name...

    .
    Formatting volume: \\?\Volume{08cec15c-fe42-4221-a4d2-23f45ed3cc69}\
    Format success
    GetSecurityDescriptor success
    GetDACL success
    Set security success
    Copying profile for user SID Masked to volume \\?\Volume{08cec15c-fe42-4221-a4d2-23f45ed3cc69}\
    Looking for Profile Path in registry
    CopyProfileToVolume  SID: SID Masked  Volume: \\?\Volume{08cec15c-fe42-4221-a4d2-23f45ed3cc69}\  profileImagePath: C:\Users\username
    Exporting registry information
    Creating mount point: "C:\Users\xxx\AppData\Local\Temp\FrxMount" --> "\\?\Volume{08cec15c-fe42-4221-a4d2-23f45ed3cc69}\Profile"
    Mirroring directory
                   Exit code: 9
    MirrorDirectory error: 0x0000001D
    Error copying profile (0x0000001D): The system cannot write to the specified device.

    Detach VHD success

    This is a Windows 10 v1809 OS and the latest FsLogix version, though the older version did the same thing.

    Thursday, August 1, 2019 4:22 PM
  • Me and another Citrix CTA friend wrote some scripts to do this from Local profiles and Citrix CPM profiles.  

    UPM - http://www.citrixirc.com/?p=848

    Local - http://www.citrixirc.com/?p=857

    Hope this helps you guys.  

    Tuesday, August 20, 2019 3:35 PM
  • Same error here, sometimes its works but mostly we get the 1D error
    Wednesday, October 9, 2019 7:02 AM
  • @KevinRGS, The line that says Exit code 9 is indicating that the call to robocopy.exe to copy the data is failing. Refer to the docs in https://docs.microsoft.com/en-us/fslogix/logging-diagnostics-reference to configure RobocopyLogPath. This will let you see the robocopy output and determine what it's having difficulty copying and (hopefully) why.
    Wednesday, October 9, 2019 5:02 PM
    Moderator
  • Hi LordJeb,

    We also get the code 9. The Robocopy log specifies it can't access files ( ERROR 1920 (0x00000780) in the

    \AppData\Local\Microsoft\WindowsApps\ directory.

    It re-tries a couple of time and than exits.

    The command is run in a Administrator cmd .

    Do you have any ideas how to get around this ?

    Thanks,

    Marc

    Monday, October 14, 2019 3:17 PM
  • @baastie, I think what is happening here is that there are some special files (reparse points) that cannot be copied in some circumstances. I will investigate some more and try to get to the bottom of this. Unfortunately, I don't know of any workaround at the moment.
    Tuesday, October 15, 2019 10:27 PM
    Moderator
  • Yes, that's what we discovered - I guess it's a known problem with RoboCopy when used to copy profile folders - it'll get caught in a loop trying to copy the appdata symlinks.  What I don't get is why everyone doesn't have this issue.  It's never worked for me, but looks like it must for most other people.  The solutions were to exclude symlinks from the copy, but as this is an external wrapper around Robocopy, not sure how to do that in this case.

    Wednesday, October 30, 2019 8:06 PM
  • Hi there, I was having the same issue, but I figured that it was because I was copying my own profile, which I was already logged into. Once I logged in as a different user and ran the command against my own profile, it worked. Hope this helps!

    Joel

    Monday, November 4, 2019 2:09 PM
  • Hi Micah,

    is it possible to inject the redirections.xml when using "frx copy-profile"?

    My goal is to copy not the whole existing profile (which are at least a few GBs for the existing user profiles), but only to include the relevant profile data from redirections.xml.

    Thank you!
    Andreas

    Tuesday, November 5, 2019 3:28 PM
  • same issue, anyone has a fix for this?

    Mirroring directory
                   Exit code: 9
    MirrorDirectory error: 0x0000001D
    Error copying profile (0x0000001D): The system cannot write to the specified device.

    Wednesday, November 27, 2019 3:33 PM