5
0
mirror of git://git.proxmox.com/git/qemu-server.git synced 2025-01-08 21:18:03 +03:00

destroy VM: also check if unused volumes are base images

It's arguably not likely in practice that only an unused volume is still in use
as a base image, but do it for completeness sake.

Signed-off-by: Fabian Ebner <f.ebner@proxmox.com>
This commit is contained in:
Fabian Ebner 2021-04-19 10:46:43 +02:00 committed by Thomas Lamprecht
parent ba1a198481
commit 3ab0f9252a

View File

@ -2127,7 +2127,7 @@ sub destroy_vm {
if ($conf->{template}) {
# check if any base image is still used by a linked clone
PVE::QemuConfig->foreach_volume($conf, sub {
PVE::QemuConfig->foreach_volume_full($conf, { include_unused => 1 }, sub {
my ($ds, $drive) = @_;
return if drive_is_cdrom($drive);