From: Thomas Lamprecht Date: Mon, 13 Nov 2023 13:12:16 +0000 (+0100) Subject: api: bulk suspension: log if VMs are skipped due to not running X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=25c0052ac8b74b9d848ff1cfb650b8864ae11fe5;p=pve-manager.git api: bulk suspension: log if VMs are skipped due to not running Signed-off-by: Thomas Lamprecht --- diff --git a/PVE/API2/Nodes.pm b/PVE/API2/Nodes.pm index 39b049d8..be000d94 100644 --- a/PVE/API2/Nodes.pm +++ b/PVE/API2/Nodes.pm @@ -2015,7 +2015,10 @@ __PACKAGE__->register_method ({ my $create_suspend_worker = sub { my ($nodename, $vmid) = @_; - return if !PVE::QemuServer::check_running($vmid, 1); + if (!PVE::QemuServer::check_running($vmid, 1)) { + print "VM $vmid not running, skipping suspension\n"; + return; + } print STDERR "Suspending VM $vmid\n"; return PVE::API2::Qemu->vm_suspend( { node => $nodename, vmid => $vmid, todisk => 1 }