I created an image using the --guest-os-features="UEFI_COMPATIBLE"
option as described in the documentation but when trying to instantiate an VM Instance (using the Console and gcloud) I get the following error:
ERROR: (gcloud.compute.instances.create) Could not fetch resource:
- Invalid resource usage: 'UEFI feature is not available for this project.'
I also tried beta compute images create
and beta compute instances create
without success.
I understand that there must be a way to enable the UEFI feature for my project but searching through all the documentation, stackoverflow and google the only relevant information I could find does not cover how to enable this feature:
- https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features
- https://cloud.google.com/sdk/gcloud/reference/compute/disks/create#guestOsFeatures
I searched all the Quotas, API's, Permissions, Management and also tried "SECURE_BOOT"
and "SECURE_BOOT,UEFI_COMPATIBLE"
all with the same error.
And no, the problem is not with my disk image as the problem occurs before booting. It can also be very easily replicated using an empty image:
dd if=/dev/zero bs=1M count=100 of=disk.raw
tar -Sczf disk.tar.gz disk.raw
gsutil cp disk.tar.gz gs://...
gcloud compute images create [name] --guest-os-features="UEFI_COMPATIBLE" \
--source-uri=gs://...
gcloud compute instances create [inst-name] --image=[name] ...
Note: I originally posted this to stackoverflow because I didn't realize it would fit here better. So if this gets flagged for repost or spam, I deleted the original.