What to do when resource is exhausted in GCE

Tags:

If “resource is exhausted” and can’t start a VM instance for that reason, one way would be creating reservations. Downside of that is that it’s too costly since “Reservations are billed at the same rate as their reserved resources”.

Instead, one can try creating the instance in other cells. For that, they need do these below:

  1. Identify zones to try. Figure out the cost of zones and list the ones that’s close enough (for lower latency) and cheap. Include the zones in the continents outside of yours since then users of the zone would be sleeping when you’re awake.
  2. Update quotas for the resources on the selected zones.
  3. Create machine image.
  4. Create a VM from the image.
  5. Delete the old VM.
  6. Delete the old disk.

What’s great is that the above moves boot disk and attached disks automatically. Thus, no new setup is required on the new machine. But in practice, I experienced some errors in python packages which were addressed only after reinstalling them. Not sure if it is the limitation of the above or if it was improperly installed packages.

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *