Skip to content

Commit ecf5ef5

Browse files
committed
internal/cloud/gcp/compute: Add TDX_CAPABLE guest OS feature
Latest RHEL images (from 9.6 on) should be able to run as TDX guests. CentOS guests also fully support it at the moment. See: https://issues.redhat.com/browse/COS-3111 See: coreos/coreos-assembler#4006 See: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/5979
1 parent 7c101fd commit ecf5ef5

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

internal/cloud/gcp/compute.go

+20
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,18 @@ var GuestOsFeaturesRHEL9 []*computepb.GuestOsFeature = []*computepb.GuestOsFeatu
2929
{Type: common.ToPtr(computepb.GuestOsFeature_GVNIC.String())},
3030
{Type: common.ToPtr(computepb.GuestOsFeature_SEV_SNP_CAPABLE.String())},
3131
{Type: common.ToPtr(computepb.GuestOsFeature_SEV_LIVE_MIGRATABLE_V2.String())},
32+
{Type: common.ToPtr(computepb.GuestOsFeature_TDX_CAPABLE.String())},
33+
}
34+
35+
// Guest OS Features for RHEL9.2 images.
36+
// The TDX support was added since RHEL-9.6.
37+
var GuestOsFeaturesRHEL92 []*computepb.GuestOsFeature = []*computepb.GuestOsFeature{
38+
{Type: common.ToPtr(computepb.GuestOsFeature_UEFI_COMPATIBLE.String())},
39+
{Type: common.ToPtr(computepb.GuestOsFeature_VIRTIO_SCSI_MULTIQUEUE.String())},
40+
{Type: common.ToPtr(computepb.GuestOsFeature_SEV_CAPABLE.String())},
41+
{Type: common.ToPtr(computepb.GuestOsFeature_GVNIC.String())},
42+
{Type: common.ToPtr(computepb.GuestOsFeature_SEV_SNP_CAPABLE.String())},
43+
{Type: common.ToPtr(computepb.GuestOsFeature_SEV_LIVE_MIGRATABLE_V2.String())},
3244
}
3345

3446
// Guest OS Features for RHEL9.1 images.
@@ -71,6 +83,14 @@ func GuestOsFeaturesByDistro(distroName string) []*computepb.GuestOsFeature {
7183
// TODO: this should be updated for the dot-notation
7284
case distroName == "rhel-91":
7385
return GuestOsFeaturesRHEL91
86+
case distroName == "rhel-92":
87+
fallthrough
88+
case distroName == "rhel-93":
89+
fallthrough
90+
case distroName == "rhel-94":
91+
fallthrough
92+
case distroName == "rhel-95":
93+
return GuestOsFeaturesRHEL92
7494
case strings.HasPrefix(distroName, "centos-9"):
7595
fallthrough
7696
case strings.HasPrefix(distroName, "rhel-9"):

0 commit comments

Comments
 (0)