0

When I try to import .ova file, there is following error.

The problem is:

[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.

I already add an role in Compute Engine default service account, that is Compute Storage Admin like the picture

thatguy
  • 21,059
  • 6
  • 30
  • 40

2 Answers2

0

As mentioned in this Answer to a very similar question, you should make sure that your Compute Engine Service Account has the roles roles/compute.storageAdmin & roles/storage.objectViewer.This is also mentioned in the documentation here.

Also, it is important to make sure that you have enough Disk quota in the region where you're importing the disk into.

The import process uses SSD disks for performance during the import process. So, in case you don't have quita for SSD Disks available you may also face issues when importing an appliance. I suggest to also check your current SSH quota.

Could you please try the recommendations and let me know if this works to complete your import?

If not, maybe you could retrieve all of the logs by inspecting the console output of gcloud compute instances import. There will be a URL for the scratch bucket.You can load that URL, navigate to the logs directory, and download all of the logs. More hints to the cause could be found in these logs.

Judith Guzman
  • 415
  • 3
  • 11
0

Using this command without the / at the end of the ova file name I got it to work:

$ gcloud beta compute machine-images import <my-machine-image> --source-uri=gs://my-virtual-appliances-bucket/my-va-file.ova --os=ubuntu-1804

Let me know if this helps anyone trying to attempt this, check out this link as well.

tomerpacific
  • 4,704
  • 13
  • 34
  • 52