[英]How to suspend/resume GCE VM
We need the ability to suspend/resume GCE VMs to optimize the use of Compute Engine resources.我们需要暂停/恢复 GCE VM 的能力,以优化计算引擎资源的使用。
Right now this feature is available in gcloud alpha
:现在这个功能在
gcloud alpha
中可用:
gcloud alpha compute instances suspend INSTANCE_NAMES [INSTANCE_NAMES …] [--async][--discard-local-ssd] [--zone=ZONE] [GCLOUD_WIDE_FLAG …]
But when I executed this command I got this error :但是当我执行这个命令时,我得到了这个错误:
HTTPError 400: Invalid Resource Usage:'Suspend Instance Feature is not available for this project.'
HTTPError 400:资源使用无效:“暂停实例功能不适用于此项目。”
Can anyone suggest to me ways to suspend Google Cloud VM?谁能向我建议暂停 Google Cloud VM 的方法? From the error stated, I get an understanding that we need some permission to include feature in the project.
从陈述的错误中,我了解到我们需要一些许可才能在项目中包含功能。 Can anyone suggest to me ways to include Suspend Instance Feature in this project?
任何人都可以向我建议在该项目中包含暂停实例功能的方法吗?
You need to apply for early access for this feature and have your project registered with Google.您需要申请此功能的抢先体验,并在 Google 注册您的项目。 Contact Google Support .
联系谷歌支持。 Include your email address, the project ID in your request and how you will be using the API.
在您的请求中包括您的电子邮件地址、项目 ID 以及您将如何使用 API。
Do not expect a rapid response.不要指望快速响应。 My requests sometimes takes several weeks for approval.
我的请求有时需要数周才能获得批准。
This feature is available in beta mode with GCP now.此功能现在可在 GCP 的 Beta 模式下使用。
gcloud beta compute instances suspend <instance-name>
gcloud beta compute instances resume <instance-name>
I tried this on Gcloud SDK and it has prompted me to install beta utility which worked for me..我在 Gcloud SDK 上试过这个,它提示我安装对我有用的 beta 实用程序。
More details can be found at https://cloud.google.com/sdk/gcloud/reference/beta/compute/instances/suspend更多详细信息,请访问https://cloud.google.com/sdk/gcloud/reference/beta/compute/instances/suspend
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.