the zone does not have enough resources available to fulfill the request/ the resource is not ready

Google Cloud-PlatformGcloud

Google Cloud-Platform Problem Overview


I failed to start my instance (through the web browser), it gave me the error:

> "The zone 'projects/XXXXX/zones/europe-west4-b' does not have enough > resources available to fulfill the request. Try a different zone, or > try again later."

I thought it might be the quota problem at first, after checking my quota, it showed all good. Actually, I listed the available zones, europe-west4-b was available, but I still gave a shot to move the zone. Then I tried "gcloud compute instances move XXXX --zone europe-west4-b --destination-zone europe-west4-c", however, it still failed, popped up the error:

> "ERROR: (gcloud.compute.instances.move) Instance cannot be moved while > in state: TERMINATED"

Okay, terminated... then I tried to restart it by "gcloud compute instances reset XXX", the error showed in the way: > ERROR: (gcloud.compute.instances.reset) Could not fetch resource: > - The resource 'projects/XXXXX/zones/europe-west4-b/instances/XXX' > is not ready

I searched the error, some people solved this problem by deleting the disk. While I don't want to wipe the memory, how could I solve this problem?

BTW, I only have one instance, with one persistent disk attached.

Google Cloud-Platform Solutions


Solution 1 - Google Cloud-Platform

Even I'm getting the same error. I have waited for 24 hours and tried. But still no luck. For me, it's not transient.The zone 'projects/XXXX/zones/europe-west2-c' does not have enough resources available to fulfill the request. Try a different zone, or try again later. I had to create entirely new instance to come over it.

Solution 2 - Google Cloud-Platform

So I had the same issue for over 24 hours.

I tried to move my VM to another zone, but since it was in the terminated state and I couldn't restart it due to not having enough resources in my region, I couldn't move it.

Okay, but then per my understanding, your persistent disk attached to your VM is another story and you can copy it without starting your VM.

So I went around this issue by:

  1. Going to my Google Cloud Platform >>> Compute Engine
  2. Went to Snapshots >>> created a snapshot >>> Select your Compute Engine instance
  3. Once snapshot was completed I clicked on my snapshot.
  4. Ended up under "snapshot details". There, on the top, just click create instance. Here you are basically creating an instance with a copy of your disk.
  5. Select your new zone, don't forget to attach GPUs, all previous setting, create new name.
  6. Click create, that's it, your image should now be running in your new zone

Solution 3 - Google Cloud-Platform

As others have noted, this occurs when a GCP zone is oversubscribed, and its generally temporary. There is something that you can do to defend against it happening to you in the future though.

What it almost certainly won't resolve the error while the zone has insufficient resources, you can prevent this error in the future by Reserving Zonal Resources in advance -- effectively guaranteeing that the resources will be available for you when you need them.

Of course, as you are asking GCP to hold computing resources for your future use, you are billed for the instance reservation as if it was a fully running instance (but there isn't an additional charge while your instance is actually running). They also qualify for sustained use and committed use discounts like any VM instance.

There's a lot of configurability in what you can reserve, but the minimal gcloud command to reserve a single instance might look something like this:

gcloud compute reservations create my-reservation --machine-type=n1-standard-1 --zone=us-central1-a --vm-count=1

And to delete it when you are done:

gcloud compute reservations delete my-reservation

You can also do this through the console, on the 'Compute Engine > Commited use discounts > Reservations' tab.

Solution 4 - Google Cloud-Platform

Happened to me over the weekend when I wanted to swap the K80 to a new P100 instance.

My setup:

  • 'GPUS_ALL_REGIONS' quota is set to 1.
  • A single GPU (K80) instance on europe-west1 (zone: europe-west1-b)
Steps that produced the error:
  1. Deleted the K80 instance.
  2. After deleting I had a total of 0 instances running.
  3. Each attempt to create a new instance in the same region produced the error message.

Any instance created on other regions with the same zone identifier ('b', from europe-west1-b) produced this error as well.


How to resolve this issue:

Create a GPU instance on a different region and a different zone identifier ('a', 'c', 'd', ...). That's it.

Solution 5 - Google Cloud-Platform

To have a more up to date answer, today I had the same issue with the zone us-central1-a. I was getting the error message "The zone 'projects//zones/us-central1-a' does not have enough resources available to fulfill the request. '(resource type:compute)'.". Fortunatelly the error was overcome by just waiting 5 minutes and trying again.

Solution 6 - Google Cloud-Platform

Starting the instance using the GUI instead worked for me. Seems like a bug in gcloud.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionShadeBaiView Question on Stackoverflow
Solution 1 - Google Cloud-PlatformRaya SudhakarView Answer on Stackoverflow
Solution 2 - Google Cloud-PlatformYev GuyduyView Answer on Stackoverflow
Solution 3 - Google Cloud-PlatformrobsiembView Answer on Stackoverflow
Solution 4 - Google Cloud-PlatformdvdblkView Answer on Stackoverflow
Solution 5 - Google Cloud-PlatformKenny MonarView Answer on Stackoverflow
Solution 6 - Google Cloud-PlatformJoe SilversteinView Answer on Stackoverflow