在執行 Windows Server 的 Google Cloud VM 中初始化 TPM 虛擬智慧卡

在執行 Windows Server 的 Google Cloud VM 中初始化 TPM 虛擬智慧卡

設定帶有 vTPM 的 Windows Server 後(請參閱https://cloud.google.com/blog/products/gcp/security-in-plaintext-use-shielded-vms-to-harden-your-gcp-workloads)在 Google Cloud VM 中並透過遠端桌面服務 (RDS) 存取它,當嘗試使用以下命令初始化 TPM 虛擬智慧卡時:

Tpmvscmgr.exe create /name "TestVirtualSC" /pin prompt /adminkey default /generate

產生以下錯誤:

Creating TPM Smart Card...
TPM Virtual Smart Card management cannot be used within a Terminal Services session.
    (0x800704d3) The request was aborted.

那麼,是否有任何方法可以透過遠端 RDS 會話來初始化 TPM 虛擬智慧卡?

答案1

您可以使用緊急管理服務 (EMS) 控制台連接後,將向您顯示命令提示字元。

  1. 從您的終端或 Cloud Shell 中,啟用與虛擬機器上序列埠的連線:
gcloud compute instances add-metadata <VM-NAME> --metadata=serial-port-enable=1

替換<VM-NAME>為要啟用序列埠的 VM 的名稱。

  1. 2透過VM 的序列埠連接到 EMS 控制台:
gcloud compute connect-to-serial-port <VM-NAME> --port 2

<VM-NAME>將VM 的名稱替換為要連接的序列埠。

  1. 驗證您是否看到類似以下內容的輸出:
Computer is booting, SAC started and initialized.

Use the "ch -?" command for information about using channels.
Use the "?" command for general help.

SAC>
EVENT: The CMD command is now available.
SAC>
  1. 使用以下cmd命令建立新的命令提示字元會話並驗證類似於以下內容的輸出:
The Command Prompt session was successfully launched.
SAC>
EVENT:   A new channel has been created.  Use "ch -?" for channel help.
Channel: Cmd0001
SAC>
  1. 使用命令連接到新的命令提示字元會話ch -si 1並驗證類似於以下內容的輸出:
Name:                  Cmd0001
Description:           Command
Type:                  VT-UTF8
Channel GUID:          28de7392-5413-11ea-bb03-c9656a2ed613
Application Type GUID: 63d02271-8aa4-11d5-bccf-00b0d014a2d0

Press <esc><tab> for next channel.
Press <esc><tab>0 to return to the SAC channel.
Use any other key to view this channel.
  1. Enter連接到會話。

  2. 輸入此 VM 的登入憑證登入會話,然後在C:\Windows\system32目錄中開啟 EMS 控制台。在 EMS 控制台中鍵入help可用指令的清單。

連結:

相關內容