Use reservations

To ensure that VM resources are available when your Colab Enterprise runtimes need them, you can use Compute Engine reservations. Reservations provide a high level of assurance in obtaining capacity for Compute Engine zonal resources.

Overview

To use a reservation with Colab Enterprise, you perform the following tasks:

  1. Create a reservation.

  2. Add your reservation to a new runtime template.

  3. Use the reservation by running code on a runtime derived from your runtime template.

Limitations and requirements

All limitations of Compute Engine reservations apply when Colab Enterprise runtimes consume reservations. See How reservations work.

In addition, when using reservations with Colab Enterprise, the following limitations and requirements apply:

  • Reservations for Colab Enterprise is in private preview. To request access, see the access request page.

  • Committed use discounts don't apply.

  • Your reservation must be in the same project as your Colab Enterprise notebook and runtime.

  • Your reservation's machine type must match the machine type of your runtime template.

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.

    Go to project selector

  3. Make sure that billing is enabled for your Google Cloud project.

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

    Enable the APIs

  5. In the Google Cloud console, on the project selector page, select or create a Google Cloud project.

    Go to project selector

  6. Make sure that billing is enabled for your Google Cloud project.

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

    Enable the APIs

Required roles

To ensure that your user account has the necessary permissions to use reservations with Colab Enterprise, ask your administrator to grant your user account the following IAM roles on the project:

For more information about granting roles, see Manage access.

Your administrator might also be able to give your user account the required permissions through custom roles or other predefined roles.

Create a reservation

Create a Compute Engine reservation. It can be a single-project reservation or a shared reservation. For more information, see the following documents:

The reservation can include GPU accelerators.

Add your reservation to a new runtime template

To create a runtime template that uses your reservation, do the following:
  1. In the Google Cloud console, go to the Colab Enterprise Runtime Templates page.

    Go to Runtime templates

  2. Click  New template.

    The Create new runtime template dialog appears.

  3. In the Runtime basics section, enter a Display name.

  4. In the Region menu, select the region where you want your runtime template.

  5. In the Configure compute section, in the Machine type menu, select a machine type. The runtime template's machine type must match your reservation's machine type.

  6. In the Reservations menu, select the specific reservation that you want to use or select Use automatically selected reservations.

    For more information about consuming automatically selected or specifically targeted reservations, see the Consumption type section of How reservations work.

  7. Complete the rest of the dialog, and then click Create.

    Your runtime template appears in the list on the Runtime templates tab.

Use your reservation

To use your reservation, do the following:

  1. Create a runtime from your new runtime template.

  2. Open or create a notebook.

  3. In your notebook, connect to the runtime, and run code.

Stop using your reservation

To stop using your reservation, you can delete your reservation.

If you want to continue using your reservation with other resources, but don't want your Colab Enterprise notebooks to use it, delete the runtime and runtime template that are associated with your reservation.

Billing

Reserved Compute Engine VM resources are billed by Colab Enterprise while the Colab Enterprise runtime is running, and are billed by Compute Engine when the VM resources aren't being used by Colab Enterprise.

Troubleshoot

This section shows you how to resolve issues when using reservations with Colab Enterprise.

Unable to create a runtime

An error similar to the following occurs when you try to create a runtime.

Failed to create notebook runtime with error: Invalid value for field
'resource.reservationAffinity': '{"consumeReservationType":
"SPECIFIC_ALLOCATION", "key": "compute.googleapis.com/reservation-name...'.
No available resources in specified reservations.

This error occurs when the machine types of your runtime template and reservation don't match.

To resolve this issue, create a runtime template with a machine type that matches the reservation's machine type.

What's next