From: Thomas Lamprecht Date: Thu, 6 Jul 2023 11:01:14 +0000 (+0200) Subject: vzdump: error out for master-key backup but no QEMU support X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;h=781fb80;hp=b84587f3120660ac001bf3284b48510476fb3c80;p=qemu-server.git vzdump: error out for master-key backup but no QEMU support Our QEMU gained master-key support for Proxmox VE 6.4 with initial QEMU 5.2.0 packaging in 0b8da68 ("add PBS master key support") version. As we're now two major releases in the future any VM needs to run with a newer QEMU version we can just make this a hard-error, as there really should be no use-case left. After all we only support upgrading directly to the next major release, so one needs to do at least a migration (or shutdown) of the VM to reboot the node for upgrading to Proxmox VE 8, so the lowest QEMU version baseline is 6.0 for Proxmox VE 8 (i.e., the version from PVE 7.0). Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/VZDump/QemuServer.pm b/PVE/VZDump/QemuServer.pm index 359563be..7bd2a415 100644 --- a/PVE/VZDump/QemuServer.pm +++ b/PVE/VZDump/QemuServer.pm @@ -579,11 +579,9 @@ sub archive_pbs { } } - if (!defined($qemu_support->{"pbs-masterkey"}) && -e $master_keyfile) { - $self->loginfo("WARNING: backup target is configured with master key, but running QEMU version does not support master keys."); - $self->loginfo("Please make sure you've installed the latest version and the VM has been restarted to use master key feature."); - $master_keyfile = undef; # skip rest of master key handling below - } + # pve-qemu supports it since 5.2.0-1 (PVE 6.4), so safe to die since PVE 8 + die "master key configured but running QEMU version does not support master keys\n" + if !defined($qemu_support->{'pbs-masterkey'}) && -e $master_keyfile; $attach_tpmstate_drive->($self, $task, $vmid);