Chapter 7. Configuring RHEL on Public Cloud Platforms with AMD SEV SNP


To prevent VM integrity-based attacks and reduce memory integrity violations, configure AMD Secure Encrypted Virtualization with Secure Nested Paging (SEV-SNP) on Red Hat Enterprise Linux (RHEL) instances on public cloud. AMD SEV-SNP isolates VM data from the hypervisor and cloud service provider.

7.1. Overview of AMD SEV SNP

AMD Secure Encrypted Virtualization with Secure Nested Paging (SEV-SNP) aims at improving security of virtual machines (VMs) and data stored in them on public cloud platforms.

AMD processors offer three hardware-based security mechanisms: SEV, SEV-ES, and SEV-SNP.

  • SEV: The SEV mechanism encrypts virtual machine (VM) memory to prevent the hypervisor from accessing VM data.
  • SEV-ES: SEV with Encrypted State (SEV-ES) extends SEV by encrypting CPU register states. This mechanism prevents the hypervisor from accessing or modifying VM CPU registers. Despite providing isolation between hypervisor and VM, it is still vulnerable to memory integrity attacks.
  • SEV-SNP: SEV-SNP is an enhancement to SEV-ES that adds memory integrity protection along with VM encryption. This mechanism prevents the hypervisor from modifying page tables to redirect VM memory access. It protects against replay attacks and memory tampering.
SEV SNP components
  • Secure Processor: The AMD EPYC processor integrates a Secure Processor (SP) subsystem. The AMD SP is a dedicated hardware component to manage keys and encryption operations.
  • Memory Integrity: The memory management unit (MMU) utilizes page tables to translate virtual addresses to guest-physical addresses.

    • SEV-SNP uses nested page tables for translating guest-physical addresses to host-physical addresses.
    • Once defined, nested page tables cannot be altered by the hypervisor or the host. This prevents VM access to different pages, protecting memory integrity.
    • SEV-SNP uses this method to offer protection against replay attacks, memory integrity violations, and malicious modifications to VM memory.
  • Memory Encryption: The AMD EPYC processor hides the memory encryption key, which remains hidden from both host and VM.
  • Attestation report for verification: A CPU-generated report contains RHEL instance information in an authorized cryptographic format. This report confirms the authenticity and reliability of the initial CPU and memory state of the RHEL instance and AMD processor.

    Note

    Even if a hypervisor creates the primary memory and CPU register state of the VM, they remain hidden and inaccessible to the hypervisor after initialization of that VM.

The AMD SEV SNP Secure Boot process
  1. Initialization and measurement: A SEV-SNP enabled hypervisor sets the initial state of a VM.

    1. This hypervisor loads firmware binary into the VM memory and sets the initial register state.
    2. AMD Secure Processor (SP) measures the initial state of the VM and provides details to verify the initial state of the VM.
  2. Firmware: The VM initiates the UEFI firmware. The firmware might include either stateful or stateless Virtual Trusted Platform Module (vTPM) implementation.

    1. Stateful vTPM maintains persistent cryptographic state across VM reboots and migrations.
    2. Stateless vTPM generates a new cryptographic state for each VM session without persistence.
    3. Virtual Machine Privilege Levels (VMPL) technology isolates vTPM from the guest.
    4. VMPL offers hardware-enforced privilege isolation between different VM components and the hypervisor.
  3. vTPM: For stateful vTPM implementation, the UEFI firmware might perform remote attestation.

    1. This depends on your cloud service provider. The attestation decrypts the persistent state of vTPM.
    2. vTPM also measures facts about the boot process

      • Secure Boot state
      • Certificates used for signing boot artifacts
      • UEFI binary hashes
  4. Shim: When the UEFI firmware finishes the initialization process, it searches for the extended firmware interface (EFI) system partition.

    1. The UEFI firmware verifies and executes the first stage boot loader from there.
    2. For RHEL, this is shim. The shim program allows non-Microsoft operating systems to load the second stage boot loader from the EFI system partition.
    3. shim uses a Red Hat certificate to verify the second stage boot loader (grub) or Red Hat Unified Kernel Image (UKI).
    4. grub or UKI unpacks, verifies, and executes Linux kernel and initial RAM filesystem (initramfs), and the kernel command line.
    5. This process ensures that the Linux kernel loads in a trusted and secured environment.
  5. Initramfs: In initramfs, vTPM information automatically unlocks the encrypted root partition in case of full disk encryption technology.

    1. When the root volume becomes available, initramfs transfers the execution flow to the root volume.
  6. Attestation: The VM tenant gets access to the system. They can perform remote attestation to ensure the VM is an untampered Confidential Virtual Machine (CVM).

    1. Attestation is performed based on information from the AMD SP and vTPM.
    2. This process confirms the authenticity and reliability of the initial CPU and memory state of the RHEL instance and the AMD processor.
  7. TEE: This process creates a Trusted Execution Environment (TEE) to ensure that booting of the VM is in a trusted and secured environment.

You can configure AMD Secure Encrypted Virtualization with Secure Nested Paging (SEV-SNP) on RHEL VMs on Azure to create a trusted boot environment. SEV-SNP protects your data from access by the hypervisor and cloud service provider, and is available only for AMD EPYC processor family.

Prerequisites

  • You have installed the openssh and openssh-clients packages.
  • You have installed the Azure CLI utility. For details, see installing the Azure CLI.
  • You have created an Azure virtual machine (VM) that uses a supported AMD EPYC processor-based machine type.

Procedure

  1. Log in to Azure by using the Azure CLI utility:

    $ az login
  2. Create an azure resource group for the selected availability zone:

    $ az group create --name <example_resource_group> --location eastus
  3. Deploy a RHEL instance with SEV-SNP, for example, the Standard_DC4as_V5 instance type:

    $ az vm create --resource-group <example_resource_group> \
    --name <example-rhel-10-sev-snp-instance> \
    --image <RedHat:rhel:10_x64_Gen2:latest> \
    --size <Standard_DC4as_V5> \
    --admin-username <example_azure_user> \
    --generate-ssh-keys \
    --security-type ConfidentialVM \
    --os-disk-security-encryption-type DiskWithVMGuestState
  4. Connect to the RHEL instance:

    $ ssh <example_azure_user>@<example_ip_address_of_VM>

Verification

  • Check kernel logs to verify status of SEV-SNP:

    $ sudo dmesg | grep -i sev
    ...
    [    0.547223] Memory Encryption Features active: AMD SEV
    [    4.843171] kvm-guest: setup_efi_kvm_sev_migration : EFI live migration variable not found
    ...
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat Documentation

Legal Notice

Theme

© 2026 Red Hat
Back to top