您可以從 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