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 A28C51FF13F for ; Thu, 26 Feb 2026 15:07:07 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 2E12732376; Thu, 26 Feb 2026 15:07:59 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Subject: [PATCH qemu-server v3 0/3] improve guest cleanup handling Date: Thu, 26 Feb 2026 14:51:59 +0100 Message-ID: <20260226140752.1792378-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL -1.033 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.618 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.734 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.78 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 Message-ID-Hash: PES352ER2PREJOVF4KT36KN7STGVC6KJ X-Message-ID-Hash: PES352ER2PREJOVF4KT36KN7STGVC6KJ X-MailFrom: d.csapak@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: this is a combination of my previous patches[0][1] (v3 because [0] was already v2) First we make the cleanup handling more consistent (1/3) then we check explicitely for the backup lock to improve the error message for stop backup mode (2/3) and then we fix #7119 by waiting up to 30s for a possibly still running guest to stop (e.g. this can occur when using usb passthrouh) (3/3) changes from v2/RFC: * use 'vm_running_locally' for getting the pid * improve error messages * use a 'use_old_cleanup' flag that will be auto-removed by a reboot to signal if we can use the new cleanup logic or the old 0: https://lore.proxmox.com/pve-devel/20260210111612.2017883-1-d.csapak@proxmox.com/ 1: https://lore.proxmox.com/pve-devel/20260223105542.1525232-1-d.csapak@proxmox.com/ Dominik Csapak (3): cleanup: refactor to make cleanup flow consistent qm cleanup: die early when encountering a running stop mode backup fix #7119: qm cleanup: wait for process exiting for up to 30 seconds debian/preinst | 16 +++++++++++++++ src/PVE/CLI/qm.pm | 35 +++++++++++++++++++++++++++----- src/PVE/QemuServer.pm | 14 +++++++++++++ src/PVE/QemuServer/RunState.pm | 28 +++++++++++++++++++++++++ src/test/MigrationTest/QmMock.pm | 16 +++++++++++++++ 5 files changed, 104 insertions(+), 5 deletions(-) create mode 100755 debian/preinst -- 2.47.3