Create a runtime

This page shows you how to create, start, and delete a runtimein Colab Enterprise.

You can create a runtime to run code on a runtime that has adifferent configuration than the default. Runtimes are created based on aruntime template, which includes specifications like machine typeand disk size.

To learn more about runtimes, seeRuntimes and runtime templates.

Before you begin

  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.

    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 theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

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

  4. Enable the Vertex AI, Dataform, and Compute Engine APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the APIs

  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 theresourcemanager.projects.create permission.Learn how to grant roles.
    Note: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.

    Go to project selector

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

  7. Enable the Vertex AI, Dataform, and Compute Engine APIs.

    Roles required to enable APIs

    To enable APIs, you need the Service Usage Admin IAM role (roles/serviceusage.serviceUsageAdmin), which contains theserviceusage.services.enable permission.Learn how to grant roles.

    Enable the APIs

Required roles

To get the permissions that you need to create a runtime in Colab Enterprise, ask your administrator to grant you the Colab Enterprise Admin (roles/aiplatform.colabEnterpriseAdmin) IAM role on the project. For more information about granting roles, seeManage access to projects, folders, and organizations.

You might also be able to get the required permissions throughcustom roles or otherpredefined roles.

One or more of the required roles includes thedataform.repositories.list permission. Users who are granted thedataform.repositories.list permission or theCode Creator (roles/dataform.codeCreator) role in a project can list the names of code assets in that project by using the Dataform API or the Dataform command-line interface (CLI). Non-administrators using BigQuery Studio can only see code assets that they created or that were shared with them.

Create a runtime

To create a runtime, you can use the Google Cloud console, the Google Cloud CLI,or Terraform.

Console

To create a runtime:

  1. In the Google Cloud console, go to the Colab EnterpriseRuntimes page.

    Go to Runtimes

  2. In theRegion menu, select the region where you want your runtime. It must be in the same region as the notebook that uses it.

  3. Click Create.

    TheCreate Vertex AI runtime dialog appears.

  4. In theRuntime template menu, select a runtime template. If there aren't any runtime templates listed,create a runtime template.

  5. In theRuntime name field, enter a name for your runtime.

  6. ClickCreate.

By default, when you create a runtime, you automatically have the required permissions to start and delete that runtime.

gcloud

Before using any of the command data below, make the following replacements:

  • DISPLAY_NAME: the display name for your runtime.
  • RUNTIME_TEMPLATE_ID: the ID of the runtime template. The runtime template specifies your runtime's compute configuration.
  • PROJECT_ID: your project ID.
  • REGION: the region where you want your runtime.

Execute the following command:

Linux, macOS, or Cloud Shell

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudcolabruntimescreate--display-name="DISPLAY_NAME"\--runtime-template=RUNTIME_TEMPLATE_ID\--project=PROJECT_ID\--region=REGION

Windows (PowerShell)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudcolabruntimescreate--display-name="DISPLAY_NAME"`--runtime-template=RUNTIME_TEMPLATE_ID`--project=PROJECT_ID`--region=REGION

Windows (cmd.exe)

Note: Ensure you have initialized the Google Cloud CLI with authentication and a project by running eithergcloud init; orgcloud auth login andgcloud config set project.
gcloudcolabruntimescreate--display-name="DISPLAY_NAME"^--runtime-template=RUNTIME_TEMPLATE_ID^--project=PROJECT_ID^--region=REGION

By default, when you create a runtime, you automatically have therequired permissions to start and delete that runtime.

For more information about the command for creating aruntime template from the command line, see thegcloud CLIdocumentation.

Terraform

To learn how to apply or remove a Terraform configuration, seeBasic Terraform commands. For more information, see theTerraform provider reference documentation.

The following sample uses thegoogle_colab_runtime Terraform resource to create a Colab Enterprise runtime.

resource"google_colab_runtime_template""my_template"{name="{{index $.Vars "runtime_name"}}"display_name="Runtime template full"location="us-central1"description="Full runtime template"machine_spec{machine_type="n1-standard-2"accelerator_type="NVIDIA_TESLA_T4"accelerator_count="1"}data_persistent_disk_spec{disk_type="pd-standard"disk_size_gb=200}network_spec{enable_internet_access=true}labels={k="val"}idle_shutdown_config{idle_timeout="3600s"}euc_config{euc_disabled=true}shielded_vm_config{enable_secure_boot=true}network_tags=["abc", "def"]encryption_spec{kms_key_name="{{index $.Vars "key_name"}}"}}resource"google_colab_runtime" "{{$.PrimaryResourceId}}"{name="{{index $.Vars "runtime_name"}}"location="us-central1"notebook_runtime_template_ref{notebook_runtime_template=google_colab_runtime_template.my_template.id}display_name="Runtime full"runtime_user="gterraformtestuser@gmail.com"description="Full runtime"desired_state="ACTIVE"auto_upgrade=truedepends_on=[google_colab_runtime_template.my_template]}

Troubleshoot

This section shows you how to resolve issues with creating runtimesin Colab Enterprise.

Unable to create a runtime

This issue occurs when you're unable to create a runtime. See alsoUnable to create a defaultruntime.The most common causes are:

Insufficient quota

If you are unable to create a runtime, you might have exceeded your Compute Engine runtime quota.

Colab Enterprise uses Compute Engine quota for runtimes. For more information, see theCompute Engine quota and limits overview.

To resolve this issue,Request a quota adjustment.

Unavailable resources

The following error occurs when you try to create a runtime.

No available zone found for runtimeRUNTIME_IDfor machine typeMACHINE_TYPEwith accelerator type:ACCELERATOR. Please try again later.

This error occurs if there are no resources available for your machine type configuration within your notebook's region.

To resolve this issue, try any of the following:

  • Create a runtime in a different region.
  • Create a runtime template with a different machine type configuration, and then create a runtime based on the new runtime template.

Default runtime already exists

The following error occurs when you try to create a runtime from the default runtime template when the default runtime already exists.

Failed to create runtimeOne click runtime already exists.

If you try to create a runtime from a default runtime template, Colab Enterprise tries to create a default runtime. There can only be one default runtime per user, project, and region. If the default runtime already exists, Colab Enterprise is unable to create another default runtime.

To resolve this issue, connect to the existing default runtime or create a runtime from a non-default runtime template.

Unable to create a default runtime

When Colab Enterprise creates a default runtime, it first creates a default runtime template that it uses to generate the default runtime. If you try to create a default runtime without the permissions required to create a runtime template, then Colab Enterprise can't create the default runtime.

To resolve this issue, ask your administrator to grant you a role that includes theaiplatform.notebookRuntimeTemplates.create permission.

What's next

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.