6.2. Configuring a RHEL instance on Amazon Web Services with AMD SEV SNP
To create a trusted boot environment, configure AMD Secure Encrypted Virtualization with Secure Nested Paging (SEV-SNP) for a Red Hat Enterprise Linux (RHEL) instance on Amazon Web Services (AWS). SEV-SNP isolates VM data from the hypervisor and AWS, supported on AMD EPYC processor-based hosts only.
Prerequisites
-
You have installed the
awscli2,openssh, andopenssh-clientspackages. - You have created an AWS EC2 instance using an AMD EPYC processor-based machine type from the supported list. For details, see supported instance types.
You have checked if SEV-SNP is enabled for the RHEL instance:
$ aws ec2 describe-instances --instance-ids <example_instance_id> \ --region <example_region>... "CpuOptions": { "CoreCount": 2, "ThreadsPerCore": 2, "AmdSevSnp": "enabled" }, ...참고Before configuring a RHEL instance on AWS with AMD SEV-SNP, check with your cloud service provider. Verify the support status and certification of your particular RHEL instance type.
Procedure
Get ID of a RHEL AMI if SEV-SNP is not enabled:
$ aws ec2 describe-images \ --owners 309956199498 \ --query 'sort_by(Images, &Name)[*].[CreationDate,Name,ImageId]' \ --filters "Name=name,Values=RHEL-10*" \ --region us-east-1... "RHEL-10.0_HVM-amd64-..", "ami-0a1b2c3d4e5f67890" ...주의Do not modify the command option
--owners 309956199498. This is the account ID for displaying Red Hat images. If you need to list images for AWS GovCloud, use--region us-gov-west-1and--owners 219670896067.Launch a RHEL instance with AMD SEV-SNP enabled:
$ aws ec2 run-instances \ --image-id <example-rhel-10-ami-id> \ --instance-type m6a.4xlarge \ --key-name <example_key_pair_name> \ --subnet-id <example_subnet_id> \ --cpu-options AmdSevSnp=enabled
Verification
Check kernel logs to verify status of SEV-SNP:
$ dmesg | grep -i sev... [ 7.509546] Memory Encryption Features active: AMD SEV SEV-ES SEV-SNP [ 8.469487] SEV: Using SNP CPUID table, 64 entries present. [ 9.433348] SEV: SNP guest platform device initialized. [ 33.314380] sev-guest sev-guest: Initialized SEV guest driver (using vmpck_id 0) ...