Troubleshooting bulk VM creation

This document shows you how to resolve issues withbulk instance API creation operations.

Operation errors

When you use the bulk instance API to create VMs,create requests returnHTTP 200 OK with a status ofRUNNING if the request starts successfully. Ifthe request doesn't start successfully, the API returns one of the responsesbelow.

Invalid

If the following API response fields are present when you create VMs, your APIrequest isn't written correctly, or it uses a property that isn't supportedby the bulk API.

API response fields:

  • HTTP 400
  • "reason": "invalid"

To resolve this issue, do the following:

  1. View themessage field in the response to determine which property in therequest caused the error.
  2. Update the property that caused the error.
  3. Retry the request.
  4. If the request fails again, try using the API Explorer to validate therequest. For more information, seeValidating API requests.

Quota exceeded

If the following API response fields are present when you create VMs, youreached a quota limit for a resource. For more information about quotas, seeResource quotas.

API response fields:

  • HTTP 403
  • "reason": "quotaExceeded"
To resolve this issue, do the following:

  1. View the `message` field to identify which resource quota the request exceeded.
  2. Do one of the following:

Rate limit exceeded

If the following API response fields are present when you create VMs, youreached the 20 request per second request limit or you have more than 10 bulkoperations running at the same time.

API response fields:

  • HTTP 403
  • "reason": "rateLimitExceeded"

To resolve this issue, wait until some requests complete and try your requestagain.

Insufficient capacity

If the following API response fields are present when you create VMs, the regionor zone you tried to create VMs in hasinsufficient capacity.

API response fields:

  • HTTP 503
  • "reason": "insufficientCapacity"
To resolve this issue, do one of the following:

  • Create VMs in a different region
  • Create VMs in a different zone if using the zonal endpoint
  • Try a different VM configuration
  • Retry your request later

Request status errors

When you use the bulk instance API to create VMs, yourcreate request returnsHTTP 200 OK with a status ofRUNNING if the request starts successfully.However, the request may fail before it completes. You cancheck the status of your requestto ensure the request completed successfully. If the request didn't completesuccessfully, you see one of the following request statuses.

Quota exceeded

If the following API response fields are present when you poll operations, yourrequest failed because you reached a quota limit for a resource. For moreinformation about quotas, seeResource quotas.

API response fields:

  • "status": "done"
  • "httpErrorMessage": "FORBIDDEN"
  • "code"": "QUOTA_EXCEEDED"

To resolve this issue, do the following:

  1. View the `message` field to identify which resource quota the request exceeded.
  2. Do one of the following:

Resource already exists

If the following API response fields are present when you poll operations, yourrequest failed because it tried to create a resource that already exists.

API response fields:

  • code: RESOURCE_ALREADY_EXISTS
  • httpErrorMessage: CONFLICT
  • status: DONE

To resolve this issue, do the following:

  1. View themessage field to identify the name of the resource that alreadyexists.
  2. Retry your request using a differentnamePattern. For more information, seeCreating multiple VMs in a region.

Insufficient capacity

If the following API response fields are present when you poll operations, yourrequest failed because the region or zone (if using the zonal endpoint) youtried to create VMs in has insufficient capacity.

API response fields:

  • "status": "DONE"
  • "httpErrorMessage": "SERVICE UNAVAILABLE"
  • "code": "ZONE_RESOURCE_POOL_EXHAUSTED"

To resolve this issue, do one of the following:

  • Create VMs in a different region
  • Create VMs in a different zone if using the zonal endpoint
  • Try a different VM configuration
  • Retry your request later

What's next?

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-12-15 UTC.