linux怎么查看本机内存大小
522
2022-10-08
Azure Virtual Desktop 实战部署之配置用户数据漫游-存储账户准备
前面和大家聊到Azure虚拟桌面支持个人桌面和池桌面的桌面发布形式。那这两种桌面发布形式究竟有什么区别,又有哪些需要注意的地方呢 ?
个人桌面:个人主机池顾名思义就是每个用户都用一台单独的桌面来满足其办公要求,这个桌面是永久性桌面,不会随着用户的注销,重新等了而改变,用户可以修改桌面的配置以满足个人喜好,也可以将文件保存在桌面环境中。那个人桌面呢,主要适用于一些在办公时对计算机性能要求比较高的用户,比如公司的财务人员,公司的设计人员等等 池桌面:也称为非持久性桌面,也就是说当用户发起链接的时候,会将用户分配到当时可用的任何会话主机,当然,前提是我们有授权用户对于回话主机的访问。具体如何进行分配,取决于我们在配置回话主机时指定的负载均衡算法以及每个会话主机可以进行的会话数。因为池桌面的用户每次登录的会话主机都不是固定的,所以我们就需要一种方式在外部保存用户相关数据,来实现用户每次登录都会保持原有的个人配置信息
在传统的VDI架构中,用户配置文件存储在文件服务器上,在用户登录时下载到本地,并在用户注销时上传到文件服务器。这种方法的缺点是每次都必须复制文件数据。随着用户配置文件越大,所需登录所需的时间就越长。
在Azure虚拟桌面中,微软建议使用FSLogix来对非持久性用户的用户配置文件的管理,使用FSLogix进行配置文件管理可以有效的避免以前使用UPM时因上传和下载数据造成用户登陆等待时间较长的问题。相比之下,FSLogix 将用户配置文件视为 VHD 格式(虚拟硬盘)。用户在登录时自动挂载 VHDX 文件,这比复制数据快得多,并且与用户配置文件的大小无关。管理员可以为 VHD 文件选择多个保存目的地。可以使用使用 Azure VM 的文件服务器,但如果使用 AVD,微软推荐使用 Azure Files,Azure 的托管文件共享服务。
使用 FSLogix 配置文件容器,管理员可以在非持久环境(如池化 Windows 虚拟桌面主机池)中维护用户上下文(例如应用程序设置)。它将优化最终用户的登录时间,因为用户配置文件存储在每次用户登录时安装到相关会话主机 VM 的 VHD(X) 文件中,因此无需先下载任何内容。
聊了这么多,接下来我们就一起来看下如何配置用户数据漫游。
准备配置脚本
下载配置脚本:the execution policy to unblock importing AzFilesHybrid.psm1 moduleSet-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser \# Navigate to where AzFilesHybrid is unzipped and stored and run to copy the files into your path.\CopyToPSPath.ps1 \#Import AzFilesHybrid moduleImport-Module -Name AzFilesHybrid \#Login with an Azure AD credential that has either storage account owner or contributer Azure role assignmentConnect-AzAccount -Environment AzureChinaCloud \#!!!请修改!!!!!\#Define parameters #error1:" 'wvdtestfsloginx01' has more than 15 characters" $SubscriptionId = "3a16e97c-**--9a18-ab*********"$ResourceGroupName = "--RG"$StorageAccountName = "******" \#Select the target subscription for the current sessionSelect-AzSubscription -SubscriptionId $SubscriptionId \# Register the target storage account with your active directory environment under the target OU (for example: specify the OU with Name as "UserAccounts" or DistinguishedName as "OU=UserAccounts,DC=CONTOSO,DC=COM"). \# You can use to this PowerShell cmdlet: Get-ADOrganizationalUnit to find the Name and DistinguishedName of your target OU. If you are using the OU Name, specify it with -OrganizationalUnitName as shown below. If you are using the OU DistinguishedName, you can set it with -OrganizationalUnitDistinguishedName. You can choose to provide one of the two names to specify the target OU.\# You can choose to create the identity that represents the storage account as either a Service Logon Account or Computer Account (default parameter value), depends on the AD permission you have and preference. \# Run Get-Help Join-AzStorageAccountForAuth for more details on this cmdlet.\# get OU:Get-ADOrganizationalUnit -Filter 'Name -like "*"' Join-AzStorageAccountForAuth ` -ResourceGroupName $ResourceGroupName ` -StorageAccountName $StorageAccountName ` -DomainAccountType "ComputerAccount" <# Default is set as ComputerAccount #> ` -OrganizationalUnitDistinguishedName "OU=WVD,OU=****,DC=cloudmsp,DC=club" <#[dsquery OU -name afs] If you don't provide the OU name as an input parameter, the AD identity that represents the storage account is created under the root directory. #> ` -EncryptionType "AES256,RC4" <# Specify the encryption agorithm used for Kerberos authentication. Default is configured as "'RC4','AES256'" which supports both 'RC4' and 'AES256' encryption. #> \#Run the command below if you want to enable AES 256 authentication. If you plan to use RC4, you can skip this step.\#Update-AzStorageAccountAuthForAES256 -ResourceGroupName $ResourceGroupName -StorageAccountName $StorageAccountName \#CheckJoinADStatus检查存储账号加入AD的状态\# Get the target storage account$storageaccount = Get-AzStorageAccount -ResourceGroupName $ResourceGroupName -Name $StorageAccountName\# List the directory service of the selected service account$storageAccount.AzureFilesIdentityBasedAuth.DirectoryServiceOptions\# List the directory domain information if the storage account has enabled AD DS authentication for file shares$storageAccount.AzureFilesIdentityBasedAuth.ActiveDirectoryProperties \#You can run the Debug-AzStorageAccountAuth cmdlet to conduct a set of basic checks on your AD configuration with the logged on AD user. This cmdlet is supported on AzFilesHybrid v0.1.2+ version. For more details on the checks performed in this cmdlet, see Azure Files Windows troubleshooting guide.Debug-AzStorageAccountAuth -StorageAccountName $StorageAccountName -ResourceGroupName $ResourceGroupName -Verbose
将存储账户加入AD
运行脚本,将存储账户加入AD:
计算机账户创建完成:
检查存储账户加域状态:
配置存储账户权限
编辑脚本文件:
$SubscriptionId = "3a16e97c-**--9a18-ab*********"$ResourceGroupName = "--RG"$StorageAccountName = "****"$sharename = "*****" \#Constrain the scope to the target file share$scope = "/subscriptions/$SubscriptionId/resourceGroups/$ResourceGroupName/providers/Microsoft.Storage/storageAccounts/$StorageAccountName/fileServices/default/fileshares/$sharename"\#Use one of the built-in roles: Storage File Data SMB Share Reader, Storage File Data SMB Share Contributor, Storage File Data SMB Share Elevated Contributor$rolename = "Storage File Data SMB Share Elevated Contributor" $UPN = "wvdadmin@cloudmsp.club"\#Get the name of the custom role$FileShareContributorRole = Get-AzRoleDefinition $rolename\#Assign the custom role to the target identity with the specified scope.New-AzRoleAssignment -SignInName $UPN -RoleDefinitionName $FileShareContributorRole.Name -Scope $scope\#Check Assign Status\#get-AzRoleAssignment -signinname $UPN\#remove-assign\#remove-AzRoleAssignment -signinname $UPN -RoleDefinitionName $rolename -Scope $scope\#Assign to Group$GroupRolename = "Storage File Data SMB Share Contributor"$GroupFileShareContributorRole = Get-AzRoleDefinition $GroupRolename$ObjectId = "c9b3b6be-a038-4b6e-a404-36b226378f43"New-AzRoleAssignment -ObjectId $ObjectId -RoleDefinitionName $GroupFileShareContributorRole.Name -Scope $scope\#Check Assign Status\#get-AzRoleAssignment -ObjectId $ObjectId\#Group remove-assign\#remove-AzRoleAssignment -ObjectId $ObjectId -RoleDefinitionName $rolename -Scope $scope
生产变量存储:
配置权限:
分配存储账户权限:
配置完成,如下图所示:
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~