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 B68D11FF0DE for ; Thu, 19 Nov 2026 11:38:51 +0100 (CET) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 43E7B2190E; Thu, 19 Nov 2026 11:36:55 +0100 (CET) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com Subject: [PATCH manager v4 32/41] ui: migrate: refuse target nodes that would drop the guest identity Date: Thu, 19 Nov 2026 11:34:18 +0100 Message-ID: <20261119103551.1666964-33-t.lamprecht@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20261119103551.1666964-1-t.lamprecht@proxmox.com> References: <20261119103551.1666964-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: 1795084557293 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.160 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: VDUNVQOEIEXLHCK3Z5HXNKYLZAUDPMAO X-Message-ID-Hash: VDUNVQOEIEXLHCK3Z5HXNKYLZAUDPMAO 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 Reviewed-by: Dominik Csapak Tested-by: Dominik Csapak --- 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 15ce34f8..3e05af36 100644 --- a/www/manager6/window/Migrate.js +++ b/www/manager6/window/Migrate.js @@ -219,6 +219,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(), @@ -306,6 +331,8 @@ Ext.define('PVE.window.Migrate', { migration.preconditions.push({ text, severity: 'error' }); } + me.checkGuestIdentitySupport(migration, disallowed); + let blockingResources = []; let mappedResources = migrateStats['mapped-resource-info'] ?? {}; @@ -529,6 +556,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