I've never used Cloud Build. Referencing this guide: https://cloud.google.com/compute/docs/images/export-image and I've tried all the listed methods.
With different methods, it triggers different errors.
When using the cloud console method, the error as followed:
Validation of network "projects/product-id/global/networks/default" failed: googleapi: Error 404: The resource 'projects/project-id/global/networks/default' was not found, notFound ERROR ERROR: build step 0 "gcr.io/compute-image-tools/gce_vm_image_export:release" failed: step exited with non-zero status: 1
I have deleted the default network. I have tried creating new VPC, setting the region and zone, and specifying the region and zone and experimenting with different regions but none work.
When using the Google Cloud CLI method, the error as followed:
ERROR: (gcloud.compute.images.export) FAILED_PRECONDITION: generic::failed_precondition: due to quota restrictions, cannot run builds in this region
I do not understand how the regions restriction work in this case. Does it refer to the source or the destination? I checked the regions https://cloud.google.com/build/quotas and the region that I want to export the image from and import to is within the allowed regions.
I checked the quota limits but not sure which service export custom image falls into. This is the quota and for the rest of the list is 0:
My questions:
- If is due to the quota limits, are there other way to export image to GCS?
- Which item from the list should I request to increase the quota?
- The regions restriction is referred to the source or destination? In this case, is it the VPC the VM is in or the GCS bucket location?