在 Compute Engine 中创建 Windows Server 虚拟机实例

了解如何使用Google Cloud 控制台创建 Windows Server 虚拟机 (VM) 实例。


如需在 Google Cloud 控制台中直接遵循有关此任务的分步指导,请点击操作演示

操作演示


价格

准备工作

  1. Sign in to your Google Cloud account. If you're new to Google Cloud, create an account to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.
  2. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    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.

      前往 IAM
    2. 选择项目。
    3. 点击 授予访问权限
    4. 新的主账号字段中,输入您的用户标识符。 这通常是 Google 账号的电子邮件地址。

    5. 选择角色列表中,选择一个角色。
    6. 如需授予其他角色,请点击 添加其他角色,然后添加其他各个角色。
    7. 点击 Save(保存)。
  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    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.

      前往 IAM
    2. 选择项目。
    3. 点击 授予访问权限
    4. 新的主账号字段中,输入您的用户标识符。 这通常是 Google 账号的电子邮件地址。

    5. 选择角色列表中,选择一个角色。
    6. 如需授予其他角色,请点击 添加其他角色,然后添加其他各个角色。
    7. 点击 Save(保存)。
  8. 启用 Compute Engine API。

    启用 Compute Engine API

  9. 如果您在本地机器上使用的不是 Windows,请安装一个 RDP 客户端,例如 Chrome 远程桌面

创建 Windows Server 虚拟机实例

  1. In the Google Cloud console, go to the Create an instance page.

    Go to Create an instance

  2. In the Boot disk section, click Change to begin configuring your boot disk.
  3. Public images 标签页上,从操作系统列表中选择 Windows Server
  4. 版本列表中选择 Windows Server 2019 Datacenter
  5. 点击选择
  6. 防火墙部分,选择 允许 HTTP 流量
  7. 如需创建虚拟机,请点击创建

虚拟机实例启动会需要一些时间,请稍等片刻。准备就绪后,虚拟机实例会列在虚拟机实例页面上,并带有绿色状态图标。

连接到虚拟机实例

  1. 在 Google Cloud 控制台中,前往虚拟机实例页面。

    转到虚拟机实例

  2. 名称列下,点击您的虚拟机实例的名称。

  3. 远程访问部分下,点击设置 Windows 密码

  4. 指定用户名,然后点击设置为此 Windows Server 虚拟机生成一个新密码。保存用户名和密码,以便您登录此虚拟机。

  5. 在虚拟机上安装 Chrome 远程桌面服务

  6. 使用您选择的图形命令行工具连接到您的虚拟机实例。

清理

为避免因本页中使用的资源导致您的 Google Cloud 账号产生费用,请按照以下步骤操作。

  1. 在 Google Cloud 控制台中,前往虚拟机实例页面。

    转到虚拟机实例

  2. 点击您创建的虚拟机实例的名称。

  3. 在虚拟机实例的详情页面顶部,点击删除

后续步骤