You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

如何创建指定镜像系列的VM实例?gcloud命令执行报错求助

解决创建嵌套虚拟化VM时的镜像资源找不到问题

你执行的命令未指定镜像所属的公共项目,导致gcloud默认在你的项目open-shift-363408内查找centos-stream-8镜像系列,自然找不到官方托管的镜像资源。

修正后的命令需添加--image-project=centos-cloud参数(CentOS官方镜像的托管项目),完整命令如下:

gcloud compute instances create myserver \
  --enable-nested-virtualization \
  --zone=europe-north1-a \
  --machine-type=e2-standard-4 \
  --image-family=centos-stream-8 \
  --image-project=centos-cloud

补充说明:

  • 主流公共操作系统镜像均托管在Google官方项目中,比如Ubuntu对应ubuntu-os-cloud、Debian对应debian-cloud
  • 若需确认镜像系列所属项目,可执行gcloud compute images list --filter="family:centos-stream-8",结果中的PROJECT字段即为对应项目名

内容的提问来源于stack exchange,提问作者nicola turri

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.08.18 16:55:46