在 Compute Engine 中建立 Windows Server VM 執行個體

瞭解如何使用Google Cloud 控制台建立 Windows Server 虛擬機器 (VM) 執行個體。


如要直接在 Google Cloud 控制台中,按照這項工作的逐步指南操作,請按一下「Guide me」(逐步引導)

逐步引導


定價

  • Windows Server 映像檔為付費映像檔,使用時會產生額外費用

  • 免費試用方案不含 Windows Server VM。

事前準備

  1. 登入 Google Cloud 帳戶。如果您是 Google Cloud新手,歡迎 建立帳戶,親自評估產品在實際工作環境中的成效。新客戶還能獲得價值 $300 美元的免費抵免額,可用於執行、測試及部署工作負載。
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  3. Verify that billing is enabled for your Google Cloud project.

  4. Make sure that you have the following role or roles on the project: Compute Instance Admin (v1), Compute Security Admin, Service Account User, Service Usage Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Roles required to select or create a project

    • Select a project: Selecting a project doesn't require a specific IAM role—you can select any project that you've been granted a role on.
    • Create a project: To create a project, you need the Project Creator role (roles/resourcemanager.projectCreator), which contains the resourcemanager.projects.create permission. Learn how to grant roles.

    Go to project selector

  6. Verify that billing is enabled for your Google Cloud project.

  7. Make sure that you have the following role or roles on the project: Compute Instance Admin (v1), Compute Security Admin, Service Account User, Service Usage Admin

    Check for the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. In the Principal column, find all rows that identify you or a group that you're included in. To learn which groups you're included in, contact your administrator.

    4. For all rows that specify or include you, check the Role column to see whether the list of roles includes the required roles.

    Grant the roles

    1. In the Google Cloud console, go to the IAM page.

      Go to IAM
    2. Select the project.
    3. Click Grant access.
    4. In the New principals field, enter your user identifier. This is typically the email address for a Google Account.

    5. Click Select a role, then search for the role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  8. 啟用 Compute Engine API。

    啟用 Compute Engine API

  9. 如果您的本機電腦並非使用 Windows,請安裝遠端桌面協定用戶端,例如 Chrome 遠端桌面

建立 Windows Server VM 執行個體

  1. 前往 Google Cloud 控制台的「Create an instance」(建立執行個體)頁面。

    前往「建立執行個體」

  2. 在「OS 和儲存空間」部分中,按一下「變更」,即可開始設定開機磁碟。
  3. 在「Public images」(公開映像檔) 分頁中,從「Operating system」(作業系統) 清單選擇「Windows Server」
  4. 從「Version」(版本) 清單中選擇「Windows Server 2019 Datacenter」
  5. 按一下「Select」(選取)
  6. 在「Firewall」(防火牆) 區段中,選取「Allow HTTP traffic」(允許 HTTP 流量)
  7. 按一下「Create」(建立),即可建立 VM。

啟動 VM 執行個體須花費一些時間。VM 執行個體準備就緒時,就會列在「VM instances」(VM 執行個體) 頁面中,並顯示綠色的狀態圖示。

連線至 VM 執行個體

  1. 前往 Google Cloud 控制台的「VM instances」(VM 執行個體) 頁面

    前往 VM 執行個體

  2. 在「Name」(名稱) 欄下方,按一下 VM 執行個體名稱。

  3. 在「遠端存取」部分下方,按一下「設定 Windows 密碼」

  4. 指定使用者名稱,然後點選「Set」(設定),即可產生此 Windows Server VM 的新密碼。請儲存使用者名稱與密碼,以便登入 VM。

  5. 在 VM 上安裝 Chrome 遠端桌面服務

  6. 使用您選擇的圖形指令列工具連線至 VM 執行個體。

清除所用資源

為了避免系統向您的 Google Cloud 帳戶收取本頁面所用資源的費用,請按照下列步驟操作。

  1. 前往 Google Cloud 控制台的「VM instances」(VM 執行個體) 頁面

    前往 VM 執行個體

  2. 按一下您建立的 VM 執行個體名稱。

  3. 在 VM 執行個體詳細資料頁面的頂端,按一下「刪除」

後續步驟