The zone X does not have enough resources - google-cloud-platform

Instance group attempting to create an instance, but can't, with this error:
The zone 'projects/myproject/zones/us-central1-f' does not have enough resources available to fulfill the request
How do I fix this, and is it something I should be expecting from GCE on regular basis?
Thanks

In some rare occasions, some zones might not have enough resources available to fullfill a request. This is done to ensure that there are enough resources in each zone, to ensure that already installed users have enough of them to keep running their applications.
This type of issues are immediately noticed, and currently this is being investigated. For the moment, you can try to do one the following points:
Keep trying to do the deployment until the zone has enough resources.
Relax the requirements of the instance you are creating ( i.e. less CPU/Disk/Memory...)
Try to deploy to another zone within the same region, for example deploy to us-central1-a. You can see the full list of available zones/regions in this documentation
I would recommend you to go for the third option, as you will be able to create the instances immediately, with the resources you need, and you probably won't be affected by the zone change.

Related

zone does not have enough resources available to fulfill the request. Try a different zone, or try again later

I am trying to create a server in Location Mumbai for past 2 months , I am getting Error in all 3 a,b,c zones.
When will the servers will be available in mumbai ?
I assume that you've got an error message like:
The zone 'projects/XXX/zones/asia-south1-x' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
while creating VM instances at asia-south1-a, asia-south1-b and asia-south1-c.
It's not an issue. Have a look at the documentation to find more details:
If you receive a resource error (such as ZONE_RESOURCE_POOL_EXHAUSTED
or ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS) when requesting new
resources, it means that the zone cannot currently accommodate your
request. This error is due to Compute Engine resource obtainability,
and is not due to your Compute Engine quota.
The reason for this behavior is resource availability which depends from users requests and therefore are dynamic.
There are a few ways to solve it:
Choose another zone for your instance.
Wait for a while and try to start your VM instance again.
Reserve resources for your VM by following documentation to avoid such issue in future:
Create reservations for Virtual Machine (VM) instances in a specific
zone, using custom or predefined machine types, with or without
additional GPUs or local SSDs, to ensure resources are available for
your workloads when you need them. After you create a reservation, you
begin paying for the reserved resources immediately, and they remain
available for your project to use indefinitely, until the reservation
is deleted.

I'm unable to start the GCE instance "zone ... does not have enough resources"

I'm unable to start the google cloud instance:
Starting VM instance "am01" failed. Error: The zone 'projects/.../zones/asia-south1-a' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
Please help me to solve this issue.
Let's have a look at the cause of this issue:
When you stop an instance it releases some resources like vCPU and memory.
When you start an instance it requests resources like vCPU and memory back and if there's not enough resources available in the zone you'll get an error message:
Error: The zone 'projects/imposing-fin-273614/zones/asia-south1-a' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
more information available in the documentation:
If you receive a resource error (such as ZONE_RESOURCE_POOL_EXHAUSTED
or ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS) when requesting new
resources, it means that the zone cannot currently accommodate your
request. This error is due to Compute Engine resource obtainability,
and is not due to your Compute Engine quota.
Resource availability are depending from users requests and therefore are dynamic.
There are a few ways to solve your issue:
Move your instance to another zone by following instructions.
Wait for a while and try to start your VM instance again.
Reserve resources for your VM by following documentation to avoid such issue in future:
Create reservations for Virtual Machine (VM) instances in a specific
zone, using custom or predefined machine types, with or without
additional GPUs or local SSDs, to ensure resources are available for
your workloads when you need them. After you create a reservation, you
begin paying for the reserved resources immediately, and they remain
available for your project to use indefinitely, until the reservation
is deleted.

Google Cloud - Is it possible to check available resources in some location (regions, zones)?

It is very annoying if you try to create some instance in a zone but this location lacks some resources and you get a message "The zone ... does not have enough resources available to fulfill the request. '(resource type:compute)'."
Can I in some way (console, gcloud, api) check available resources in some location before a request of a creation instance?
I am not sure if there is a way to check availability.
One way to avoid this issue would be using Reservations.
Then you can make use of Sustained use and Committed use discounts.

GCP zone northamerica-northeast1-a does not have enough resources available to fulfill the request

When I run gcloud compute instances create test --zone=northamerica-northeast1-a I get:
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- The zone 'projects/PROJECT/zones/northamerica-northeast1-a' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
I ran into this error in production where a service tried to spin up resources there.
This only affects that specific zone. Is there a way to get more information about this? Is this an outage?
Cheers,
Kim
At the time you tried to provision the instance, that zone had insufficient resources to 'make it so'.
You may retry the request (please do so increasingly infrequently) until there are sufficient resources for you to acquire. There are others also trying to secure these resources and, everyone hammering the request concurrently exacerbates the issue.
There's only ever finite resources available and, unfortunately, you hit Google's capacity for that zone (for available resources to fulfill your need) for that period of time.
The error is unambiguous and you're unlikely to get much more from Google by way of admission that it had insufficient capacity (available) because customers don't want to experience this.
Same start happen today with northamerica-northeast1-c does not have enough resources available.
It's bad , two of three zones out of resources.

GCP VM can't start or move TERMINATED instance

I'm running into a problem starting my Google Cloud VM instance. I wanted to restart the instance so I hit the stop button but this was just the beginning of a big problem.
start failed with an error that the zone did not have enough capacity. Message:
The zone 'XXX' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
I tried and retried till I decided to move it to another zone and ran:
gcloud compute instances move VM_NAME --destination-zone NEW_ZONE
I then get the error:
Instance cannot be moved while in state: TERMINATED
What am I supposed to do???
I'm assuming that this is a basic enough issue that there's a common way to solve for this.
Thanks
Edit: I have since managed to start the instance but would like to know what to do next time
The correct solution depends on your criteria.
I assume you're using Preemptible instances for their cost economies but -- as you've seen, there's a price -- sometimes non-preemptible resources are given the priority and sometimes (more frequently than for regular cores) there are insufficient preemptible cores available.
While it's reasonable to want to, you cannot move stopped instances between zones in a region.
I think there are a few options:
Don't use Preemptible. You'll pay more but you'll get more flexibility.
Use Managed Instance Groups (MIGs) to maintain ~1 instance (in the region|zone)
(for completeness) consider using containers and perhaps Cloud Run or Kubernetes
You describe wanting to restart your instance. Perhaps this was because you made some changes to it. If this is the case, you may wish to consider treating your instances as more being more disposable.
When you wish to make changes to the workload:
IMPORTANT ensure you're preserving any important state outside of the instance
create a new instance (at this time, you will be able to find a zone with capacity for it)
once the new instance is running correctly, delete the prior version
NB Both options 2 (MIGs) and 3 (Cloud Run|Kubernetes) above implement this practice.