[pve-devel] [PATCH qemu-server 3/3] vm destroy: do not remove unreferenced disks by default

Fabian Ebner f.ebner at proxmox.com
Fri Jun 4 15:49:30 CEST 2021


Signed-off-by: Fabian Ebner <f.ebner at proxmox.com>
---
 PVE/API2/Qemu.pm | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/PVE/API2/Qemu.pm b/PVE/API2/Qemu.pm
index 24dba86..bc313f9 100644
--- a/PVE/API2/Qemu.pm
+++ b/PVE/API2/Qemu.pm
@@ -1592,7 +1592,7 @@ __PACKAGE__->register_method({
 		description => "If set, destroy additionally all disks not referenced in the config"
 		 ." but with a matching VMID from all enabled storages.",
 		optional => 1,
-		default => 1, # FIXME: replace to false in PVE 7.0, this is dangerous!
+		default => 0,
 	    },
 	},
     },
@@ -1643,8 +1643,7 @@ __PACKAGE__->register_method({
 		# repeat, config might have changed
 		my $ha_managed = $early_checks->();
 
-		# FIXME: drop fallback to true with 7.0, to dangerous for default
-		my $purge_unreferenced = $param->{'destroy-unreferenced-disks'} // 1;
+		my $purge_unreferenced = $param->{'destroy-unreferenced-disks'};
 
 		PVE::QemuServer::destroy_vm(
 		    $storecfg,
-- 
2.30.2






More information about the pve-devel mailing list