问题描述
问题是:
[import-ovf] 2020/08/19 13:02:35 step "import-boot-disk" run error: step "wait-for-signal" run error: WaitForInstancesSignal FailureMatch found for "inst-importer-import-ovf-import-boot-disk-3qlqg": "ImportFailed: Failed to resize disk. The Compute Engine default service account needs the role: roles/compute.storageAdmin'"
ERROR
ERROR: build step 0 "gcr.io/compute-image-tools/gce_ovf_import:release" Failed: step exited with non-zero status: 1
ERROR: (gcloud.compute.instances.import) build 0683583e-5157-4d13-972b-b5e3f5f75f2b completed with status "FAILURE"
"
The command I am using to implement is: gcloud compute instances import eve --os=ubuntu-1604 --source-uri=gs://evenamespace/EVE.ova --zone=northamerica-northeast1-a --custom-memory=25GB --custom-cpu=4.
我已经在Compute Engine默认服务帐户中添加了一个角色,即picture之类的Compute Storage Admin
解决方法
正如this Answer中提到的一个非常类似的问题,您应该确保自己的Compute Engine服务帐户具有角色roles/compute.storageAdmin
和roles/storage.objectViewer
。文档{ {3}}。
此外,重要的是要确保要在其中导入磁盘的区域中有足够的here。
导入过程使用SSD磁盘来提高性能。因此,如果没有足够的可用SSD磁盘,则在导入设备时也可能会遇到问题。我建议您还检查您当前的SSH配额。
能否请您尝试一下建议,并让我知道这样做是否可以完成导入?
如果没有,也许您可以通过检查gcloud compute instances import
的控制台输出来检索所有日志。暂存区将有一个URL。您可以加载该URL,导航到logs目录,然后下载所有日志。在这些日志中可以找到更多的原因提示。