Linux Windows
This page explains how to create or update a virtual machine (VM) instance to use a minimum CPU platform instead of the default platform.
Google data centers offer different generations of CPU processors. Each CPU platform supports incremental features like Advanced Vector Extensions—for example, AVX2 and AVX-512. Also, some fundamental systems-related features like clock speed and memory access seek time can vary among CPU platforms.
Each machine series is associated with one or more CPU platforms. For example, N2 VMs can run on either the Ice Lake or Cascade Lake CPUs. If there are multiple CPU platforms available for a machine series, then you can select a minimum CPU platform when creating a VM using a machine type from that machine series. The availability of the machine family, series, region, and zones determine what you can choose for the minimum CPU platform.
Specifying a minimum CPU platform is useful if your workload requires the performance gains offered by the generation of a specific processor. However, specifying a minimum CPU platform might limit the zones where you can create your VMs.
Before you beginSelect the tab for how you plan to use the samples on this page:
ConsoleWhen you use the Google Cloud console to access Google Cloud services and APIs, you don't need to set up authentication.
gcloudInstall the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
Note: If you installed the gcloud CLI previously, make sure you have the latest version by runninggcloud components update
.To use the REST API samples on this page in a local development environment, you use the credentials you provide to the gcloud CLI.
Install the Google Cloud CLI. After installation, initialize the Google Cloud CLI by running the following command:
gcloud init
If you're using an external identity provider (IdP), you must first sign in to the gcloud CLI with your federated identity.
For more information, see Authenticate for using REST in the Google Cloud authentication documentation.
To get the permissions that you need to change the minimum CPU platform, ask your administrator to grant you the following IAM roles on the project:
roles/compute.instanceAdmin.v1
)roles/iam.serviceAccountUser
role)For more information about granting roles, see Manage access to projects, folders, and organizations.
You might also be able to get the required permissions through custom roles or other predefined roles.
When to select a minimum CPU platformMore than likely, you don't need to select a minimum CPU platform. Each Compute Engine zone has a default CPU platform for each machine series. Google occasionally changes a zone's default CPU when new servers are added. If you don't specify a minimum CPU platform for a VM, then the VM gets the default CPU platform associated with its machine type and zone.
Google recommends that you only select a minimum CPU platform in the following cases:
Selecting a minimum CPU platform for your VM introduces constraints that affect your ability to start VMs in zones where some CPU platforms are in limited supply.
How selecting a minimum CPU platform worksCompute Engine always uses the minimum CPU platform where available. If Google changes a CPU platform in a zone, your VM can continue to run on a more recent CPU platform that's available in that zone if you stop and restart the VM.
After you select a minimum CPU platform for a VM, your VM uses this CPU platform unless you stop the VM and change the CPU platform. During a live migration, your VM retains the selected CPU platform.
Limitationse2-micro
e2-small
e2-medium
f1-micro
g1-small
The availability of CPU platforms varies across zones and is based on the hardware and machine series that is available in each zone. The following list shows the supported minimum CPU platforms and the valid syntax for each platform:
"Intel Emerald Rapids"
"Intel Sapphire Rapids"
"Intel Ice Lake"
"Intel Cascade Lake"
"Intel Skylake"
"Intel Broadwell"
"Intel Haswell"
"Intel Ivy Bridge"
"Intel Sandy Bridge"
"AMD Genoa"
"AMD Milan"
"AMD Rome"
Only certain regions and zones contain multiple CPU platforms for the same machine series and are available for minimum CPU platform selection. You can view a list of supported platforms for a specific zone by using the gcloud CLI or REST.
If you're using sole-tenant nodes, each node uses the CPU platform corresponding to the node type that you defined in the node template.
gcloudTo view the CPU platforms that are available in your zone, use the gcloud compute zones describe
command:
gcloud compute zones describe ZONE
Replace ZONE
with the name of the zone to check for available CPU platforms—for example, europe-west10-a
.
The following output from this command lists CPU platforms for the europe-west10-a
zone:
gcloud compute zones describe europe-west10-a availableCpuPlatforms: - Intel Broadwell - Intel Cascade Lake - Intel Ice Lake - AMD Milan - AMD Rome - Intel Skylake ...
Make a GET
request to the zone that you're considering:
GET https://compute.googleapis.com/compute/v1/projects/myproject/zones/ZONE
Replace ZONE
with the name of the zone to check for available CPU platforms.
The following output from this command lists supported CPU platforms for a zone:
{ "kind": "compute#zone", "id": "2210", "creationTimestamp": "1969-12-31T09:30:55.189-07:00", "name": "europe-west10-a", "description": "europe-west10-a", "status": "UP", "region": "https://www.googleapis.com/compute/v1/projects/myproject/regions/europe-west10-a", "selfLink": "https://www.googleapis.com/compute/v1/projects/myproject/zones/europe-west10-a", "availableCpuPlatforms": [ "Intel Broadwell", "Intel Cascade Lake", "Intel Ice Lake", "AMD Milan", "AMD Rome", "Intel Skylake" ], "supportsPzs": true }
Occasionally, Google changes a CPU platform or updates the default CPU platform. As a zone grows in capacity—Google proactively switches to a newer CPU platform as the platform becomes available. It updates the default CPU platform to the next newest one that's available in that zone.
When a default CPU platform for a zone changes, Google notifies affected customers with a detailed timeline and specific instructions to transition to the newer platform.
VMs never use a platform that's older than the minimum CPU platform that you specify. If Compute Engine transitions your VM to a more recent platform, the cost of the VM doesn't change.
Select a minimum CPU platform for a new VMWhen you create a VM, you choose a machine series and machine type. The machine series might be offered on more than one CPU platform. In this case, you can specify the minimum CPU platform that you want the VM to use.
ConsoleIn the Google Cloud console, go to the Create an instance page.
In the Machine configuration section, expand the Advanced configurations section.
In the CPU Platform list, select a platform for the VM's CPU.
Continue with the rest of the VM creation process.
To create a new VM that uses a minimum CPU platform, use the gcloud compute instances create
command and provide the --min-cpu-platform
flag:
gcloud compute instances create INSTANCE \ --zone=ZONE \ --min-cpu-platform="PLATFORM"
Replace the following:
INSTANCE
: the name of the instance that you want to createZONE
: the name of the zone where you want to create your instance—for example, europe-west1-b
PLATFORM
: the friendly name of the minimum CPU platform that you want the instance to use—for example, Intel Sandy Bridge
If you want to clear the minimum CPU platform specification, replace PLATFORM
with AUTOMATIC
.
To check which CPU platforms are available in a zone, see View available CPU platforms by zone.
Use the instances.insert
method and include the minCpuPlatform
property as part of the request body.
For example, a request body might look like this:
"name": "INSTANCE", "machineType": "zones/ZONE/machineTypes/MACHINE_TYPE", "minCpuPlatform": "PLATFORM", "networkInterfaces": [{ "accessConfigs": [{ "type": "ONE_TO_ONE_NAT", "name": "External NAT" }], "network": "global/networks/default" }], "disks": [{ "autoDelete": "true", "boot": "true", "type": "PERSISTENT", "initializeParams": { "sourceImage": "projects/IMAGE_PROJECT/global/images/family/IMAGE_FAMILY" } }]
Replace the following:
INSTANCE
: the name of the new VMZONE
: the name of the zone where you want to create your VM—for example, europe-west1-b
MACHINE_TYPE
: the machine type of the new VMPLATFORM
: the friendly name of the minimum CPU platform that you want the VM to use—for example, Intel Ivy Bridge
To clear the minimum CPU platform specification, replace PLATFORM
with AUTOMATIC
.
To check which CPU platforms are available in a zone, see View available CPU platforms by zone.
IMAGE_PROJECT
: the image project of the image family
IMAGE_FAMILY
: the image family of the image to use to create the VM
You can set a minimum CPU platform for an existing VM. You must stop the VM, before you set the minimum CPU platform.
ConsoleGo to the VM instances page.
If prompted, select your project and click Continue.
Select the VM that you want to change.
Click stop Stop to stop the VM. If there is no Stop option, click more_vert More actions > stop Stop.
Click Edit.
In the Machine configuration section, click Advanced configurations.
From the CPU Platform drop-down menu, select an option.
Save your changes.
Select the VM that you changed.
Click Start/Resume.
To stop a VM, use the gcloud compute instances stop
command:
gcloud compute instances stop INSTANCE
Replace INSTANCE
with the name of the VM that you want to specify a minimum CPU platform for.
To specify a minimum CPU platform, use the gcloud compute instances update
command, and provide the --min-cpu-platform
flag:
gcloud compute instances update INSTANCE \ --min-cpu-platform="PLATFORM"
Replace PLATFORM
with the friendly name of the minimum CPU platform that you want the VM to use—for example, Intel Cascade Lake
.
To start the updated VM, use the gcloud compute instances start
command:
gcloud compute instances start INSTANCE
To stop a VM, construct a POST
request using the instances.stop
method:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE/stop
Replace the following:
PROJECT_ID
: the ID of the projectZONE
: the zone where your VM is locatedINSTANCE
: the name of the VM that you want to specify a minimum CPU platform forTo set the minimum CPU platform, construct a POST
request to the setMinCpuPlatform
method and set the minCpuPlatform
property in the request body:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE/setMinCpuPlatform { "minCpuPlatform": "PLATFORM" }
Replace PLATFORM
with the friendly name of the minimum CPU platform that you want the VM to use—for example, Intel Skylake
.
To restart the VM, construct a POST
request using the instances.start
method:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE/start
You can update a VM to use the default CPU platform instead of the minimum CPU platform. If the VM is running, you must stop it before you make changes.
ConsoleGo to the VM instances page.
If prompted, select your project and click Continue.
Select the VM that you want to change.
Click Stop.
To edit the VM, click Edit.
In the Machine configuration section, click Advanced configurations.
Change the CPU Platform option to Automatic.
Select the VM that you changed.
Click Start/Resume.
To stop a VM, use the gcloud compute instances stop
command:
gcloud compute instances stop INSTANCE
Replace INSTANCE
with the name of the VM that you want to change.
To reset the minimum CPU platform, use the gcloud compute instances update
command and set the --min-cpu-platform
flag to AUTOMATIC
:
gcloud compute instances update INSTANCE \ --min-cpu-platform="AUTOMATIC"
To start the updated VM, use the gcloud compute instances start
command:
gcloud compute instances start INSTANCE
To stop a VM, construct a POST
request using the instances.stop
method:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE/stop
Replace the following:
PROJECT_ID
: the ID of the projectZONE
: the zone where your VM is locatedINSTANCE
: the name of the VM that you want to changeTo reset the minimum CPU platform, construct a POST
request to the setMinCpuPlatform
method. In the request body, set the minCpuPlatform
property value to AUTOMATIC
.
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE/setMinCpuPlatform { "minCpuPlatform": "AUTOMATIC" }
To restart the updated VM, construct a POST
request using the instances.start
method:
POST https://compute.googleapis.com/compute/v1/projects/PROJECT_ID/zones/ZONE/instances/INSTANCE/start
If you use managed instance groups, you can specify a minimum CPU platform for VMs within a managed instance group.
To specify a minimum CPU platform, create an instance template that includes the minCpuPlatform
property.
Go to the Instance templates page.
If prompted, select your project and click Continue.
Click Create instance template.
In the Machine configuration section, click Advanced configurations.
From the CPU Platform drop-down menu, select an option.
Continue with the instance template creation process.
When you create an instance template using the gcloud compute instance-templates create
command, provide the --min-cpu-platform
flag:
gcloud compute instance-templates create TEMPLATE_NAME \ --min-cpu-platform="PLATFORM"
Replace the following:
TEMPLATE_NAME
: the name of the instance templatePLATFORM
: the friendly name of the minimum CPU platform that you want the instance to use—for example, Intel Skylake
Add the minCpuPlatform
as part of your request to create a new instance template using the instanceTemplates.insert
method.
For example, the following instance template contains the minimum required fields for creating a new template with the addition of the minCpuPlatform
property:
{ "name": "example-template", "properties": { "machineType": "zones/us-central1-a/machineTypes/n2d-standard-2", "minCpuPlatform": "AMD Milan", "networkInterfaces": [ { "network": "global/networks/default" } ], "disks": [ { "type": "PERSISTENT", "boot": true, "mode": "READ_WRITE", "initializeParams": { "sourceImage": "projects/debian-cloud/global/images/family/debian-11" } } ] } }
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4