This content has been machine translated dynamically.
Dieser Inhalt ist eine maschinelle Übersetzung, die dynamisch erstellt wurde. (Haftungsausschluss)
Cet article a été traduit automatiquement de manière dynamique. (Clause de non responsabilité)
Este artículo lo ha traducido una máquina de forma dinámica. (Aviso legal)
此内容已经过机器动态翻译。 放弃
このコンテンツは動的に機械翻訳されています。免責事項
이 콘텐츠는 동적으로 기계 번역되었습니다. 책임 부인
Este texto foi traduzido automaticamente. (Aviso legal)
Questo contenuto è stato tradotto dinamicamente con traduzione automatica.(Esclusione di responsabilità))
This article has been machine translated.
Dieser Artikel wurde maschinell übersetzt. (Haftungsausschluss)
Ce article a été traduit automatiquement. (Clause de non responsabilité)
Este artículo ha sido traducido automáticamente. (Aviso legal)
この記事は機械翻訳されています.免責事項
이 기사는 기계 번역되었습니다.책임 부인
Este artigo foi traduzido automaticamente.(Aviso legal)
这篇文章已经过机器翻译.放弃
Questo articolo è stato tradotto automaticamente.(Esclusione di responsabilità))
Translation failed!
在 VMware 中使用准备好的映像创建目录
-
创建准备好的映像,并使用这些映像通过以下方式创建 MCS 计算机目录:
- Studio
- PowerShell 命令
使用准备好的映像创建 MCS 计算机目录的关键步骤如下:
- 创建映像定义和初始映像版本。
- 使用映像版本作为准备好的映像来创建目录。
使用 Studio
创建映像定义和初始映像版本
要创建映像定义和初始映像版本,请执行以下操作:
- 在 Studio 中,转到“映像”节点,然后单击“创建映像定义”。在“简介”页面上单击“下一步”。
- 在“映像定义”页面上,为映像定义指定“操作系统类型”和“会话类型”,并为映像定义指定“连接”。
-
在“映像”页面上,选择“资源”(仅列出适用于所设置连接的资源)和要用作创建映像版本模板的主映像。您可以选中“使用计算机配置文件”复选框并选择一个计算机配置文件。
注意:
在选择映像之前,请验证主映像是否已安装 VDA 2311 或更高版本,并且 VDA 上已安装 MCSIO 驱动程序。
- 在“计算机规范”页面上,选择计算机大小。如果选择计算机配置文件,则可以看到从计算机配置文件派生的虚拟 CPU 计数,并且该计数不可更改。如果不选择计算机配置文件,则只能看到从主映像派生的内存大小。
- 在“网卡”页面上,为准备映像选择或添加网卡。对于每个网卡,选择一个关联的虚拟网络。如果不选择计算机配置文件,则默认选择与主映像关联的网卡。如果选择计算机配置文件,则网卡是从计算机配置文件派生的,并且计数不可更改。
- 在“版本描述”页面上,输入所创建的初始映像版本的描述。
- 在“摘要”页面上,检查映像定义和所创建的初始映像版本的详细信息。输入映像定义的名称和描述。单击“完成”。
创建映像版本
- 映像版本允许管理特定映像的不同迭代或更新。此功能使您能够为不同目的维护映像的多个版本。
要从初始映像版本创建映像版本,请执行以下操作:
- 1. 转到“**映像**”节点,选择一个映像版本或映像定义,然后单击“**创建映像版本**”。
- 1. 在“**映像**”页面上,您可以更改同一托管连接中的托管单元,并重新选择该映像版本的主映像和计算机配置文件。
- 1. 如果希望映像版本的配置与初始配置的映像版本不同,请在“**创建映像版本**”对话框的“**计算机规范**”和“**网卡**”页面上配置设置。
- 为映像版本添加描述。单击“完成”。
注意:
如果映像版本创建因任何原因失败,底部的“故障排除”选项卡将提供“重试”选项。
共享准备好的映像
先决条件
共享准备好的映像使用冷迁移在 vCenter Server 实例之间复制映像。以下先决条件适用于属于不同托管连接的托管单元:
-
Cloud Connector 到目标 vCenter 的连接:源资源位置 Cloud Connector 必须具有对目标 vCenter 的 HTTPS 访问权限(端口 443)。如果源连接器无法建立 vSphere SDK 连接来协调操作,则复制将失败。
源 目标 端口 协议 用途 源 Cloud Connector 目标 vCenter Server 443 TCP vSphere SDK 管理连接 -
vCenter Server 之间的冷迁移:冷迁移需要在两个环境中都支持跨 vCenter 迁移。
- 两个 vCenter Server 都必须运行 vSphere 7.0 或更高版本(建议使用 vSphere 8.0+)。
- 不需要增强型链接模式。
端口要求:确保为迁移打开以下端口:
源 目标 端口 协议 用途 源 vCenter Server 目标 vCenter Server 443 TCP vCenter 之间的 API 通信 源 ESXi 主机 目标 ESXi 主机 902 TCP NFC(网络文件复制)数据传输 源 ESXi 主机 目标 ESXi 主机 8000 TCP vMotion 流量 注意:
端口必须双向打开。迁移主要使用 NFC(端口 902)进行数据传输,使用端口 443 进行管理。端口 8000 可能会根据路径使用。源 vCenter 必须在克隆操作期间验证目标的 SSL 证书指纹。
VMkernel 适配器配置:
ESXi 主机 所需服务 源 ESXi 主机 预配或管理 目标 ESXi 主机 与源相同的服务(预配或管理) 双方都必须在 VMkernel 适配器上启用相同的流量服务(预配或管理)。不匹配会导致迁移失败。
在 vSphere Client 中,在“主机 > 配置 > 网络 > VMkernel 适配器”下进行验证。
已知限制:自定义存储策略在跨 vCenter 复制期间不会保留。将应用目标数据存储的默认存储策略。
-
启用 vTPM 的计算机配置文件:密钥提供程序兼容性。对于启用 vTPM 的配置文件,两个 vCenter Server 都必须访问兼容的密钥提供程序。
要求 详细信息 相同的密钥提供程序访问权限 目标 vCenter 必须具有与源相同的密钥提供程序访问权限,或者使用本机密钥提供程序作为桥接 密钥材料 对于外部 KMS:两个 vCenter 都必须注册到相同的 KMS 群集(或共享密钥材料的 KMS 群集) 本机密钥提供程序 在两个 vCenter Server 上配置本机密钥提供程序。每个 vCenter 的本机密钥提供程序都是独立的,但 vSphere 接受此组合用于跨 vCenter 操作。如果源和目标不共享外部 KMS,则本机密钥提供程序也可以充当桥接。本机密钥提供程序在使用前必须在两个 vCenter 上进行备份。 注意:
本机密钥提供程序是最简单的选项。在两个服务器上配置并备份它。如果使用外部 KMS,请确保两个 vCenter 共享相同的群集或密钥材料。在为启用 vTPM 的目录启用映像共享之前,请在 vSphere Client 中“vCenter > 配置 > 安全 > 密钥提供程序”下验证密钥提供程序配置。
在不同主机单元之间共享准备好的映像
要在不同主机单元之间共享准备好的映像,请按照以下步骤操作:
- 右键单击映像版本,然后选择“管理映像共享”。VMware 环境中的所有托管单元都将显示。创建映像版本的资源将禁用任何操作。
- 选择要共享映像的托管单元,然后单击“保存”。“共享状态”列显示“正在进行”。
- 单击底部的“资源”选项卡,了解有关共享状态的更多详细信息。
注意:
当映像版本共享状态正在进行时,“删除映像版本”或“管理映像共享”选项将被禁用。要与不同 VMware 连接中的托管单元共享映像,请确保满足以下要求:
- 两个连接可以相互通信。
管理程序版本一致。
- 预配服务在源主机和目标主机的管理 VMkernel 适配器上启用。在 VMware vSphere Client 中,导航路径为 主机 > 配置 > 网络 > VMkernel 适配器。
从“映像”节点创建计算机目录
使用“映像”节点中的“创建目录”选项,使用映像版本创建目录。
或者,您可以在计算机目录节点中创建目录时选择版本,将其链接到目录创建工作流中的准备好的映像选项。请参阅从“计算机目录”节点创建计算机目录
要从映像节点创建 MCS 计算机目录,请执行以下操作:
- 选择一个映像版本,然后单击创建目录。在简介页面上单击下一步。
- 在桌面体验页面上,选择所需的桌面体验。
- 从映像页面到虚拟机页面,设置将根据所选映像版本预先选择。
- 完成后续页面上的设置。
- 在摘要页面上,检查计算机目录的详细信息。输入计算机目录的名称和描述。单击完成。
- 转到计算机目录节点以查看创建的计算机目录。
从“计算机目录”节点创建计算机目录
要从计算机目录节点创建 MCS 计算机目录,请执行以下操作:
- 单击左侧导航窗格中的计算机目录。
- 单击创建计算机目录。“计算机目录设置”页面随即显示。依次单击简介、计算机类型和计算机管理页面上的下一步。
- 在映像页面上:
- 选择准备好的映像。
- 在准备好的映像下,选择映像定义的映像版本。如有需要,为所选的准备好的映像版本添加备注。
- 单击映像版本名称。要查看有关所选映像版本的更多详细信息,请单击带下划线的版本号。
- 如果所选映像版本配置了计算机配置文件,请选择一个计算机配置文件。如果所选映像版本未配置计算机配置文件,则无法选择使用计算机配置文件。
- 配置后续页面上的设置。
- 在摘要页面上,检查计算机目录的详细信息。输入计算机目录的名称和描述。单击完成。
使用 PowerShell
创建准备好的映像
创建准备好的映像版本规范的详细 PowerShell 命令如下:
-
使用
Test-ProvImageDefinitionNameAvailable命令检查可用的映像定义名称。例如,Test-ProvImageDefinitionNameAvailable -ImageDefinitionName <string[]> <!--NeedCopy--> -
使用
New-ProvImageDefinition命令创建映像定义。例如,New-ProvImageDefinition -ImageDefinitionName image2 -OsType Windows -VdaSessionSupport SingleSession <!--NeedCopy--> -
使用
Add-ProvImageDefinitionConnection命令在指定的托管连接中为映像定义创建新配置。例如,Add-ProvImageDefinitionConnection -ImageDefinitionName image2 -HypervisorConnectionName VMware <!--NeedCopy--> -
使用
New-ProvImageVersion命令创建映像版本。例如,New-ProvImageVersion -ImageDefinitionName $ImageDefintion.ImageDefinitionName -Description "version 1" <!--NeedCopy--> -
使用
Add-ProvImageVersionSpec命令将主映像版本规范添加到映像版本。例如,$MasterImagePath = "XDHyp:\HostingUnits\vmware\win10-master.vm\win10-master-snap.snapshot" $SourceImageVersionSpec = Add-ProvImageVersionSpec -ImageDefinitionName $ImageVersion.ImageDefinitionName -ImageVersionNumber $ImageVersion.ImageVersionNumber -HostingUnitName vmware -MasterImagePath $MasterImagePath <!--NeedCopy-->注意:
对于一个托管单元,您只能向一个映像版本添加一个主映像版本规范。
-
使用
New-ProvImageVersionSpec命令从主映像版本规范创建准备好的映像版本规范。例如,New-ProvImageVersionSpec -SourceImageVersionSpecUid $SourceImageVersionSpec.ImageVersionSpecUid -NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VM Network.network"} -VMCpuCount 2 -VMMemoryMB 4096 -RunAsynchronously <!--NeedCopy--> -
您还可以使用
Add-ProvImageVersionSpecHostingUnit命令在同一托管连接中与另一个托管单元共享准备好的映像版本规范。例如,Add-ProvImageVersionSpecHostingUnit -ImageVersionSpecUid xxxxxxx -HostingUnitName VMwareabc <!--NeedCopy-->
创建映像定义、映像版本和准备好的映像版本规范的完整 Powershell 命令集示例:
New-ProvImageDefinition -ImageDefinitionName image2 -OsType Windows -VdaSessionSupport Single
Add-ProvImageDefinitionConnection -ImageDefinitionName image2 -HypervisorConnectionName VMware
$imageVersion = New-ProvImageVersion -ImageDefinitionName image2
$SourceImageVersionSpec = Add-ProvImageVersionSpec -ImageVersionUid $imageVersion.ImageVersionUid `
-HostingUnitUid $hostingunit.HostingUnitUid `
-MasterImagePath "XDHyp:\HostingUnits\vmware\shuaiz-win10-master.vm\shuaiz-win10-master-snap.snapshot"
New-ProvImageVersionSpec -SourceImageVersionSpecUid $SourceImageVersionSpec.ImageVersionSpecUid `
-NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VMNetwork.network"} `
-VMCpuCount 2 -VMMemoryMB 4096
Add-ProvImageVersionSpecHostingUnit -ImageVersionSpecUid xxxxxxx -HostingUnitName VMwareabc
$PreparedImageVersionSpec = Get-ProvImageVersionSpec -ImageVersionUid $imageVersion.ImageVersionUid | Where SourceImageVersionSpecUid-eq $SourceImageVersionSpec.ImageVersionSpecUid
<!--NeedCopy-->
注意:
- 映像定义中的所有映像版本规范都必须属于同一个托管单元。
- 一个映像版本只能有一个主映像版本规范和一个准备好的映像版本规范。
- 所有映像版本规范都必须具有计算机配置文件,或者所有映像版本规范都不能具有计算机配置文件。
使用准备好的映像版本规范创建目录
使用 New-ProvScheme 命令从准备好的映像版本规范创建 MCS 计算机目录。例如,
New-ProvScheme -ProvisioningSchemeName <string> -ImageVersionSpecUid <Guid> -HostingUnitUid <Guid> -IdentityPoolUid <Guid> [-VMCpuCount <int>] [-VMMemoryMB <int>] [-UseWriteBackCache] [-NetworkMapping <Hashtable>] [-CleanOnBoot] [-Scope <string[]>] [-Metadata <Hashtable>] [-ServiceOffering <string>] [-SecurityGroup <string[]>] [-TenancyType <string>] [-MachineProfile <string>] [-CustomProperties <string>] [-ResetAdministratorPasswords] [-UseFullDiskCloneProvisioning] [-RunAsynchronously] [-PurgeJobOnSuccess] [-ProvisioningSchemeType <ProvisioningSchemeType>]
[-ImageAssignmentNote <string>]
<!--NeedCopy-->
或者,
New-ProvScheme -ProvisioningSchemeName <string> -ImageVersionSpecUid <Guid> -HostingUnitName <string> -IdentityPoolName <string> [-VMCpuCount <int>] [-VMMemoryMB <int>] [-UseWriteBackCache] [-NetworkMapping <Hashtable>] [-CleanOnBoot] [-Scope <string[]>] [-Metadata <Hashtable>] [-ServiceOffering <string>] [-SecurityGroup <string[]>] [-TenancyType <string>] [-MachineProfile <string>] [-CustomProperties <string>] [-ResetAdministratorPasswords] [-UseFullDiskCloneProvisioning] [-RunAsynchronously] [-PurgeJobOnSuccess] [-ProvisioningSchemeType <ProvisioningSchemeType>]
[-ImageAssignmentNote <string>]
<!--NeedCopy-->
在 VMware 中使用准备好的映像版本规范创建目录的示例:
New-ProvScheme -ProvisioningSchemeName assignimage -ImageVersionSpecUid $PreparedImageVersionSpec.ImageVersionSpecUid `
-HostingUnitName $hostingunit.c-IdentityPoolName $IdentityPool.IdentityPoolName `
-CleanOnBoot -Scope @() -SecurityGroup @() -VMCpuCount 2 -VMMemoryMB 8192 `
-NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VM Network.network"}
<!--NeedCopy-->
创建目录的完整 Powershell 命令集示例:
$Catalog = New-BrokerCatalog -AllocationType "Random" -IsRemotePC $False -MinimumFunctionalLevel "L7_20" -Name "vmwarecatalog" -PersistUserChanges "Discard" -ProvisioningType "MCS" -Scope @() -SessionSupport "MultiSession"
$IdentityPool = New-AcctIdentityPool -AllowUnicode -Domain "vmware.local" -IdentityPoolName "vmwarecatalog" -IdentityType "ActiveDirectory" -NamingScheme "vmware##" -NamingSchemeType "Numeric" -Scope @()
$PreparedImageVersionSpec = Get-ProvImageVersionSpec -ImageDefinitionName image2 -ImageVersionNumber 1 -Filter "PreparationType -eq 'Mcs'"
$Task = New-ProvScheme -ProvisioningSchemeName vmwarecatalog -ImageVersionSpecUid $PreparedImageVersionSpec.ImageVersionSpecUid -HostingUnitName vmware -IdentityPoolName vmwarecatalog -CleanOnBoot -Scope @() -SecurityGroup @() -NetworkMapping @{"0"="XDHyp:\HostingUnits\vmware\\DSwitch-VM Network.network"} -VMCpuCount 2 -VMMemoryMB 4096 -RunAsynchronously
Get-ProvTask -TaskId $Task.TaskId
$ProvScheme = Get-ProvScheme -ProvisioningSchemeName vmwarecatalog
Set-BrokerCatalog -Name $Catalog.Name -ProvisioningSchemeId $ProvScheme.ProvisioningSchemeUid
<!--NeedCopy-->
更多信息
后续步骤
共享
共享
在本文中
This Preview product documentation is Citrix Confidential.
You agree to hold this documentation confidential pursuant to the terms of your Citrix Beta/Tech Preview Agreement.
The development, release and timing of any features or functionality described in the Preview documentation remains at our sole discretion and are subject to change without notice or consultation.
The documentation is for informational purposes only and is not a commitment, promise or legal obligation to deliver any material, code or functionality and should not be relied upon in making Citrix product purchase decisions.
If you do not agree, select I DO NOT AGREE to exit.