Hi, this is Rob Leitman. I’m a developer working on the Remote Desktop Virtualization team. This post describes the new user data management available in Windows Server 2012.
In an earlier post, we described the different options for profile management in Windows Server 2008 R2 . For Windows Server 2012, we wanted to find a simpler way to manage user data—compared to using roaming profiles, UE-V , or folder redirection. (Of course, these technologies can be used together fruitfully. For more information, see User State Virtualization .)
The simpler way is user profile disks. User profile disks store user and application data on a single virtual disk that is dedicated to one user’s profile. One of the key challenges to pooled virtual desktop deployments is easily maintaining the user settings and data; this is because this information is discarded at logoff when a pooled virtual desktop image is rolled back to its initial state. User profile disks provide an easy way to store the user settings and data on a separate virtual disk that is reattached at logon, so the user data isn’t discarded when the virtual machine rolls back.
User profile disks are completely transparent to the user—users can save documents to their Documents folder (on what appears to be a local drive) and change their background wallpaper and app settings while, at the same time, all personal settings persist when connecting to different computers in a virtual desktop collection or session collection.
This provides Admins with the reduced management and storage benefits of pooled virtual desktops while still providing the personalization of personal virtual desktops.
User profile disks offer several advantages:
Some things to remember about user profile disks:
User profile disks can be enabled during session creation by using the wizard in Server Manager, as shown in the following image.
When you enable user profile disks, the ACL on the storage location will be set automatically.
To set properties for all user profile disks, click the collection in Server Manager, click Tasks in the Properties pane, and then click Edit Properties . Now, click User Profile Disks in the left pane, as shown in the following image.
These properties may also be set by using the Windows PowerShell cmdlet, as shown in the following command output.
PS C:Windowssystem32> import-module RemoteDesktop
PS C:Windowssystem32> Set-RDSessionCollectionConfiguration –?
Set-RDSessionCollectionConfiguration [-CollectionName] <string> -DisableUserProfileDisk
[-ConnectionBroker <string>] [<CommonParameters>]
PS C:Windowssystem32> Set-RDSessionCollectionConfiguration -CollectionName QuickSessionCollection -EnableUserProfileDisk -MaxUserProfileDiskSizeGB 20 -DiskPath \ProfileSvrUserProfileDisks
Following is a list of definitions of the user profile disk properties in Server Manager and the equivalents in Windows PowerShell.
Enable user profile disks
Turn on this feature.
Turn off this feature.
Maximum size (in GB)
Maximum size of the virtual disk (VHDX) used to store a single user’s profile.
Location where all VHDX files are stored.
Store only the following folders on the user profile disk / Include the following folders
List of folders in the user profile that will be preserved on the user profile disk. All other folders in the user profile will not be preserved.
List of files in the user profile that will be preserved on the user profile disk. All other files in the user profile will not be preserved.
Exclude the following folders
List of folders in the user profile that will not be preserved on the user profile disk. All other folders in the user profile will be preserved.
List of files in the user profile that will not be preserved on the user profile disk. All other files in the user profile will be preserved.
Note : If you set IncludeFolderPath and/or IncludeFilePath , you may not set ExcludeFolderPath and/or ExcludeFilePath . Likewise, if you set ExcludeFolderPath and/or ExcludeFilePath , you may not set IncludeFolderPath and/or IncludeFilePath .How user profile disks work
During first logon, a virtual disk (VHDX) is created from a template disk . This VHDX is attached to the virtual machine or RD Session Host server that the user is logging on to. The profile service is then notified to use this VHDX as the location for the user’s profile. When the user logs off, the VHDX is then detached from the virtual machine.
On subsequent logons to the collection, the VHDX is remounted to whatever virtual machine or RD Session Host server the user is logging on to. The user then has access to everything in his or her profile, even if this is a different virtual machine, or if the virtual machine has been rolled back to a clean state between logons.
The following diagrams show how the VHDX moves as necessary to follow the user in a session-based desktop deployment:
1. On the initial logon, the user gets a session on RDSH1, and the user profile disk VHDX gets mounted as a drive on RDSH1.
2. On the next logon, the user gets a session on RDSH2, and the user profile disk VHDX is now mounted as a drive on RDSH2.
The same storage is used in both cases, so the user’s profile follows their session.
The process is similar for a virtual machine-based desktop deployment:
1. On the initial logon, the user initially gets assigned VM 1-1 on RDVH 1. The user profile disk is attached to the virtual machine that the user logs on to.
2. On the next logon, the user gets assigned to VM 2-2. (Due to rollback, all virtual machines are identical, so this works on any virtual machine the user gets—regardless of the RD Virtualization Host server to which that virtual machine belongs.) The user profile disk follows the user and is attached to VM 2-2.
To verify that user profile disks are working, you can run the mountvol command inside the user session without any parameters. This will show you a disk mounted at the location of the user’s profile, as shown here.
PS C:Userstestuser2> mountvol
Creates, deletes, or lists a volume mount point.
Possible values for VolumeName along with current mount points are:
In addition, you can look in the user profile disk location and see the VHDX created for the user with the user’s SID contained in the file name, as shown in the following output.
PS C:Userstestuser2> dir \contoso3userprofiledisks
Mode LastWriteTime Length Name
---- ------------- ------ ----
-a--- 9/21/2012 3:28 PM 239075328 UVHD-S-1-5-21-1602883023-82254803-4017812817-1606.vhdx
-a--- 9/21/2012 3:12 PM 205520896 UVHD-template.vhdx
User profile disks offer many advantages for managing user profiles. I hope you take some time to try them out.
NOTE: Questions and comments are welcome. However, please DO NOT post a request for troubleshooting by using the comment tool at the end of this post. Instead, post a new thread in the RDS & TS forum .
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.