mirror of
git://git.proxmox.com/git/qemu-server.git
synced 2025-01-25 06:03:52 +03:00
backup: is IOThread comaptible: only check running VMs
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
48343b3f1d
commit
317c55c2d1
@ -7206,7 +7206,7 @@ sub version_cmp {
|
||||
sub runs_at_least_qemu_version {
|
||||
my ($vmid, $major, $minor, $extra) = @_;
|
||||
|
||||
my $v = PVE::QemuServer::vm_qmp_command($vmid, { execute => 'query-version' });
|
||||
my $v = eval { PVE::QemuServer::vm_qmp_command($vmid, { execute => 'query-version' }) } // {};
|
||||
$v = $v->{qemu};
|
||||
|
||||
return version_cmp($v->{major}, $major, $v->{minor}, $minor, $v->{micro}, $extra) >= 0;
|
||||
|
@ -76,7 +76,7 @@ sub prepare {
|
||||
if (defined($drive->{backup}) && !$drive->{backup}) {
|
||||
$self->loginfo("exclude disk '$ds' '$volid' (backup=no)");
|
||||
return;
|
||||
} elsif ($drive->{iothread}) {
|
||||
} elsif ($self->{vm_was_running} && $drive->{iothread}) {
|
||||
if (!PVE::QemuServer::runs_at_least_qemu_version($vmid, 4, 0, 1)) {
|
||||
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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user