mirror of
https://github.com/retspen/webvirtcloud
synced 2026-12-03 09:26:03 +00:00
feat(migration): encrypt migrations over TLS between hosts that have it
QEMU sends a migrating VM's memory and copied disks in the clear. A compute gets "Encrypt migrations (TLS)" (edit page, Advanced; API field migration_tls); a migration between two hosts that both have it passes VIR_MIGRATE_TLS whenever data moves (not for a shut-off VM's definition alone), and the log says TLS. The hosts need QEMU's certificates in /etc/pki/qemu; a host without them refuses before anything moves. Tried on two AlmaLinux 10 hosts: the TLS stream starts with a TLS record, the plain one with QEMU's QEVM header.
This commit is contained in:
parent
2e3ffba851
commit
eeae606d08
15 changed files with 409 additions and 309 deletions
|
|
@ -332,6 +332,7 @@ Firewall: the compute's VNC ports (`5900`–`65535`) must accept connections **o
|
|||
- **Address:** a migrating VM goes to the destination's address on the Computes page; for a dedicated migration network, set the compute's **Migration address** on its edit page.
|
||||
- **Without shared storage:** after choosing the destination, the **Disks** list shows each disk and the destination pools that can take a copy (directory, filesystem and NFS pools; a pool with a file of the same name refuses it); a disk on storage both hosts share can stay there. Plain raw or qcow2 disks without a backing file are copied, through the destination's migration port range (49152-49215 by default). **Delete the source files of copied disks** removes them after the migration, unless another VM or volume uses them.
|
||||
- **Shut-off VMs:** a shut-off VM moves offline, with its NVRAM file (UEFI). When its disks are copied or it has a TPM, it is started paused for the migration instead (its CPUs never run) and shut off on the destination.
|
||||
- **Encryption:** QEMU sends a VM's memory and copied disks in the clear. With **Encrypt migrations (TLS)** ticked on both hosts' edit pages (Advanced), it sends them over TLS. Each host needs QEMU's certificates from one CA: `ca-cert.pem`, `server-cert.pem`, `server-key.pem`, `client-cert.pem` and `client-key.pem` in `/etc/pki/qemu`, readable by QEMU (owner `root`, group the one QEMU runs as: `qemu` on the RHEL family and openSUSE, `kvm` on Debian and Ubuntu; keys `0640`), the server certificate naming the host's migration address (or the address the panel reaches it at) as it is written there, a name or an IP. A host without them refuses the migration before anything moves: `Unable to access credentials /etc/pki/qemu/ca-cert.pem`.
|
||||
|
||||
If libvirt warns `Host SMBIOS information is not available`, install `dmidecode` (`apt-get`, `dnf` or `zypper install -y dmidecode`) and restart `libvirtd` (`virtqemud` on the RHEL family 10).
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue