Cannot start or move a VM Instance - google-cloud-platform

I am fairly new to Google Cloud platform and cloud computing as a whole. I had af1-micro (1 vCPU, 0.6 GB memory) type of instance running. GCP gave me a warning that the instance was overutilized and I should change it to g1-small (1 vCPU, 1.7 GB memory) type of instance. When I went to upgrade, it began to restart my instance but gave me the error
Starting VM instance '<instance name>' failed. Error: The zone 'projects/<project id>/zones/asia-south1-a' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
I have waited for some time (more than 12 hours) to start it again and getting the same error. I edited the instance manually and changed it to g1-small (1 vCPU, 1.7 GB memory) but still getting the same error.
I tried moving the instance to a different zone in same region using move instances in google cloud SDK Shell, but got an error and found out that instances in terminated state cannot be moved.
I just need to get my instance up and running, so please help here.

Did some further investigation. Indeed the resource shortage is still ongoing in the region. However changing the machine type to E2-micro/small then starting the instance should work for you.

I faced the same issue and I am still facing it. What I ended up doing is I switched to asia-south1-c.

Finally was able to create a snapshot of a terminated instance from the web console and then create a new VM using that snapshot in a different region. Then deleted the old VM and snapshot.

Related

Can't access AWS EC2 instance after storage expansion

My EC2 instance had 8GB max storage but it was not enough so I decided to expand it to 15GBs (i am using the free tier). I waited process to finish but I lost whatever Access i had to the instance. Connection times out.
I waited several hours more but no change. Accessibility checks are ok and when I choose instance snapshot i see that it stays on the login screen.
I couldn't fix my issues - I tried restarting the instance multiple times, I checked the network settings everything was ok there. I changed volumes of the instance and I noticed that the volume maybe was corrupted because the same instance with different volume the SSH was working fine. I ended up setting up a new instance.

Failed to start instance: A e2-micro VM instance is currently unavailable in the us-central1-a zone

I am facing this issue from yesterday. This is the exact error: Failed to start feature-config: A e2-micro VM instance is currently unavailable in the us-central1-a zone. Alternatively, you can try your request again with a different VM hardware configuration or at a later time. For more information, see the troubleshooting documentation.
I had scheduled Google Compute Engine to TURN on & off at specific time using Instance scheduler but now I am locked out of it. I cannot even create a machine image to deploy on another zone
I changed the Machine Configuration. As from your answer I could figure out that resources might not be available for the US Central Zone possibly due to traffic. I changed configuration to - n2-highcpu-2 vCPU 2 & Memory -2 GB
At the end, it seems this was a general issue that multiple users experienced in us-central1 among other regions.
In this thread more is talked and it seems it got worse during the weekend.
As some suggestions in the comments, changing the zone/region/hardware can help but not always since this also depends on any constraints you may have.
As the error suggests, there aren't any available resources in that regions. I contacted GCP support after facing the same issue and got the following response:
Google Cloud Support, : Upon further checking, the reason that the e2-medium VM instance is currently unavailable is because there are limited VMs available to a specific zone and regions. Best we can do is to try another time or select a different zone so that the VMs that you desire to use will start. Rest assured that there is nothing wrong with your account and it was on the us-central1 zone who do not have available VMs you selected as of the moment.
If possible, try deploying to a different instance. For those who need an instance in us-central1 (for Qwiklabs?) might have to wait until more instances are available.
Similar issue here, but coming from a terraform apply. I've tried multiple zones and every one says both 'e2-small' and 'e2-micro' instances are unavailable. Seems google completely fumbled the "cloud game" here since AWS doesn't have this problem EVER! (not that I like using AWS, it's just "ick" compared to google).

GCP VM shut itself down, won't restart

Bit panicky here because I can't troubleshoot the error on a production site and it appears to be completely down.
GCP - Compute Engine VM - N1-standard on the US-West-3C zone running a Bitnami Multisite Wordpress deployment
About 2 hours ago my VM stopped responding (as far as I could tell with monitoring tools) and I was unable to SSH into it or connect in any way. I've experienced this occasionally in the past so my process was to grab a snapshot and restart the VM. I did manage to get the snapshot, however it stopped the VM by itself and I'm now stuck where I can't restart the VM.
The error I'm getting is:
Failed to start name-of-vm: A n1-standard-1 VM instance is currently unavailable in the us-west3-c zone. Alternatively, you can try your request again with a different VM hardware configuration or at a later time. For more information, see the troubleshooting documentation.
I tried changing my configuration (it used to be a custom VM) but that didn't do anything.
Searching for similar errors I've found threads about certain Zones running out of resources, but as far as I can tell this error doesn't specifically say 'run out of resources' and the status of the US-West-3C zone is fine. I can't imagine it would run out in a way where it can't even start a measly n1 vm.
Unfortunately due to some mismanagement this project isn't umbrella'd in our Google Workspace/Organization so I can't request technical support for it.
Any assistance or help pointing to some resources would be greatly appreciated.
currently unavailable in a specific zone would also mean that the zone run out of resources for the certain machine type.
You can try to restore the snapshot you had created on a different machine type e2-standard or n2-standard machine type configuration

Cannot start GCE VM instance "The zone does not have enough resources"

I am trying to restart an instance that has been shut down for about a week, however it will not start, I get the error message:
Starting VM instance 'gc-custom-europe-west2-xxxxxxxxxxxxxxxxxxxx' failed. Error: The zone 'projects/XXX/zones/europe-west2-c' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
There are no incidents reported that I can see, could anyone advise please?
You can control status of Google Cloud at Google Cloud Status Dashboard, but this isn't an issue, let me provide you some explanations:
When you stop an instance it releases some resources like vCPU and memory.
When you start an instance (or change it) 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: Starting VM instance "INSTANCE_NAME" failed. Error: The zone 'projects/XXXX/zones/ZONE' 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 such issue without moving it to another zone:
Move your VM instance to another zone.
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 (extra payment required):
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.
To protect data on your VM you can create a snapshot before making any changes.
You could try changing the instance form zone, let me provide you with the instructions for you to do so:
1.Go to Google Cloud Platform >>> Compute Engine
2.Go to Snapshots >>> create a snapshot >>> Select your Compute Engine instance
3.Once snapshot is completed click on snapshot.
4.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 setup previous setting, create new name.
6.Click create, at this point your image should now be running in the new zone

Google Cloud VM Instance Stuck on resizing suggested by Console

I had a vm instance running on Google Cloud, it's suggested me that "you should resize instance to 2CPU and 16GB RAM from 4CPU and 16GB RAM".
I pressed to Apply to set new config. Instance has stopped and stucked in resize process since an hour, neigher shows resized in gcloud instance list nor starting up.
Even try for taking snapshot of that vm's disk shows error that "it's being used in some operations"
Tried to force stop via gcloud, but no luck. In notification pop-up shows, resizing vm only.
Pls help me here.
The main reason for this issue is GCP resource availability which depends on users requests and therefore is dynamic. As result, issues like this could happen when you use cloud resources on-demand without reservation.
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;
when you resize your VM it's the same.
In case if there's not enough resources available in the zone you'll get an error message:
The zone 'projects/xyz-project-272905/zones/asia-south1-a' does not have enough resources available to fulfill the request. Try a different zone, or try again later..
more details you can find 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.
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 resize your VM instance again.
Reserve resources for your VM by following documentation to avoid such issue in future (extra payment will be required):
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.