Troubleshooting creating and updating VMs

This document lists errors that you might encounter when creating or updating VMs.

Errors when creating VMs

If you can't create a VM instance, it might be due to one of the issues that's described in this section.

Insufficient quota

Quota errors occur when your resources request exceeds your quota.

Error messages:

Instance INSTANCE_NAME creation failed:
Quota RESOURCE_NAME exceeded. Limit: QUOTA_LIMIT in region REGION
Instance INSTANCE_NAME creation failed:
Quota RESOURCE_NAME exceeded. Limit: QUOTA_LIMIT in zone ZONE

Resolution: Request a higher quota limit. For more information, see Requesting an increase in quota.

Simultaneous resource mutation or creation operations

If you update more than one resource at a time, for example, modifying secondary ranges in a subnetwork 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: Retry the failed operation.

Resource availability

Resource errors occur when you try to request new resources in a zone that cannot accommodate your request due to the current unavailability of a Compute Engine resource, such as GPUs or CPUs.

Resource errors only apply to new resource requests in the zone and do not affect existing resources. Resource errors are not related to your Compute Engine quota and only apply to the resource you specified in your request at the time you sent the request, not to all resources in the zone.

Error messages:

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.
Resource exhausted (HTTP 429): QUOTA_EXCEEDED

Resolution:

  • Try to create the resources in another zone in the region or in another region.
  • Because this situation is temporary and can change frequently based on fluctuating demand, try your request again later.
  • Try to change the shape of the VM you are requesting. It's easier to get smaller machine types than larger ones. A change to your request, such as reducing the number of GPUs or using a custom VM with less memory or vCPUs, might let your request proceed.
  • Use Compute Engine reservations to reserve resources within a zone to ensure that the resources you need are available when you need them.
  • If you are trying to create a preemptible instance, remember that preemptible VMs are spare capacity and so might not be obtainable at peak demand periods.
  • If you were unable to resolve the error using any of the preceding instructions, try Getting support.

Zone availability

If you receive a notFound or does not exist in zone error when requesting new resources, it means that the zone you are requesting the resource in 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 find out 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 from a 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 image then create your disks from the image:

  1. Create an image from the snapshot.
  2. Create persistent disks from the image. In the Google Cloud Console, select Image as the disk Source type. With the gcloud tool, use the image flag. In the API, use the sourceImage 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 have the 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 to create VMs. For more information, see Granting access to Compute Engine resources.

Resource names

If you receive a resource already exists error when you create a VM, your creation request failed because you specified a non-unique name for the VM.

Error message:

The resource 'projects/PROJECT_NAME/zones/ZONE/instances/VM_NAME' already exists"

Resolution: Retry your creation request with a unique VM name.

Network interfaces

If you receive a Too many network interfaces error when creating a VM, your request 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 interfaces is calculated for different machine types, see Maximum number of network interfaces.

Constraint violated

If you receive a Constraint violated error when creating a VM, your request violated one or more organization policy constraints.

Error message:

For example, if your organization restricts Shared VPC subnetworks, you might 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 the creation 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:

  1. To learn about which CPU platform your machine type supports, review CPU platforms.
  2. Retry your request with a supported CPU platform.

Creation failed

The following error might occur when you try to create a VM:

Instance 'Instance-name' creation failed: Internal error. Please try again or contact Google Support.
(Code: NUMERIC_CODE)

This error can occur for several reasons. The following is a common cause of this error:

Unknown error

The following error might occur when you try to create a VM:

Request failed with unknown error

This error can occur for several reasons. The following is a common cause of this error:

Free Trial

If you try to create a Windows VM during a Free Trial of Google Cloud you receive an error.

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.

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. For more information about the processors supported by different machine types, see Machine family comparison.

  • Try to change the machine type by using the gcloud command-line tool.