This document lists errors that you might encounter when creating or updatingVMs.
Errors when creating VMs
If you can't create a VM instance, it might be due to one of theissues that's described in this section.
Insufficient quota
A quota error occurs when a resource request exceeds your quota.
Error messages:
RESOURCE_NAME creation failed:Quota QUOTA_NAME exceeded. Limit: QUOTA_LIMIT in region REGION
RESOURCE_NAME creation failed:Quota QUOTA_NAME exceeded. Limit: QUOTA_LIMIT in zone ZONE
Resource exhausted (HTTP 429): QUOTA_EXCEEDED
Resolution: Request a higher quota limit. For more information, seeRequesting an increase in quota.
Simultaneous resource mutation or creation operations
If you update morethan one resource at a time, for example, modifying secondary ranges in asubnetwork and creating a VM at the same time, you might see a not ready
error.
Error message:
The resource 'projects/PROJECT/regions/REGION/subnetworks/default' is not ready
Resolution: To resolve this issue, try the following:
- Wait for operations to be donebefore creating new requests.
- Retry operations with exponential backoff.
- Poll operationsto check their completion status.
Resource availability
The following are examples of common resource errors that you might encounterwhen you request new Compute Engine resources or create new reservations:
ZONE_RESOURCE_POOL_EXHAUSTED
ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS
The zone 'projects/PROJECT_ID/zones/ZONE' does not have enough resources available to fulfill the request.Try a different zone, or try again later.
A VM_TYPE_AND_SIZE VM instance with RESOURCE_ATTACHMENT is currently unavailable in the ZONE zone.Capacity changes frequently, so try your request in a different zone, with a different VM hardwareconfiguration, or at a later time. For more options, see troubleshooting documentation.
A VM_TYPE_AND_SIZE VM instance with RESOURCE_ATTACHMENT is currently unavailable in the ZONE zone, because of REASON.Consider trying your request in the ZONE zone(s), which currently has capacity to accommodate your request.If you cannot move your VM to ZONE, review the REASON failure resolution instructions available in troubleshooting documentation, then try your request again.If your workload can't accommodate the suggested resolution, try your request with a different VM hardware configuration or at a later time.
To learn how to resolve resource errors, seeTroubleshooting resource availability errors.
Zone availability
If you receive a notFound
or does not exist in zone
error whenrequesting new resources, it means that the zone you are requesting the resourcein does not offer the resource or machine type that you have requested.
Error messages:
notFound
does not exist in zone
Resolution: See Regions and zones to findout which features are available in each zone.
Rate exceeded for resource type
The following error occurs when you create more than one disk or VM froma snapshot in a ten minute period.
Error message:
"code": "RESOURCE_OPERATION_RATE_EXCEEDED","message": "Operation rate exceeded for resource 'projects/project-id/zones/zone-id/disks/disk-name'.Too frequent operations from the source resource."
Resolution:
To create multiple disks from a snapshot, use the snapshot to create an imagethen create your disks from the image:
- Create an image from the snapshot.
- Create disks from the image.
For non-boot disks, follow the instructions tocreate persistent disks from the imageand use the following steps:
- In the Google Cloud console, select Image as the disk Source type.
- With the gcloud CLI, use theimage flag.
- If using REST, use thesourceImage parameter.
For more information about backing up and replicating your persistent disk data,see Data protection options.
Insufficient permissions
If you receive a permission
error when you try to create a VM, you don't havethe necessary IAM permissions to create a VM.
Error message:
Error: googleapi: Error 403: Google Compute Engine: Required 'compute.regions.get' permission for 'projects/PROJECT_ID/regions/REGION'., forbidden
Resolution: Ask your organization administrator to grant you access tocreate VMs. For more information, seeGranting access to Compute Engine resources.
Resource names
If you receive a resource already exists
error when you try to create aresource, your creation request failed because you specified a non-uniquename for the resource for the specified location and project.
Error messages:
The resource 'projects/PROJECT_NAME/zones/ZONE/RESOURCE_TYPE/RESOURCE_NAME' already exists"
The resource 'projects/PROJECT_NAME/regions/REGION/RESOURCE_TYPE/RESOURCE_NAME' already exists"
Resolution: Retry your creation request with aunique resource name.
Network interfaces
If you receive a Too many network interfaces
error when creating a VM, yourrequest exceeded the network interface limit for the VM's machine type.
Error messages:
Invalid value for field 'resource': ".Too many network interfaces. The maximum number of network interfaces allowed for this machine type is NUMBER.
Invalid value for field 'resource.networkInterfaces': ".Too many network interfaces. The maximum number of network interfaces allowed for this machine type is NUMBER.
Resolution: To learn about how the maximum number of network interfacesis calculated for different machine types, seeMaximum number of network interfaces.
Constraint violated
If you receive a Constraint violated
error when creating a VM, your requestviolated one or more organization policy constraints.
Error message:
For example, if your organization restricts Shared VPC subnetworks, youmight get the following error:
Constraint constraints/compute.CONSTRAINT violated for projects/PROJECT_ID.Using the PARAMETER projects/PROJECT_ID/regions/REGION/CONSTRAINTPROJECT_ID is not allowed.
Resolution: Contact your organization administrator.
Required CPU platform
If you receive a required CPU platform
error, the CPU platform you specified in thecreation request isn't supported by the specified machine type.
Error message:
Could not fetch resource:- The selected machine type (MACHINE_TYPE) has a required CPU platform of REQUIRED_CPU_PLATFORM.The minimum CPU platform must match this, but was SPECIFIED_CPU_PLATFORM.
Resolution:
- To learn about which CPU platform your machine type supports, reviewCPU platforms.
- Retry your request with a supported CPU platform.
Mismatched reservation properties
If you receive a No available resources in specified reservations
error whencreating a VM, the properties of the VM and thespecific reservationthat the VM is targeting for consumption aren't matching.
Error message:
Invalid value for field 'resource.reservationAffinity':- No available resources in specified reservations [RESERVATION_NAME].
Resolution: Try one of the following:
If the VM doesn't match the reservation's properties, modify the VM until itsproperties match the reservation's properties. Then, try creating the VMagain.
If the VM has the right properties, but doesn't match the reservation'sproperties, you can't change the reservation. Instead, do one of thefollowing:
When creating the VM, target a different specific reservation.
You can create a new specific reservation with matching properties if youdon't already have one with the correct properties. If you no longer needthe previous specific reservation, then you candelete it so you are nolonger paying for those reserved resources.
When creating the VM, target any matching reservation.
If there is a reservation configured for automatic consumption that hasproperties that match the VM, then the new VM consumes that reservation.Otherwise, the VM is still created, but without consuming any of yourreserved resources.
For more information, seeTest that VM properties match a reservation.
Service account access denied
The following error might appear in Cloud Audit Logs when you create VMs usinga service account:
Error message:
SERVICE_ACCOUNT_ACCESS_DENIED
Resolution:This error appears when the service account that is used to create a VMdoesn't have the Identity and Access Management role to access the new VM's service account.
Grant the roles/iam.serviceAccountUser role to the service account that is creating the VM. You can either grant this role at the project-level, which would give the service account that is creating VMs access to all service accounts created in the project, or you can grant this role only on the service account for the new VM.
Missing required permissions
The following error might occur when you try to create a VM from existing VM
Required 'compute.images.useReadOnly' permission for 'projects/PROJECT_ID/global/images/IMAGE_NAME
This error can occur for several reasons. The following is a common cause ofthis error:
You tried tocreate a new VM from an existing VMbut you don't have read-access to the existing VM's boot disk image.
To resolve this issue, contact the owner of the boot disk, and ask them toshare the existing VM's image with you.
Free Trial
If you try to create a Windows VM during aFree Trial of Google Cloud you receive anerror.
Error message:
Windows VM instances are not included with free trial. To use them first enable billing on your account.
Resolution:Windows Server images aren't included in the Free Trial.Upgrade to a paid Cloud Billing account.
VM doesn't start
If a Linux VM that uses a startup script doesn't start after it was created, itmight be related to an issue connecting to the metadata server.
This issue can last for up to seven minutes due to a transient network issuethat resolves on its own. If the issue does not resolve itself afterseven minutes, recreate the VM.
Errors when updating VMs
If you can't update a VM instance, it might be due to the following issue.
Error when changing the machine type
The following error might occur when you try to change the machine type of a VM:
Invalid value for field 'resource.sourceMachineImage': Updating 'sourceMachineImage' is not supported
Resolution:
Make sure that your VM supports the processor of the new machine type. Formore information about the processors supported by different machine types, seeMachine family comparison.
Try to change the machine type by using the Google Cloud CLI.