From a3d0bafba56d490ee3a6a56faa1e08b4ccf6cb7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= Date: Fri, 1 Jul 2016 14:18:32 +0200 Subject: [PATCH] remove old move disk snapshot check this is no longer needed, if the moved disk was referenced by a snapshot we have already died early, and the config is locked. --- PVE/API2/Qemu.pm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm index b64619cc..4b64312f 100644 --- a/PVE/API2/Qemu.pm +++ b/PVE/API2/Qemu.pm @@ -2572,17 +2572,11 @@ __PACKAGE__->register_method({ } if ($param->{delete}) { - if (PVE::QemuServer::is_volume_in_use($storecfg, $conf, undef, $old_volid)) { - warn "volume $old_volid still has snapshots, can't delete it\n"; - PVE::QemuConfig->add_unused_volume($conf, $old_volid); - PVE::QemuConfig->write_config($vmid, $conf); - } else { - eval { - PVE::Storage::deactivate_volumes($storecfg, [$old_volid]); - PVE::Storage::vdisk_free($storecfg, $old_volid); - }; - warn $@ if $@; - } + eval { + PVE::Storage::deactivate_volumes($storecfg, [$old_volid]); + PVE::Storage::vdisk_free($storecfg, $old_volid); + }; + warn $@ if $@; } };