vzdump: exclude efidisks from backups of non-OVMF machines

Machines running with SeaBIOS don't have the efidisk attached, so QEMU
cannot back it up and fails with "unknown drive".

Signed-off-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Stefan Reiter 2020-02-17 10:34:16 +01:00 committed by Thomas Lamprecht
parent a04dd5c455
commit 1249d579ea

View File

@ -84,6 +84,9 @@ sub prepare {
die "disk '$ds' '$volid' (iothread=on) can't use backup feature with running QEMU " .
"version < 4.0.1! Either set backup=no for this drive or upgrade QEMU and restart VM\n";
}
} elsif ($ds =~ m/^efidisk/ && (!defined($conf->{bios}) || $conf->{bios} ne 'ovmf')) {
$self->loginfo("excluding '$ds' (efidisks can only be backed up when BIOS is set to 'ovmf')");
return;
} else {
my $log = "include disk '$ds' '$volid'";
if (defined $drive->{size}) {