Setting up an encrypted swap disk
You can use a volatile protected key generated by the pkey device driver to encrypt a swap disk.
About this task
Because swap disks are discarded on reboot, volatile encryption keys are an option. You can generate volatile protected keys or secure keys from random data.
Important: Use a protected key based on random data for cases where the key is not
needed after a reboot. In particular, do not use such a key in a guest that might be subject to:
- KVM guest migration
- z/VM® live guest relocation in a single system image (SSI)
- Suspend and resume
Procedure
Results
Linux now runs with a swap device that is encrypted with a protected key.