This document explains how to create future reservation requests in Capacity Planner based on the usage of your Compute Engine resources. To learn more about future reservation requests, see About future reservation requests in the Compute Engine documentation.
You can create future reservation requests based on the actual or forecasted usage of the following Compute Engine resources:
Virtual machine (VM) instances
GPUs
Creating future reservation requests helps ensure your project, folder, or organization has the capacity needed to support increases in usage, as well as prevent potential downtime or performance issues.
Before you begin
If you can't access Capacity Planner in the Google Cloud console, then your organization might not be eligible to access and use Capacity Planner. To request access, contact your Technical Account Manager (TAM) or the Sales team.
If you want to create shared future reservation requests, then ensure that the project in which to create a shared request (the owner project) is allowed to create and modify shared reservations. For details, see Allow and restrict projects from creating and modifying shared reservations.
Verify that you have sufficient quota for the resources that you want to reserve. To learn how to check your quota, see Allocation quotas.
Required roles
To get the permissions that you need to create future reservation requests, ask your administrator to grant you the following IAM roles:
-
To access and view Capacity Planner:
Capacity Planner Viewer (
roles/capacityplanner.viewer
) on the project, folder, or organization -
To create future reservation requests:
Compute Future Reservation User (
roles/compute.futureReservationUser
) on the owner project
For more information about granting roles, see Manage access to projects, folders, and organizations.
These predefined roles contain the permissions required to create future reservation requests. To see the exact permissions that are required, expand the Required permissions section:
Required permissions
The following permissions are required to create future reservation requests:
-
To create future reservation requests:
compute.futureReservations.create
on the owner project -
To let Compute Engine auto-create reservations:
compute.reservations.create
on the owner project -
To view the forecasted usage of your VMs or GPUs:
capacityplanner.forecasts.list
on the project, folder, or organization -
To view the actual usage of your VMs or GPUs:
capacityplanner.usageHistories.list
on the project, folder, or organization -
To summarize the actual usage of your VMs or GPUs:
capacityplanner.usageHistories.summarize
on the project, folder, or organization
You might also be able to get these permissions with custom roles or other predefined roles.
Limitations
Creating future reservation requests in Capacity Planner has the following limitations:
You can only create future reservation requests by specifying properties directly.
You can only specify a reservation period as follows:
The start and end times can only specify a time offset from Coordinated Universal Time (UTC) of
+00:00
.The end time can't be more than six months from the current date. To specify an end time further in the future, you must modify the future reservation request after creating it, or manually edit the generated gcloud CLI commands before running them.
Overview
To reserve capacity by creating future reservation requests in Capacity Planner, complete the following steps:
Choose the creation method. Choose one of the following methods based on how many machine types you want to reserve capacity for at once, and whether you want to edit a future reservation request before creating it:
Recommended: Generate gcloud CLI commands
This method is useful for creating one or more future reservation requests simultaneously for various machine types. After configuring the requests in the Google Cloud console, the Google Cloud console generates the gcloud CLI commands to create them. Before running the commands, you can optionally edit their fields according to your needs; for example, to specify a recommended start time or minimum duration for the reservation period.
Use the Google Cloud console
This method is useful for creating a single future reservation request for one machine type. Use the Google Cloud console to configure and create the request. You can only modify the request after creating a draft of it.
Select Compute Engine resources. Select the VMs or GPUs, along with their actual and forecasted usage data, that you want to use to create your future reservation requests.
For instructions, see Select the Compute Engine resources in this document.
Create future reservation requests. After you select the Compute Engine resources, create a future reservation request using the Google Cloud console for a single machine type, or generate gcloud CLI commands to create future reservation requests for multiple machine types at once.
For instructions, see Create future reservation requests in this document.
Select the Compute Engine resources
To select the Compute Engine resources to create future reservation requests for, do the following:
In the Google Cloud console, go to the Capacity planner page.
Optional: To change project, folder, or organization, in the project picker at the top of the page, select a project, folder, or organization.
Select one of the following Compute Engine resources:
To reserve capacity based on the usage of your VMs, do the following:
Click the Virtual machine tab.
For Machine family, select one of the following options:
To select a single machine family, select one of the available machine families.
To select all machine families, select All.
To reserve capacity based on the usage of your GPUs, do the following:
Click the GPU tab.
For GPU type, select one of the following options:
To select a single GPU type, select one of the available GPU types.
To select all GPU types, select All.
For Location, select a region or zone.
For Usage percentile, select a VM usage data percentile.
For Forecast prediction interval, select a prediction interval.
In the Usage and forecast by machine types table, do the following:
For Usage month, select the month for the start of your future reservation requests.
For Forecast start date, select the start date of your forecast. This date defaults to the first day of the next calendar month and determines the start time of your future reservation requests.
For Forecast end date, select the end date of your forecast. This date defaults to the last day of the next calendar month and determines the end time of your future reservation requests.
Create future reservation requests
After you select a Compute Engine resource and its usage data in the previous section using the Google Cloud console, you can create future reservation requests for one or more machine types by completing the following steps:
Specify the request name, name prefix, and auto-delete option
If you're creating multiple future reservation requests at once by generating gcloud CLI commands, then the following properties will have matching values across all requests:
Auto-delete option
Name prefix
Reservation period
You can optionally customize these values for individual requests by editing the generated gcloud CLI commands.
To create future reservation requests for multiple machine types at once, select the gcloud CLI. For individual machine types, select one of the following options:
Console
In the Usage and forecast by machine types table, select the machine type that you want to create a future reservation request for, and then click
Create future reservation.The Create future reservations pane opens.
For Name, enter a name for the future reservation request.
For Name prefix, enter a name prefix. The names of the auto-created reservations for this request will start with this prefix.
For Start time, enter the start time for the reservation period with no UTC offset. The default value is midnight (
00:00
).For End time, enter the end time for the reservation period with no UTC offset. The default value is midnight (
00:00
).In the Auto-generated reservations auto-delete section, do one of the following:
To automatically delete the auto-created reservations after the reservation period ends, regardless if they're fully consumed or not, do the following:
Click the Enable auto-delete to the on position, if it isn't already.
For Auto-delete time, specify a date and time time with no UTC offset when Compute Engine can automatically delete the auto-created reservations.
To prevent the auto-created reservations from being deleted after the reservation period ends, click the Enable auto-delete to the off position.
Click Continue.
gcloud
In the Usage and forecast by machine types table, select the machine types that you want to create a future reservation request for, and then click
Generate future reservation gcloud commands.The Create future reservations pane opens.
For Name, enter a name for the future reservation requests. If you create more than one request, then Capacity Planner names the requests as NAME-1, NAME-2, continuing up to the number of requests that you're creating.
For Name prefix, enter a name prefix. The names of the auto-created reservations for this request will start with this prefix.
For Start time, enter the start time for the reservation period with no UTC offset. The default value is midnight (
00:00
).For End time, enter the end time for the reservation period with no UTC offset. The default value is midnight (
00:00
).In the Auto-generated reservations auto-delete section, do one of the following:
To automatically delete the auto-created reservations after the reservation period ends, regardless if they're fully consumed or not, do the following:
Click the Enable auto-delete to the on position, if it isn't already.
For Auto-delete time, specify a date and time time with no UTC offset when Compute Engine can automatically delete the auto-created reservations.
To prevent the auto-created reservations from being deleted after the reservation period ends, click the Enable auto-delete to the off position.
Click Continue.
Specify the number of VMs to reserve
To specify the number of VMs to reserve, do the following:
For VM count based on, select one of the following options:
For upper bound usage, select Upper bound - P75 forecast.
For median usage, select Median - P50 forecast.
For lower bound usage, select Lower bound - P25 forecast.
For the average
NTH
percentile usage, select AverageNTH
percentile usage.Where
NTH
is the 50th, 75th, or 99th percentile usage you selected in the previous section.
For Operator, select whether to increase or decrease the calculated usage value:
To increase the selected usage value, select (+) Increase.
To decrease the selected usage value, select (-) Decrease.
For Value percentage, enter the percentage to increase or decrease the calculated usage. This affects the total number of VMs to reserve.
Optional: For Total VM count, adjust the number of VMs to reserve.
Optional: For Min CPU Platform and Local SSD interface based on historical usage percentage, specify a minimum CPU platform and Local SSD disk interface. The default is based on the highest percentage of usage in the past 30 days.
Click Continue.
Specify the share type
To specify the share type for your future reservation requests, select the same option that you used in the previous sections:
Console
For Owner project, specify the owner project.
To specify the share type for the request, do one of the following:
To share a request across multiple projects, do the following:
For Share type, select Project.
For Share with, enter or select the projects to share the request with.
To create a single-project request, for Share type, select Local.
gcloud
Specify the Owner project for each request.
To specify the share type for each request, do one of the following:
To share a request across multiple projects, do the following:
For Share type, select Project.
For Share with, enter or select the projects to share the request with.
To create a single-project request, for Share type, select Local.
Create draft requests and submit them
After completing the steps in the previous sections, you can either create draft future reservation requests and submit them later, or immediately submit the requests for review. Google recommends creating a draft request first. This lets you determine the number of VMs that Compute Engine will provision for your request, and optionally modify the request before submitting it.
To create draft future reservation requests and submit them for review, select the same option that you used in the previous sections:
Console
Click Save a draft.
The Capacity Planner page opens. Creating the draft request can take up to a minute to complete.
To submit the draft request for review, do one of the following:
To change one or more properties before submitting, modify the draft request.
Otherwise, submit the request for review.
gcloud
Click Generate gcloud commands.
In the Generate gcloud commands for future reservations pane, do the following:
Optional: Edit the generated gcloud CLI commands.
Copy and store the generated gcloud CLI commands. You need them later to create the future reservation requests.
In the Cloud Shell or a command line of your choice, run the commands that you stored in the previous step.
For example, the output for creating two future reservation requests is similar to the following:
Created [https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-c/futureReservations/example-fr-1]. Created [https://www.googleapis.com/compute/beta/projects/example-project/zones/us-central1-f/futureReservations/example-fr-2].
To submit the draft request for review, do one of the following:
To change one or more properties before submitting, modify the draft request.
Otherwise, submit the request for review.
What's next
Learn how to view future reservation requests.
Learn how to consume the automatically created reservations that Compute Engine provisions for a future reservation.
Learn how to cancel or delete future reservation requests.