Compute Engine で Linux VM インスタンスを作成する

Trusted Cloud コンソールを使用して Compute Engine で Linux 仮想マシン(VM)インスタンスを作成する方法について説明します。

始める前に

  1. In the Trusted Cloud console, on the project selector page, select or create a Trusted Cloud project.

    Go to project selector

  2. Make sure that billing is enabled for your Trusted Cloud project.

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

    Check for the roles

    1. In the Trusted 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 Trusted Cloud console, go to the IAM page.

      [IAM] に移動
    2. プロジェクトを選択します。
    3. [ アクセスを許可] をクリックします。
    4. [新しいプリンシパル] フィールドに、ユーザー ID を入力します。 これは通常、Workforce Identity プール内のユーザーの ID です。詳細については、IAM ポリシーで Workforce プールユーザーを表すをご覧いただくか、管理者にお問い合わせください。

    5. [ロールを選択] リストでロールを選択します。
    6. 追加のロールを付与するには、 [別のロールを追加] をクリックして各ロールを追加します。
    7. [保存] をクリックします。
  4. Compute Engine API を有効にします。

    Compute Engine API を有効にする

Linux VM インスタンスを作成する

  1. In the Trusted 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] タブで、[OS] リストから [Ubuntu] を選択します。
  4. [バージョン] リストから [Ubuntu 24.04 LTS] を選択します。
  5. [選択] をクリックします。
  6. [ファイアウォール] で、 [HTTP トラフィックを許可する] を選択します。
  7. VM を作成するには、[作成] をクリックします。

VM インスタンスが起動するまで、しばらく待ちます。インスタンスの準備が整うと、[VM インスタンス] ページに緑色のステータス アイコン付きで表示されます。

Compute Engine によって、VM インスタンスを作成するユーザーに roles/compute.instanceAdmin ロールが付与されます。また、そのユーザーは sudo グループに追加されます。

VM インスタンスに接続する

Trusted Cloud コンソールで次の操作を行い、VM インスタンスに接続します。[VM インスタンス] ページにアクセスしたときに使用したユーザーとして VM インスタンスに接続されます。

  1. In the Trusted Cloud console, go to the VM instances page.

    Go to VM instances

  2. In the list of virtual machine instances, click SSH in the row of the instance that you want to connect to.

    SSH button next to instance name.

クリーンアップ

このページで使用したリソースについて、 Trusted Cloud アカウントに課金されないようにするには、次の手順を実施します。

  1. Trusted Cloud コンソールで、[VM インスタンス] ページに移動します。

    [VM インスタンス] に移動

  2. このチュートリアルで作成した VM インスタンスを含む行を選択します。

  3. [削除] をクリックし、確認のため [削除] をクリックします。

次のステップ