packer-plugin-googlecompute
packer-plugin-googlecompute copied to clipboard
Update latest guestOsFeatures for GCP
Add additional guesos features added recently in gcp images https://cloud.google.com/compute/docs/images/create-custom#guest-os-features
Please include tests. We recommend looking at existing tests as an example. Build image with TDX_CAPABLE and it shows in describe image for gcp.
If your PR resolves any open issue(s), please indicate them like this so they will be closed when your PR is merged:
Closes #255
TESTING DETAILS: Testing done on RHEL9.5 Add below feature flag in the packer code during googlecompute-import "image_guest_os_features": "UEFI_COMPATIBLE,VIRTIO_SCSI_MULTIQUEUE,GVNIC,TDX_CAPABLE,SEV_CAPABLE,SEV_SNP_CAPABLE",
https://cloud.google.com/confidential-computing/confidential-vm/docs/create-a-confidential-vm-instance#gcloud
gcloud compute instances create INSTANCE_NAME
--confidential-compute-type=CONFIDENTIAL_COMPUTING_TECHNOLOGY
--machine-type=MACHINE_TYPE_NAME
--min-cpu-platform="CPU_PLATFORM"
--maintenance-policy="MAINTENANCE_POLICY"
--zone=ZONE_NAME
--image-family=IMAGE_FAMILY_NAME
--image-project=IMAGE_PROJECT
--project=PROJECT_ID
This will start google confidential VM and instance and image can be verified for confidential instance via below command:
gcloud compute instances describe test-vm --zone=us-central1-a | grep confidential
gcloud compute images describe test-image