Enable SEV-SNP
Secure Encrypted Virtualization-Secure Nested Paging (SEV-SNP) is a hardware-based security feature available with AMD CPUs, which provides memory encryption and integrity protection for virtual machines (VMs). SEV-SNP isolates VMs from the hypervisor and other host system software.
Enabling SEV-SNP on a RHEL host is a Technology Preview only. However, enabling SEV-SNP on a RHEL guest is fully supported.
Enable SEV-SNP on a RHEL host Copy linkLink copied!
To enable Secure Encrypted Virtualization-Secure Nested Paging (SEV-SNP) on a RHEL host, you must ensure that your system meets the prerequisites and then install the snphost and libvirt-daemon-kvm packages.
Before you begin Copy linkLink copied!
- Your host uses the following hardware and software:
- An AMD CPU that supports SEV-SNP, such as a supported model from the AMD EPYC series
- RHEL 10.0 or later
- SEV firmware version 1.55 or later
- Sufficient system memory for SNP Memory Coverage configuration
- The following settings are enabled in UEFI CPU menu:
SVM Mode(Secure Virtual Machine Mode)SEV-SNP SupportorSecure Nested PagingSMEE(Secure Memory Encryption)
About this task Copy linkLink copied!
SEV-SNP is a hardware-based security feature that provides strong memory encryption and integrity protection for virtual machines (VMs). This isolates VMs from the hypervisor and other host system software. SEV-SNP is available only with AMD CPUs.
Using SEV-SNP on a RHEL host is a Technology Preview only. Technology Preview features are not supported with Red Hat production service levels agreements (SLAs) and might not be functionally complete. Red Hat does not recommend using them in production. These features provide early access to upcoming product features, enabling customers to test functionality and provide feedback during the development process.
For more information about the support scope of Red Hat Technology Preview features, see Technology Preview Features Support Scope.
Procedure Copy linkLink copied!
# dnf install snphost libvirt-daemon-kvm
Results Copy linkLink copied!
- Verify that SEV-SNP is enabled on the host.
# virt-host-validate qemuQEMU: Checking for hardware virtualization: PASS QEMU: Checking if device '/dev/kvm' exists: PASS QEMU: Checking if device '/dev/kvm' is accessible: PASS QEMU: Checking if device '/dev/vhost-net' exists: PASS QEMU: Checking if device '/dev/net/tun' exists: PASS QEMU: Checking for cgroup 'cpu' controller support: PASS QEMU: Checking for cgroup 'cpuacct' controller support: PASS QEMU: Checking for cgroup 'cpuset' controller support: PASS QEMU: Checking for cgroup 'memory' controller support: PASS QEMU: Checking for cgroup 'devices' controller support: PASS QEMU: Checking for cgroup 'blkio' controller support: PASS QEMU: Checking for device assignment IOMMU support: PASS QEMU: Checking if IOMMU is enabled by kernel: PASS QEMU: Checking for secure guest support: PASSIf SEV-SNP is enabled on the host, the
Checking for secure guest supportline reportsPASS.
What to do next Copy linkLink copied!
Enable SEV-SNP on a RHEL guest Copy linkLink copied!
To enable Secure Encrypted Virtualization-Secure Nested Paging (SEV-SNP) in a RHEL virtual machine (VM), you can apply SEV-SNP configuration when creating the VM. Alternatively, you can enable SEV-SNP in an existing RHEL VM by editing the VM configuration.
Before you begin Copy linkLink copied!
- SEV-SNP is enabled on your RHEL host. For instructions, see Enabling SEV-SNP on a RHEL host
- The host has
libvirt,virt-install, andvirt-xmlinstalled - The VM uses a supported RHEL version as the guest operating system:
- RHEL 9.2 or later
- RHEL 10.0 or later
About this task Copy linkLink copied!
SEV-SNP is a hardware-based security feature that provides strong memory encryption and integrity protection for VMs. This isolates VMs from the hypervisor and other host system software. SEV-SNP is available only with AMD CPUs.
Procedure Copy linkLink copied!
Results Copy linkLink copied!
- On the host, verify that the VM is running with SEV-SNP enabled.
# virsh dumpxml --xpath //launchSecurity <vm_name><launchSecurity type="sev-snp"> <policy>0x00030000</policy> </launchSecurity> - Log in to the guest VM.
- Verify that the SEV-SNP guest device exists.
# ls -l /dev/sev_guestIf SEV-SNP is properly enabled in the guest, this command lists the
/dev/sev_guestcharacter device.Important Checking the existence of
/dev/sev_guestproves only that the VM is configured and operating correctly. To prove that the VM is using SEV-SNP to secure it against a hostile host, you must perform a cryptographic attestation of the guest.For more information about attestation, see Learn about Confidential Computing Attestation (Red Hat Blog).
- If SEV-SNP is not detected in the guest, verify that the host SEV-SNP configuration is correct and that the VM was restarted after the configuration change.
- To revert to the original configuration, restore from the backup:
# virsh undefine <vm_name> # virsh define /tmp/<vm_name>-backup.xml