首页 > 解决方案 > 当我将 .ova 文件导入谷歌云以创建 VM 实例时的问题

问题描述

当我尝试导入 .ova 文件时,出现以下错误

问题是:

[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 默认服务帐户中添加了一个角色,即如图所示的 Compute Storage Admin

标签: google-cloud-platformvirtual-machine

解决方案


正如对一个非常相似的问题的回答中所述,您应该确保您的 Compute Engine 服务帐户具有角色roles/compute.storageAdmin& 。此处roles/storage.objectViewer的文档中也提到了这一点。

此外,确保将磁盘导入到的区域中有足够的磁盘配额也很重要。

导入过程在导入过程中使用 SSD 磁盘来提高性能。因此,如果您没有可用的 SSD 磁盘quita,您在导入设备时也可能会遇到问题。我建议还检查您当前的 SSH 配额。

您能否尝试这些建议并让我知道这是否可以完成您的导入?

如果没有,也许您可​​以通过检查控制台输出来检索所有日志gcloud compute instances import。将有一个用于临时存储桶的 URL。您可以加载该 URL,导航到日志目录,然后下载所有日志。在这些日志中可以找到有关原因的更多提示。


推荐阅读