vm destroy: do not remove unreferenced disks by default

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
Reviewed-by: Stefan Reiter <s.reiter@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-06-04 15:49:30 +02:00 committed by Fabian Grünbichler
parent 9a8ba1272c
commit 16e66777a0

View File

@ -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,