Hello everyone.
Recently I've been looking into the topic of 'Launch Security' [1] in libvirt and qemu. It is a feature that is backed by the AMD Secure Encrypted Virtualization (SEV) extension [2]. It allows running encrypted VMs under KVM on the hosts supporting SEV. The encryption of the guest RAM is done on the fly by the dedicated cryptographic hardware.
AFAIK the SEV extension support has been added to all the components of the KVM stack: libvirt >= 4.5.0 (>=5.1.0 recommended), QEMU >= 2.12.0, Linux kernel >= 4.16 (for the host and guest). I think it might be a usefull feature to introduce in Kubevirt as well. Roughly the steps will include the introduction of the new VMI spec API (+conversion to domxml, +validation) and /dev/sev sharing with the virt-launcher pod (similar to /dev/kvm case I suppose). Additionally there are some prerequisites/restrictions which surely need to be checked/validated [3]:
- SEV support on the node (also in the guest but that is probably out of scope)
- Q35 machine type
- OVMF (UEFI)
- locked VM memory to prevent swapping (alt.: use hugepages)
- iommu=on for all virtio devices
- no migration, pause/resume, PCI passthrough
There seem to be no major blockers from the implementation perspective. So I would like to get some initial feedback from the community on whether it is something that may fit in Kubevirt. Also any comments about possible issues which I haven't considered or suggestions are welcome. Any thoughts on that?
Thanks,
Vasiliy