首页 > 解决方案 > 从现有模板在 Google Cloud Platform 中创建实例模板

问题描述

我正在尝试从现有模板创建一个新的实例模板,但我总是遇到错误。我运行的命令:

gcloud compute instance-templates create elk-pool-template-us-west1-3 --source-instance elk-pool-template-us-west1-2 --source-instance-zone us-west1-2

我得到的错误:

错误:(gcloud.compute.instance-templates.create)无法识别的参数:

--source-instance elk-pool-template-us-west1-2

--source-instance-zone us-west1-2

标签: google-cloud-platformgoogle-compute-engine

解决方案


unrecognized-arguments错误指出gcloud无法识别的是and--source-instance参数--source-instance-zone,而不是您尝试分配的值。我刚刚尝试了您正在使用的命令,它对我有用,所以我认为您需要更新 Cloud SDK

运行以下命令以更新所有已安装的组件:

$ gcloud components update

推荐阅读