一段时间以来,我一直在尝试上传两个自定义图像,但我一再失败。在导入过程中,Google 应用程序始终以 Compute Engine 默认服务帐户不具有角色“roles/compute.storageAdmin”的消息进行响应。但是,我都使用 CLI 作为 web 界面来分配它。
值得注意的是,应用程序在调整磁盘大小期间会引发此错误。磁盘的原始大小约为 10GB,但是,它尝试将其转换为 1024GB (!) 磁盘。这让我开始思考,可能是这对于应用程序来说太大了,因此它抛出了缺少权限的错误?
作为后续问题,我没有找到任何设置磁盘大小的选项(不在 CLI 或 webapp 中)。有人知道这样的选择吗?
这是我收到的错误消息:
ate-import-3ly9z": StatusMatch found: "Import: Resizing temp-translation-disk-3ly9z to 1024GB in projects/0000000000000/zones/europe-west4-a."
[import-and-translate]: 2020-05-01T07:46:30Z Error running workflow: step "import" run error: step "wait-for-signal" run error: WaitForInstancesSignal FailureMatch found for "inst-importer-import-and-translate-import-3ly9z": "ImportFailed: Failed to resize disk. The Compute Engine default service account needs the role: roles/compute.storageAdmin'"
[import-and-translate]: 2020-05-01T07:46:30Z Serial-output value -> target-size-gb:1024
[import-and-translate]: 2020-05-01T07:46:30Z Serial-output value -> source-size-gb:7
[import-and-translate]: 2020-05-01T07:46:30Z Serial-output value -> import-file-format:vmdk
[import-and-translate]: 2020-05-01T07:46:30Z Workflow "import-and-translate" cleaning up (this may take up to 2 minutes).
[import-and-translate]: 2020-05-01T07:47:34Z Workflow "import-and-translate" finished cleanup.
[import-image] 2020/05/01 07:47:34 step "import" run error: step "wait-for-signal" run error: WaitForInstancesSignal FailureMatch found for "inst-importer-import-and-translate-import-3ly9z": "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_vm_image_import:release" failed: step exited with non-zero status: 1
ERROR: (gcloud.compute.images.import) build a9ccbeac-92c5-4457-a784-69d486e85c3b completed with status "FAILURE"
谢谢你的时间!
编辑:不确定,但我很确定这是由于 1024GB 太大。我已经使用相同的方法上传了 64GB,没有任何问题。对于那些在我之后阅读的人来说,这很可能是问题所在(: