From f613ddbd13a9b7dd3078114d7b6fafd5a50ce787 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Ravier?= Date: Thu, 27 Jul 2023 10:00:51 +0200 Subject: [PATCH 1/2] internal/cloud/gcp/compute: Add SEV_SNP_CAPABLE Guest OS Feature See: https://github.com/coreos/coreos-assembler/pull/3547 See: https://cloud.google.com/blog/products/identity-security/rsa-snp-vm-more-confidential See: https://issues.redhat.com/browse/COS-2343 --- internal/cloud/gcp/compute.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/cloud/gcp/compute.go b/internal/cloud/gcp/compute.go index 9aef1f7685..165ea08339 100644 --- a/internal/cloud/gcp/compute.go +++ b/internal/cloud/gcp/compute.go @@ -27,6 +27,7 @@ var GuestOsFeaturesRHEL9 []*computepb.GuestOsFeature = []*computepb.GuestOsFeatu {Type: common.ToPtr(computepb.GuestOsFeature_VIRTIO_SCSI_MULTIQUEUE.String())}, {Type: common.ToPtr(computepb.GuestOsFeature_SEV_CAPABLE.String())}, {Type: common.ToPtr(computepb.GuestOsFeature_GVNIC.String())}, + {Type: common.ToPtr(computepb.GuestOsFeature_SEV_SNP_CAPABLE.String())}, } // GuestOsFeaturesByDistro returns the the list of Guest OS Features, which From 729242a4a3191abd5ee5d8ca65cdeded8be237e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tom=C3=A1=C5=A1=20Hozza?= Date: Mon, 14 Aug 2023 14:45:56 +0200 Subject: [PATCH 2/2] internal/cloud/gcp/compute: keep legacy Guest OS Features for el9.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The SEV-SNP support was added since RHEL-9.1, so we need to keep the original Guest OS Feature set when importing RHEL-9.0 images to GCP. Signed-off-by: Tomáš Hozza --- internal/cloud/gcp/compute.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/internal/cloud/gcp/compute.go b/internal/cloud/gcp/compute.go index 165ea08339..29aec4a5fe 100644 --- a/internal/cloud/gcp/compute.go +++ b/internal/cloud/gcp/compute.go @@ -30,6 +30,15 @@ var GuestOsFeaturesRHEL9 []*computepb.GuestOsFeature = []*computepb.GuestOsFeatu {Type: common.ToPtr(computepb.GuestOsFeature_SEV_SNP_CAPABLE.String())}, } +// Guest OS Features for RHEL9.0 images. +// The SEV-SNP support was added since RHEL-9.1, so keeping this for RHEL-9.0 only. +var GuestOsFeaturesRHEL90 []*computepb.GuestOsFeature = []*computepb.GuestOsFeature{ + {Type: common.ToPtr(computepb.GuestOsFeature_UEFI_COMPATIBLE.String())}, + {Type: common.ToPtr(computepb.GuestOsFeature_VIRTIO_SCSI_MULTIQUEUE.String())}, + {Type: common.ToPtr(computepb.GuestOsFeature_SEV_CAPABLE.String())}, + {Type: common.ToPtr(computepb.GuestOsFeature_GVNIC.String())}, +} + // GuestOsFeaturesByDistro returns the the list of Guest OS Features, which // should be used when importing an image of the specified distribution. // @@ -42,6 +51,8 @@ func GuestOsFeaturesByDistro(distroName string) []*computepb.GuestOsFeature { case strings.HasPrefix(distroName, "rhel-8"): return GuestOsFeaturesRHEL8 + case distroName == "rhel-90": + return GuestOsFeaturesRHEL90 case strings.HasPrefix(distroName, "centos-9"): fallthrough case strings.HasPrefix(distroName, "rhel-9"):