]> git.proxmox.com Git - qemu-server.git/commitdiff
vzdump: error out for master-key backup but no QEMU support
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jul 2023 11:01:14 +0000 (13:01 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 6 Jul 2023 13:01:13 +0000 (15:01 +0200)
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 <t.lamprecht@proxmox.com>
PVE/VZDump/QemuServer.pm

index 359563bedbd4470edffde13192f47a0445957511..7bd2a4150704809bc0d1f0f81d9c4413b0a6add8 100644 (file)
@@ -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);