Issue with user profile disks specifically on Gen 2 VMs

Justin Hatcher 0 Reputation points
2023-07-14T20:24:20.61+00:00

Hello,

I've been working on setting up RDS for our end users as a replacement for our old solution, everything seems to be working correctly except when trying to set up user profile disks for Generation 2 VMs. We're running Windows Server 2022 21H2 Build 20348.1850. The virtual machines are on Windows 10 Pro 22H2 Build 19045.3086.

When a user logs into a RDS machine from the web they are presented with the error "We can't sign in to your account. This problem can often be fixed by signing out of your account and back in. If you don't sign out now, any files you create or changes you make will be lost."

  • User profile disks work fine with Gen 1 VMs, no issues whatsoever.
  • I've tried logging out and back in several times with several user accounts and restarting the machine.
  • I've tried remaking the Gen 2 image from scratch thinking I screwed something up but the second time I made the image it gave the same error.
  • I've tried just installing windows and didn't do anything past the OOBE setup, used that as an image and it gave the same error.
  • I've verified that the user profile disks are in a location that the user account has permission to create it.
  • I've tried creating the user profile disks on a public folder on our file server just for testing purposes and got the same error.
  • I've checked for the UVHD template to see if it's there, the template for the UPD is there and there are profiles for each user that has tried to sign in (Though the user profiles are the exact same size as the template, and all of them are empty).
  • The user profile disks have a size limit of 20GB but all of them only reach 138MB.
  • I've checked the registry for the temporary profiles being made in case the normal profile is locked, the temp profile is there but there is no normal profile.
  • I've checked the event viewer to see if there any apparent issues, it only says that the local profile could not be found and the user will be logged onto a temporary profile.

There are a number of others things I've checked but can't quite remember. I've also tried looking around online to see if there's anything special that needs done to create a Generation 2 User Profile Disk but I haven't found anyone mentioning any errors specifically related to generation 2.

Does anyone know if there's anything specific that needs to be done to get user profile disks working with generation 2 virtual machines?

Windows for business Windows Client for IT Pros Storage high availability Virtualization and Hyper-V
Windows for business Windows Client for IT Pros User experience Remote desktop services and terminal services
Windows for business Windows Server User experience Other
{count} votes

3 answers

Sort by: Most helpful
  1. Limitless Technology 44,746 Reputation points
    2023-07-17T13:33:57.22+00:00

    Hello Justin,

    Thank you for your question and for reaching out with your question today.

    Setting up user profile disks for Generation 2 virtual machines in an RDS environment requires some additional steps compared to Generation 1 VMs. Here are a few considerations to help troubleshoot and resolve the issue:

    1. Generation 2 VM Requirements: Ensure that the Generation 2 virtual machines meet the necessary requirements, including having a UEFI firmware and using VHDX disk format. Verify that the virtual machines are properly configured as Generation 2 and have the appropriate settings in the virtual machine configuration.
    2. VHDX Disk Format: Confirm that the user profile disks are created in the VHDX disk format, as Generation 2 VMs require VHDX for their virtual disks. Double-check the configuration of the user profile disk creation process to ensure that it is creating VHDX disks.
    3. Disk Permissions: Verify that the user account running the RDS session host has the necessary permissions to access and create the user profile disks. Check the permissions on the location where the user profile disks are stored, both at the file system level and the share level if applicable.
    4. Disk Size and Quotas: Make sure that the user profile disks have enough allocated size to accommodate the user profiles. Check the disk quotas on the file system hosting the user profile disks and ensure that they are not limiting the disk space usage.
    5. Disk Template: Check the user profile disk template (UVHD template) to ensure it is compatible with Generation 2 VMs. Verify that the template is correctly created and referenced in the RDS environment configuration.
    6. Disk Template and User Profiles: Confirm that the user profiles are properly created based on the disk template. Ensure that the profiles are not getting stuck in a temporary profile state due to issues with the template or disk permissions.
    7. UPD Template Registry Setting: In the registry of the RDS session host, navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\ProfileList. Check if the UvhdTemplate registry entry is present and correctly configured with the path to the user profile disk template.
    8. Group Policy Settings: Review the Group Policy settings related to user profile disks and Generation 2 VMs. Check if there are any policies specific to Generation 2 VMs that may impact the creation or usage of user profile disks.

    I used AI provided by ChatGPT to formulate part of this response. I have verified that the information is accurate before sharing it with you.

    If the reply was helpful, please don’t forget to upvote or accept as answer.

    Best regards.

    0 comments No comments

  2. Justin Hatcher 0 Reputation points
    2023-07-18T13:08:45.93+00:00

    Thanks for the reply, I tried checking through each point you've listed,

    1. I've confirmed that the virtual machines are using UEFI, the virtual hard disks are in VHDX format and the machines are configured as generation 2 machines.
    2. I've checked the disk format of the virtual machines again, they are in VHDX format as well.
    3. The user accounts have read/write access to the location that the virtual hard disks are stored, they are on a shared location on our file server. The disks are being created but they're empty, even for a network admin account.
    4. We don't have any disk quotas set.
    5. I'm not entirely sure to check to see if the UPD template is compatible with generation 2 VMS, but during the configuration all it asks is if you want to enable user profile disks, a location to store the user profile disks and a maximum size. It also notes that users creating user profile disks need to be added as a member of the local administrators group on the server. The user group that has access to RDS has been added to the local administrators group on the server with the user profile disks.
    6. The template and the profile disks are all being created, the template is blank and the file size is 135,168kb. The user profiles are the same, a blank 135,168kb file. I checked the generation 1 test machine I made and it's template is the same, a 135,168kb blank disk template but the profile disks that are created actually have the typical user files within them.
    7. I'm looking at this registry location on the session host server but I'm not seeing any registry entries specifically for the user profile disks. I'm looking around online but not seeing anything specifically related to this but I'll keep looking to see if I can find anything.
    8. I don't believe we have any GPOs effecting user profile disks as we don't use them outside of this RDS setup. Though I'll take a look through our policies to see if I can find anything that would be causing issues.
    0 comments No comments

  3. Justin Hatcher 0 Reputation points
    2023-09-20T15:03:30.9933333+00:00

    After looking at this on and off for a couple months I came across the answer somewhere. The problem was that the Gen 2 machine template had a CD drive. After removing the CD drive from the template in the Hyper-V manager the issue I as having with user profile disks not mounting properly was no longer an issue.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.