From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id BB5131FF170 for ; Tue, 17 Dec 2024 13:59:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 19B7F8F6; Tue, 17 Dec 2024 14:00:07 +0100 (CET) Message-ID: <89f4953c-8519-4b3a-a9c7-b506165ea514@proxmox.com> Date: Tue, 17 Dec 2024 13:59:33 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: Proxmox VE development discussion References: Content-Language: en-US From: Fiona Ebner In-Reply-To: X-SPAM-LEVEL: Spam detection results: 0 AWL -0.053 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment RCVD_IN_VALIDITY_CERTIFIED_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_RPBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. RCVD_IN_VALIDITY_SAFE_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to Validity was blocked. See https://knowledge.validity.com/hc/en-us/articles/20961730681243 for more information. SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [qemuserver.pm] Subject: [pve-devel] applied: [PATCH qemu-server] fix vm shutdown when agent conf is enabled but is not running in the vm X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: Proxmox VE development discussion Cc: Fabio Fantoni Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: pve-devel-bounces@lists.proxmox.com Sender: "pve-devel" Am 26.11.24 um 16:19 schrieb Fabio Fantoni via pve-devel: > Checking only vm configuration for choose the shutdown method causes it > to always fail, after reaching the timeout, if the qemu agent option in > the vm configuration is enabled but the agent is not installed and > active in the guest. > As I seen in the windows vm the agent also crashes in some cases, so > shutdown don't fail only if qemu guest agent is not installed or not > started. > > Added check that agent is active when choosing agent shutdown method to > avoid certain shutdown failure in those cases. > > Signed-off-by: Fabio Fantoni applied, thanks! But I made a change to not set the $nowarn flag. If the agent is configured, but not running, I do think a warning makes sense for informational and debugging purposes. > --- > PVE/QemuServer.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/PVE/QemuServer.pm b/PVE/QemuServer.pm > index 2046a7c..4b6aac7 100644 > --- a/PVE/QemuServer.pm > +++ b/PVE/QemuServer.pm > @@ -6341,7 +6341,7 @@ sub _do_vm_stop { > > eval { > if ($shutdown) { > - if (defined($conf) && get_qga_key($conf, 'enabled')) { > + if (defined($conf) && get_qga_key($conf, 'enabled') && qga_check_running($vmid, 1)) { > mon_cmd($vmid, "guest-shutdown", timeout => $timeout); > } else { > mon_cmd($vmid, "system_powerdown"); > -- > 2.25.1 > > _______________________________________________ pve-devel mailing list pve-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel