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

Solution 1:

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:

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:

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:

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:

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.