SOLVED

# Convert UPD to FSLogix container

Highlighted
Occasional Contributor

# Convert UPD to FSLogix container

We are wanting to move our users from RDS to WVD without losing or redoing the the profiles. Is there a way to convert the traditional RDS UPD profile (VHD) to a FSLogix profile container (Would like to make it a VHDX, if that is not possible then VHD to VHD)?

25 Replies
Highlighted
Best Response confirmed by Eva Seydl (Microsoft)
Solution

# Re: Convert UPD to FSLogix container

@Roger Critz we will be starting a private preview for a PowerShell script to accomplish this.  I will post the specifics here when available.  The Private Preview will be for those moving from on-prem to WVD, which is the use case you describe.  The current plan is for this PowerShell to ultimately move to an open source repo to be extended by the community.  Thanks!

Highlighted

# Re: Convert UPD to FSLogix container

@Doug_CoombsI would also like that

Highlighted

# Re: Convert UPD to FSLogix container

Great to hear! I'm interested in previewing/testing this out as well.
Highlighted

# Re: Convert UPD to FSLogix container

I would love to use this also

Does the script also work for other UPD connectors like the once created by Parallels?

Highlighted

# Re: Convert UPD to FSLogix container

Hi. Would also like to see a MS UPD to FSLogix container script or process please.

Highlighted

# Re: Convert UPD to FSLogix container

@Doug_Coombs can I have preview please?

Highlighted

# Re: Convert UPD to FSLogix container

We are looking for this script as well! Would you share it when it's available?

Highlighted

Highlighted

# Re: Convert UPD to FSLogix container

OK so here is what I have so far. It's actually functional and I think anyone can run it in their environment.

It will get the list of files for X:\Path\UVHD-<SID>.vhdx and then give you X:\Path\SAM_SID\Profile_SAM.vhdx

It takes about 11 seconds per VHDX file. There's a 5-second delay on the mount and dismount step just to make sure that process has completed before moving onto the next file.

There's one problem in my environment but it's not the code itself. About 1 in 20 source VHDX files fail to mount. e.g. Mount-Diskimage -ImagePath X:\Path\to\the\file.vhdx. The error is 0x80070005.

I've tried on multiple servers and accounts. It's not NTFS permissions or lack of admin rights. I haven't found the cause yet.

If you comment out the part where it does any actual changes and leave only the mount and dismount sections then you can see if you're okay to proceed in your environment. If anyone has any idea why some files fail to mount I'd like to hear. That's the reason I am sharing this now :)

Edit: Just as follow up... if anyone wants to quickly see if they'll have Mount-DiskImage issues then you can use the below.

$tests = Get-ChildItem "X:\Path" -File -Filter UVHD-S*.vhdx | Sort Name New-Item -Path "X:\Path" -ItemType File -Name 'aaaa.txt' ForEach ($test in $tests){ Write-Host "This is "$test.FullName -ForegroundColor Green
Mount-DiskImage -ImagePath $test.FullName -ErrorAction SilentlyContinue -ErrorVariable MountError | Out-Null; If ($MountError){
Write-Host "Failed to mount" $test.FullName -ForegroundColor Yellow Add-Content -Path "X:\Path\aaaa.txt" -Value$test.FullName
}
Dismount-DiskImage -ImagePath \$test.FullName | Out-Null
}

Highlighted

# Re: Convert UPD to FSLogix container

I was able to convert my UPD's but when i try to login using FSLogix the login doesnt attach to the new VHDX . Is there something you need to do after to get it to attach properly? @adamsi175

Highlighted

# Re: Convert UPD to FSLogix container

@jerrywilkinson If FSLogix is configured correctly (enabled, set properly for your format (VHD/VHDX) and not using the profile, then it would be a matter of standard FSLogix trouble shooting to determine the issue.  Trouble shooting steps can be found here: https://docs.microsoft.com/fslogix/fslogix-trouble-shooting-ht.

Additional information around error codes, etc. are also available in the reference section.

Highlighted

# Re: Convert UPD to FSLogix container

@Doug_Coombs yes ive gone through all of that, and our FSLogix settings are correct. the errors im seeing are:

VirtualDiskAPI::CreateFormattedDisk failed to create vhd(x):

LoadProfile failed. User: ndtest. SID: S-1-5-21-4174114073-886831968-143637270-1216. (A device attached to the system is not functioning.)

i think there is an issue in the conversion process, it creates the new VHDX but if i try to mount it with the FSLogix Mount tool i get errors related to permissions. but ive compared the permissions to a new FSLogix container VHDX and they are the same. So just scratching my head on the root issue

Highlighted

# Re: Convert UPD to FSLogix container

@jerrywilkinson Sorry if these are remedial questions, but I need to understand the scenario.

1- I assume that the user can manually mount the VHDX, from the same machine as is being used for FSLogix, and traverse?

2- What is the result of the error, a new VHDX, temp profile, local profile, etc?

3- What process did you use to convert?

Thanks!

Highlighted

# Re: Convert UPD to FSLogix container

To sign up for the private preview of the UPD Migration script please visit this site: https://forms.office.com/Pages/ResponsePage.aspx?id=v4j5cvGGr0GRqy180BHbR3HZFwpyCxVCngXplJaL78tUOUE0...

This is an unsupported private preview, the scripts are provided as-is.

Highlighted

# Re: Convert UPD to FSLogix container

i was using the script that's listed in this forum post,

ive signed up for the private preview, ill wait for that before i move ahead.

Highlighted

# Re: Convert UPD to FSLogix container

The script I posted uses 2 settings that are not the default for FSLogix. Perhaps that explains your issue?

1) It uses a .vhdx suffix. The default that FSLogix tries to load on an RDSH is .vhd

2) It creates the folders using SAM_SID rather than the default of SID_SAM

In the script change it to .vhd and SID_SAM if you want to use the defaults that are configured with a basic install of the FSLogix app in an RDSH. If you want to use the defaults of .vhd and sid_sam then the parts you want are on lines 113 and 222 of the attached file.

The requirements in a .vhd* file itself for FSLogix are 2 things

1) Files are in "\Profile" rather than the root of the UPD.
2) A few registry keys for FSLogix. The script has code there to create the info and add to their registry

Attached is a more recent update that has an extra bit to not move files for a profile that fails to mount. The process to move and rename the UPD file itself is unmodified. I've used it to convert 500+ UPD .vhdx files from D:\UPD to D:\FSLogix\<SAM>_<SID>\.

Highlighted

# Re: Convert UPD to FSLogix container

Thanks for the reply, originally i did change the defaults in the script to match my FSlogix GPO settings. It creates the new VHDX without any issues but when i try to login with the test user it doesnt attach the FSLogix VHDX , and i get the errors in the fslogix log

VirtualDiskAPI::CreateFormattedDisk failed to create vhd(x):

(The file exists.)

Status set to 9: Cannot create virtual disk

Highlighted

# Re: Convert UPD to FSLogix container

"(The file exists.)" as in the file already exists that it would want to create? Can it not read it due to permissions? The computer AD account presumably has permissions to the share and parent folder. After running the conversion script if you then rename the file slightly and try to log in do you end up with a new file based on the template VHD or the DefaultUser for the RDSH and can use that file? @jerrywilkinson

Highlighted

# Re: Convert UPD to FSLogix container

ive checked permissions, and everything matches to when a FSLogix VHDX gets created. ive even tried logging in so a FSLogix VHDX gets created, then renaming the converted one to match the newly created one and the same issue happens. FSLogix doesnt mount the VHDX it just creates a local user profile on the RDSH. im still digging into the issue @adamsi175