Red Hat’s self-encrypting VM prototype joins verified base images to per-VM storage keys
A Fedora Rawhide walkthrough combines dm-verity, TPM2-sealed dm-crypt and a writable overlay, while documenting the integrity gaps that remain.
Red Hat engineer Vitaly Kuznetsov has published a hands-on design for building a VM image that keeps one verifiable base operating-system image while creating a separately encrypted writable layer for each VM. The walkthrough is a Fedora Rawhide prototype rather than a supported product recipe, but it puts concrete commands around a storage problem that confidential-computing deployments still have to solve.
What the design does
Confidential VM technologies such as AMD SEV-SNP and Intel TDX protect data while it is executing, but they do not automatically protect persistent storage. The prototype gives the shared /usr base image runtime integrity with dm-verity, then uses systemd-repart during first boot to create a dm-crypt root partition whose key is sealed to a virtual TPM.
A systemd system extension mounts a writable overlay over /usr. That lets applications see a writable filesystem without copying the complete base image into the encrypted partition at first boot. Red Hat’s walkthrough argues that avoiding that copy matters when a cloud root disk is network-attached and a full transfer could extend boot time.
The build is deliberately explicit. It installs a minimal Fedora Rawhide tree, boots a unified kernel image through shim, signs the system extension, lays out EFI, /usr and dm-verity partitions, and uses QEMU/KVM with Secure Boot and swtpm to test the result. The final checks show /usr backed by the verified base plus overlay and / on the encrypted partition, with changes surviving a reboot.
Why platform teams should care
The useful pattern is the separation of concerns: a fleet can start from one inspectable, integrity-protected base while each instance creates its own encrypted mutable state. That addresses the walkthrough’s requirement that compromising one VM’s key must not expose another VM.
It also makes the trade-off visible. Image builders and confidential-computing teams can reproduce the design with standard Linux components instead of treating storage protection as a black box. The article includes the dnf, systemd-repart, ukify, QEMU and TPM-emulator commands needed to test the path.
What not to assume
Red Hat documents important gaps. The example creates only one overlay partition, does not prove the origin of that encrypted overlay, and lacks integrity and replay-attack protection for mutable data. A malicious host could pre-create an overlay and arrange for its key to be sealed to the guest’s vTPM, creating a code-injection route.
That makes this a useful engineering starting point, not a production security claim. Teams evaluating it should treat origin attestation, mutable-storage integrity and replay resistance as unresolved design requirements before adapting the pattern to confidential OpenShift Virtualization or cloud VM fleets.
sources
- Self-encrypting VM images for confidential environments hands ondevelopers.redhat.com
comments · 0