From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id E9E1A1FF0A8 for ; Sat, 28 Nov 2026 16:21:48 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 2AB18217CD; Sat, 28 Nov 2026 16:21:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=stuttgart.de; s=s1022; t=1795878689; bh=U9CWRCIUnrHvbOB8hssmM0Kg6vSauFwdslW42c1iMvw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vO3ep8ZGjHgNV0rtQlO3aq6tbZcLSw8N52fVuwxS1ZWT7ksLunvlLgRuh0/BML2XT 9U95BoYpr92OLZOSbEDg8nDsRctiEEjUXcKZgn0oauy6R09C4kA2aFfuDARt3o5Gh3 5agFT8IiBK75LohXXl48+Fi7StTZVzOCT6zFMaimoH/FJI2TH0nNnCKn6VyiqvpRn2 nGdur+4wOjsNEFNh0sZDDBP74qxRH3VGEx+LqES8XbYmeQvK+3TxhBCt0Z5bG0+GJP TLV/VFb8HTrb44rxBJdjRrIH/9eVsn9MbF4VjnPuiLRa+a2nZAefeMvOtQSgs3vaBD Buo8WnNOgQ0xg== From: Jakob-Tobias Winter To: pve-devel@lists.proxmox.com Subject: [RFC PATCH manager 09/11] ui: ha: add stop-on-poweroff selector to the resource edit window Date: Sat, 28 Nov 2026 16:11:16 +0100 Message-ID: <20261128151118.892037-10-tobias@stuttgart.de> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20261128151118.892037-1-tobias@stuttgart.de> References: <20261128151118.892037-1-tobias@stuttgart.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.029 Adjusted score from AWL reputation of From: address DKIM_SIGNED 0.1 Message has a DKIM or DK signature, not necessarily valid DKIM_VALID -0.1 Message has at least one valid DKIM or DK signature DKIM_VALID_AU -0.1 Message has a valid DKIM or DK signature from author's domain DKIM_VALID_EF -0.1 Message has a valid DKIM or DK signature from envelope-from domain DMARC_PASS -0.1 DMARC pass policy RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_PASS -0.001 SPF: HELO matches SPF record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ZNPNWG6LQ4U642PIUAF5X2QC7DSEE5Y7 X-Message-ID-Hash: ZNPNWG6LQ4U642PIUAF5X2QC7DSEE5Y7 X-MailFrom: prvs=7495f99b94=tobias@stuttgart.de 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 CC: Jakob-Tobias Winter X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Allow overriding the cluster wide stop-on-poweroff setting for a single HA resource. The selector is disabled for containers, as the HA stack only learns about the poweroff of virtual machines. Signed-off-by: Jakob-Tobias Winter --- www/manager6/ha/ResourceEdit.js | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/www/manager6/ha/ResourceEdit.js b/www/manager6/ha/ResourceEdit.js index 487d9cf3..488874df 100644 --- a/www/manager6/ha/ResourceEdit.js +++ b/www/manager6/ha/ResourceEdit.js @@ -60,6 +60,27 @@ Ext.define('PVE.ha.VMResourceInputPanel', { }, }); + // only virtual machines report that they got powered off from within the guest + var stopOnPoweroff = Ext.createWidget({ + xtype: 'proxmoxKVComboBox', + name: 'stop-on-poweroff', + fieldLabel: gettext('Stop on Poweroff'), + value: '__default__', + deleteEmpty: !me.isCreate, + disabled: me.guestType === 'ct', + comboItems: [ + ['__default__', Proxmox.Utils.defaultText], + ['1', Proxmox.Utils.yesText], + ['0', Proxmox.Utils.noText], + ], + autoEl: { + tag: 'div', + 'data-qtip': gettext( + 'Whether the VM should stay stopped when it gets powered off from within the guest. Defaults to the HA settings of the datacenter.', + ), + }, + }); + var vmidStore = me.vmid ? {} : { @@ -89,6 +110,12 @@ Ext.define('PVE.ha.VMResourceInputPanel', { store: vmidStore, allowBlank: false, validateExists: true, + listeners: me.vmid + ? {} + : { + change: (field) => + stopOnPoweroff.setDisabled(field.getSelection()?.data.type === 'lxc'), + }, }, { xtype: 'proxmoxintegerfield', @@ -137,6 +164,7 @@ Ext.define('PVE.ha.VMResourceInputPanel', { uncheckedValue: 0, value: 1, }, + stopOnPoweroff, { xtype: 'proxmoxKVComboBox', name: 'state', -- 2.53.0