Chapter 7. Configuring a RHEL instance on Google Cloud with Intel TDX
Intel TDX is a hardware based trusted execution environment (TEE). This confidential computing technology provides isolation and integrity to virtual machines.
Prerequisites
-
You have installed the
opensshandopenssh-clientspackages. -
You have installed the
google-cloud-cliutility. For instructions, see Installing gcloud CLI on RHEL. - You have launched the instance only from a supported Google Cloud instance type. For details, see Supported Google Cloud instance types for TDX.
Procedure
Log in to your Google Cloud account by using the
google-cloud-cliutility:gcloud auth login
$ gcloud auth loginCopy to Clipboard Copied! Toggle word wrap Toggle overflow Create a new project:
gcloud projects create <example_tdx_project> --name=”RHEL TDX Project”
$ gcloud projects create <example_tdx_project> --name=”RHEL TDX Project”Copy to Clipboard Copied! Toggle word wrap Toggle overflow Configure the project by setting the
google-cloud-cliutility property:gcloud config set project <example_tdx_project>
$ gcloud config set project <example_tdx_project>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Create a RHEL compute instance:
Copy to Clipboard Copied! Toggle word wrap Toggle overflow Open ports on the RHEL instance:
gcloud compute firewall-rules create allow-ssh \ --allow tcp:22 \ --source-ranges 0.0.0.0/0 \ --target-tags ssh
$ gcloud compute firewall-rules create allow-ssh \ --allow tcp:22 \ --source-ranges 0.0.0.0/0 \ --target-tags sshCopy to Clipboard Copied! Toggle word wrap Toggle overflow Connect to the RHEL Google Cloud instance.
Optional: Create a new key pair:
gcloud compute ssh <cloud-user>@<example-rhel-9-tdx-instance>
$ gcloud compute ssh <cloud-user>@<example-rhel-9-tdx-instance>Copy to Clipboard Copied! Toggle word wrap Toggle overflow Connect to the RHEL instance by using your key pair:
ssh -i <private key> <cloud-user>@<instance ip>
$ ssh -i <private key> <cloud-user>@<instance ip>Copy to Clipboard Copied! Toggle word wrap Toggle overflow
Verification
Check the VM configuration of the RHEL instance:
gcloud compute instances describe <example-rhel-9-tdx-instance> --format="get(metadata)"
$ gcloud compute instances describe <example-rhel-9-tdx-instance> --format="get(metadata)"Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check kernel logs to verify the status of the TDX feature:
sudo dmesg | grep -i tdx
$ sudo dmesg | grep -i tdxCopy to Clipboard Copied! Toggle word wrap Toggle overflow [ 0.000000] tdx: Guest detected [ 1.334504] process: using TDX aware idle routine [ 1.413419] Memory Encryption Features active: Intel TDX [ 3.606910] systemd[1]: Detected confidential virtualization tdx. [ 10.680475] systemd[1]: Detected confidential virtualization tdx.
[ 0.000000] tdx: Guest detected [ 1.334504] process: using TDX aware idle routine [ 1.413419] Memory Encryption Features active: Intel TDX [ 3.606910] systemd[1]: Detected confidential virtualization tdx. [ 10.680475] systemd[1]: Detected confidential virtualization tdx.Copy to Clipboard Copied! Toggle word wrap Toggle overflow Check the CPU flags of the VM:
grep -E 'tdx_guest' /proc/cpuinfo
$ grep -E 'tdx_guest' /proc/cpuinfoCopy to Clipboard Copied! Toggle word wrap Toggle overflow flags : ...`tdx_guest`...
flags : ...`tdx_guest`...Copy to Clipboard Copied! Toggle word wrap Toggle overflow