【问题标题】:Google Cloud VM instance can't start and cannot be moved because of terminated state由于终止状态,Google Cloud VM 实例无法启动且无法移动
【发布时间】:2020-07-14 08:26:43
【问题描述】:

我想调整我机器的 RAM 和 CPU 的大小,所以我停止了 VM 实例,当我尝试启动它时出现错误:

“projects/freesarkarijobalerts/zones/asia-south1-a”区域没有 有足够的资源来满足请求。试一试 其他区域,或稍后再试。`

在这里你可以看到screenshot。

我今天尝试启动虚拟机实例,但结果相同,我再次收到错误消息:

“projects/freesarkarijobalerts/zones/asia-south1-a”区域没有 有足够的资源来满足请求。试一试 其他区域,或稍后再试。`

然后我尝试将我的实例移动到不同的区域,但我收到一条错误消息:

sarkarijobalerts123@cloudshell:~ (freesarkarijobalerts)$ gcloud compute instances move wordpress-2-vm --zone=asia-south1-a --destination-zone=asia-south1-b
Moving gce instance wordpress-2-vm...failed.
ERROR: (gcloud.compute.instances.move) Instance cannot be moved while in state: TERMINATED

我的网站关闭了几天,请帮助我。

【问题讨论】:

标签: wordpress google-cloud-platform gcloud


【解决方案1】:

标准过程是从已停止的 VM 实例 [1] 创建快照,然后在另一个区域 [2] 中创建一个新快照。

[1]https://cloud.google.com/compute/docs/disks/create-snapshots

[2]https://cloud.google.com/compute/docs/disks/restore-and-delete-snapshots#restore_a_snapshot_of_a_persistent_disk_to_a_new_disk

【讨论】:

    【解决方案2】:

    让我们看看这个问题的原因:

    1. 当您stop an instance 时,它会释放一些资源,例如 vCPU 和内存。

    2. 当您start an instance 它请求返回 vCPU 和内存等资源时,如果区域中没有足够的可用资源,您将收到一条错误消息:

      Error: The zone 'projects/freesarkarijobalerts/zones/asia-south1-a' does not have enough resources available to fulfill the request. Try a different zone, or try again later.
      

      更多信息请访问documentation:

      如果您收到资源错误(例如 ZONE_RESOURCE_POOL_EXHAUSTED 或 ZONE_RESOURCE_POOL_EXHAUSTED_WITH_DETAILS) 请求新的 资源,这意味着该区域目前无法容纳您的 要求。此错误是由于 Compute Engine 资源可获取性造成的, 并且不是因为您的 Compute Engine 配额。

    3. 资源可用性取决于用户请求,因此是动态的。

    有几种方法可以解决您的问题:

    1. 关注instructions,将您的实例移至another zone。
    2. 稍等片刻,然后尝试再次启动您的 VM 实例。
    3. Reserve resources 为您的虚拟机提供以下文档,以避免将来出现此类问题:

    为特定的虚拟机 (VM) 实例创建预留 区域,使用自定义或预定义的机器类型,有或没有 额外的 GPU 或本地 SSD,以确保资源可用于 您需要时的工作量。创建预订后,您 立即开始为保留的资源付费,并且它们仍然存在 可供您的项目无限期使用,直到预订为止 已删除。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-10-18
      • 2013-07-21
      • 1970-01-01
      • 2020-09-15
      • 2020-09-15
      • 1970-01-01
      • 2020-09-25
      相关资源
      最近更新 更多