可以从 ESXi 主机中导出 TPM 认可密钥 (EK) 证书,然后将其导入 vSphere Trust Authority 集群。如果要信任受信任集群中的单个 ESXi 主机,需要执行此操作。
要将 TPM EK 证书导入到 Trust Authority 集群,必须将 Trust Authority 集群的默认证明类型更改为接受 EK 证书。默认证明类型接受 TPM 证书颁发机构 (CA) 证书。某些 TPM 不包含 EK 证书。如果要信任单个 ESXi 主机,TPM 必须包含一个 EK 证书。
注: 请将导出的 EK 证书文件存储在安全的位置,以防必须还原
vSphere Trust Authority 配置。
前提条件
过程
结果
Trust Authority 集群的证明类型更改为接受 EK 证书。EK 证书从受信任集群中导出并导入到 Trust Authority 集群。
示例: 导出和导入 TPM EK 证书
以下示例显示了如何使用 PowerCLI 将 Trust Authority 集群的默认证明类型更改为接受 EK 证书,从受信任集群中的 ESXi 主机导出 TPM EK 证书,然后将其导入到 Trust Authority 集群。下表显示了所使用的示例组件和值。
组件 | 值 |
---|---|
Trust Authority 集群的 vCenter Server | 192.168.210.22 |
变量 $vTA |
Get-TrustAuthorityCluster 'vTA Cluster' |
变量 $tpm2Settings |
Get-TrustAuthorityTpm2AttestationSettings -TrustAuthorityCluster $vTA |
变量 $vmhost |
Get-VMHost |
受信任集群中的 ESXi 主机 | 192.168.110.51 |
Trust Authority 管理员 | [email protected] |
包含输出文件的本地目录 | C:\vta |
PS C:\Users\Administrator> Connect-VIServer -server 192.168.210.22 -User [email protected] -Password 'VMware1!' Name Port User ---- ---- ---- 192.168.210.22 443 VSPHERE.LOCAL\TrustedAdmin PS C:\Users\Administrator> Get-TrustAuthorityCluster Name State Id ---- ----- -- vTA Cluster Enabled TrustAuthorityCluster-domain-c8 PS C:\Users\Administrator> $vTA = Get-TrustAuthorityCluster 'vTA Cluster' PS C:\Users\Administrator> $tpm2Settings = Get-TrustAuthorityTpm2AttestationSettings -TrustAuthorityCluster $vTA PS C:\Users\Administrator> Set-TrustAuthorityTpm2AttestationSettings -Tpm2AttestationSettings $tpm2Settings -RequireEndorsementKey Confirmation Configure the Tpm2AttestationSettings 'TrustAuthorityTpm2AttestationSettings-domain-c8' with the following parameters: RequireCertificateValidation: False RequireEndorsementKey: True [Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): y Name RequireEndorsementKey RequireCertificateValidation Health ---- --------------------- ---------------------------- ------ TrustAuthorityTpm2AttestationSettings... True False Ok PS C:\Users\Administrator> Disconnect-VIServer -server * -Confirm:$false PS C:\Users\Administrator> Connect-VIServer -server 192.168.110.51 -User root -Password 'VMware1!' Name Port User ---- ---- ---- 192.168.110.51 443 root PS C:\Users\Administrator> Get-VMHost Name ConnectionState PowerState NumCpu CpuUsageMhz CpuTotalMhz MemoryUsageGB MemoryTotalGB Version ---- --------------- ---------- ------ ----------- ----------- ------------- ------------- ------- 192.168.110.51 Connected PoweredOn 4 55 9576 1.230 7.999 7.0.0 PS C:\Users\Administrator> $vmhost = Get-VMHost PS C:\Users\Administrator> Export-Tpm2EndorsementKey -VMHost $vmhost -FilePath C:\vta\tpm2ek.json Mode LastWriteTime Length Name ---- ------------- ------ ---- -a---- 12/3/2019 10:16 PM 2391 tpm2ek.json PS C:\Users\Administrator> Disconnect-VIServer -server * -Confirm:$false PS C:\Users\Administrator> Connect-VIServer -server 192.168.210.22 -User [email protected] -Password 'VMware1!' Name Port User ---- ---- ---- 192.168.210.22 443 VSPHERE.LOCAL\TrustedAdmin PS C:\Users\Administrator> Get-TrustAuthorityCluster Name State Id ---- ----- -- vTA Cluster Enabled TrustAuthorityCluster-domain-c8 PS C:\Users\Administrator> $vTA = Get-TrustAuthorityCluster ‘vTA Cluster’ PS C:\Users\Administrator> New-TrustAuthorityTpm2EndorsementKey -TrustAuthorityCluster $vTA -FilePath C:\vta\tpm2ek.json TrustAuthorityClusterId Name Health ----------------------- ---- ------ TrustAuthorityCluster-domain-c8 1a520e42-4db8-1cbb-6dd7-f493fd921ccb Ok