Skip to content

Commit 614af9b

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 614af9b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

internal/cloud/gcp/compute.go

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,19 @@ 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())},
3233
}
3334

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())},
44+
}
3445
// Guest OS Features for RHEL9.1 images.
3546
// The SEV_LIVE_MIGRATABLE_V2 support was added since RHEL-9.2
3647
var GuestOsFeaturesRHEL91 []*computepb.GuestOsFeature = []*computepb.GuestOsFeature{
@@ -71,6 +82,14 @@ func GuestOsFeaturesByDistro(distroName string) []*computepb.GuestOsFeature {
7182
// TODO: this should be updated for the dot-notation
7283
case distroName == "rhel-91":
7384
return GuestOsFeaturesRHEL91
85+
case distroName == "rhel-92":
86+
fallthrough
87+
case distroName == "rhel-93":
88+
fallthrough
89+
case distroName == "rhel-94":
90+
fallthrough
91+
case distroName == "rhel-95":
92+
return GuestOsFeaturesRHEL92
7493
case strings.HasPrefix(distroName, "centos-9"):
7594
fallthrough
7695
case strings.HasPrefix(distroName, "rhel-9"):

0 commit comments

Comments
 (0)