qemu_volume_snapshot_delete : fix krbd snapshot delete

like for snapshot, we need to check if krbd is enabled, to known
if we need to use qmp delete-drive-snapshot or storage command directly

Signed-off-by: Alexandre Derumier <aderumier@odiso.com>
This commit is contained in:
Alexandre Derumier 2016-11-14 13:01:21 +01:00 committed by Dietmar Maurer
parent e281273810
commit 1ef7592f1e

View File

@ -3990,11 +3990,11 @@ sub qemu_volume_snapshot_delete {
my $running = check_running($vmid);
return if !PVE::Storage::volume_snapshot_delete($storecfg, $volid, $snap, $running);
return if !$running;
vm_mon_cmd($vmid, "delete-drive-snapshot", device => $deviceid, name => $snap);
if ($running && do_snapshots_with_qemu($storecfg, $volid)){
vm_mon_cmd($vmid, "delete-drive-snapshot", device => $deviceid, name => $snap);
} else {
PVE::Storage::volume_snapshot_delete($storecfg, $volid, $snap, $running);
}
}
sub set_migration_caps {