Create a Linux VM instance in Compute Engine

Learn how to create a Linux virtual machine (VM) instance in Compute Engine using the Trusted Cloud console.

Before you begin

  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.

      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 identifier for a user in a workforce identity pool. For details, see Represent workforce pool users in IAM policies, or contact your administrator.

    5. In the Select a role list, select a role.
    6. To grant additional roles, click Add another role and add each additional role.
    7. Click Save.
  4. Enable the Compute Engine API.

    Enable the Compute Engine API

Create a Linux VM instance

  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. On the Public images tab, choose Ubuntu from the Operating system list.
  4. Choose Ubuntu 24.04 LTS from the Version list.
  5. Click Select.
  6. In the Firewall section, select Allow HTTP traffic.
  7. To create the VM, click Create.

Allow a short period of time for the VM instance to start. After the VM instance is ready, it's listed on the VM instances page with a green status icon.

Compute Engine grants the user who creates the VM instance with the roles/compute.instanceAdmin role. Compute Engine also adds that user to the sudo group.

Connect to the VM instance

Connect to a VM instance by using the Trusted Cloud console and completing the following steps. You're connected to the VM instance as the user you used to access the VM instances page.

  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.

Clean up

To avoid incurring charges to your Trusted Cloud account for the resources used on this page, follow these steps.

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

    Go to VM instances

  2. Select the row containing the VM instance that you've created in this tutorial.

  3. Click Delete, and then click Delete to confirm.

What's next