]> git.proxmox.com Git - qemu-server.git/blobdiff - PVE/API2/Qemu.pm
remove old move disk snapshot check
[qemu-server.git] / PVE / API2 / Qemu.pm
index b64619cc3facf411eecb225a503bf136e084ad5f..4b64312fb3bc85ea23f5af19c1bf412582860c95 100644 (file)
@@ -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 $@;
                }
            };