mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-08-12 09:04:42 +00:00
vm destroy: destroy also unusedX config entries
this was previously covered by the "lets destroy ever disk which matches the VMID" feature we disarmed a bit. As unused disks are referenced in the config, it is not subtle to destroy them (and we always did in the past) so fix that regression again for explicitly referenced but unused disks. Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
7585466269
commit
3e9d173caa
@ -2095,8 +2095,8 @@ sub destroy_vm {
|
||||
});
|
||||
}
|
||||
|
||||
# only remove disks owned by this VM
|
||||
PVE::QemuConfig->foreach_volume($conf, sub {
|
||||
# only remove disks owned by this VM (referenced in the config)
|
||||
PVE::QemuConfig->foreach_volume_full($conf, { include_unused => 1 }, sub {
|
||||
my ($ds, $drive) = @_;
|
||||
return if drive_is_cdrom($drive, 1);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user