From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id F21A41FF0AA for ; Tue, 17 Nov 2026 23:42:39 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 165F6218B0; Tue, 17 Nov 2026 23:40:57 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH manager v2 30/36] ui: migrate: refuse target nodes that would drop the guest identity Date: Tue, 17 Nov 2026 23:34:40 +0100 Message-ID: <20261117223945.862914-31-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261117223945.862914-1-t.lamprecht@proxmox.com> References: <20261117223945.862914-1-t.lamprecht@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1794955192887 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.197 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust 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: FGN4XVKMLPTK56MIBF36AKADJBI5N4QU X-Message-ID-Hash: FGN4XVKMLPTK56MIBF36AKADJBI5N4QU X-MailFrom: t.lamprecht@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: The migrate API refuses target nodes that run a Proxmox VE version too old to keep the guest identity, as they drop it on their next write of the guest config. The precondition endpoints report such nodes with the reported and the required version, but the migrate window ignored that: for a stopped VM, the target was only marked as not allowed without a reason, while for a running VM and for containers the window offered the migration and only showed the API error after pressing Migrate. Show the reason as an error, like for other blocking preconditions, and disable the Migrate button for such a target. The API has no override for this check, so the window offers none either. Signed-off-by: Thomas Lamprecht --- no changes since v1 www/manager6/window/Migrate.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js index 23090b7a..61683921 100644 --- a/www/manager6/window/Migrate.js +++ b/www/manager6/window/Migrate.js @@ -214,6 +214,31 @@ Ext.define('PVE.window.Migrate', { me.lookup('formPanel').isValid(); }, + checkGuestIdentitySupport: function (migration, disallowed) { + let unsupported = disallowed['guest-identity-unsupported']; + if (!unsupported) { + return; + } + + let text; + if (unsupported.version) { + text = Ext.String.format( + gettext( + 'The selected target node runs Proxmox VE {0}, but keeping the guest identity requires {1} or newer. Upgrade the target node first.', + ), + unsupported.version, + unsupported['required-version'], + ); + } else { + text = gettext( + 'The selected target node does not report its Proxmox VE version, so support for guest identities cannot be verified.', + ); + } + + migration.possible = false; + migration.preconditions.push({ text, severity: 'error' }); + }, + checkQemuPreconditions: async function (resetMigrationPossible) { let me = this, vm = me.getViewModel(), @@ -301,6 +326,8 @@ Ext.define('PVE.window.Migrate', { migration.preconditions.push({ text, severity: 'error' }); } + me.checkGuestIdentitySupport(migration, disallowed); + let blockingResources = []; let mappedResources = migrateStats['mapped-resource-info'] ?? {}; @@ -517,6 +544,8 @@ Ext.define('PVE.window.Migrate', { let targetNode = me.lookup('pveNodeSelector').value; let disallowed = migrateStats['not-allowed-nodes']?.[targetNode] ?? {}; + me.checkGuestIdentitySupport(migration, disallowed); + let blockingHAResources = disallowed['blocking-ha-resources'] ?? []; if (blockingHAResources.length) { migration.possible = false; -- 2.47.3