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 038AD1FF09B for ; Mon, 12 Oct 2026 14:52:28 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 183062147C; Mon, 12 Oct 2026 14:52:24 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=dualfroz.com; s=dkim; t=1791809531; h=from:subject:date:message-id:to:mime-version: content-transfer-encoding; bh=BuALU6SNqQpNkSM/17F8ilAC6nYrUx7i0xLVn0Ee7s4=; b=oWh+A3UxRNFh0ZHe9B3FUZQGPb3poWIGGUcufVuh4HcLrnINXHhBdxlQYgVLmV7SUvyp9B rr1oxexSh6MxQU6l5a/+khNxMAMzGr7kAGhAN1gqwGMvslVlHvX+OyoFnRap7ssRuPkPdI Ni94lLbaAZ1UwUB8RWeds43He3DeuTHxbox6vm07XCmeIcyyMYzgRiFjA7LWQni5pBW8vp A/v9LuGHsktAizQXVf/fUpdYBcM9Her30DxKszwAWkhdbfG9E+bdM6xvIJZQxXsB0wv0tP GqtXLHbA/gBy4cJlM4hhtmT4EW3eQ0Nu0rRvyF7Ny/j7h/kTX+ZvSWdGeZICRQ== From: Michal Fox To: pve-devel@lists.proxmox.com Subject: [PATCH manager] partially fix #4012: ui: migrate: mention snapshots referencing a local CD/DVD Date: Mon, 12 Oct 2026 12:52:07 +0000 Message-ID: <20261012125207.7-1-me@dualfroz.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Last-TLS-Session-Version: TLSv1.3 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.131 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 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: MOJ7IYVPUBP6GC3J7QWQSNWRTQIPF2UE X-Message-ID-Hash: MOJ7IYVPUBP6GC3J7QWQSNWRTQIPF2UE X-MailFrom: me@dualfroz.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: When a VM has no local CD/DVD attached anymore, but one of its snapshots still references it, the migrate window only shows: Cannot migrate VM with local CD/DVD which does not tell where the CD/DVD is coming from, since it is not visible in the current configuration of the VM. The migration precondition API already returns the 'is_attached' and 'referenced_in_snapshot' attributes for each local disk. Use them to mention the volume and the snapshots referencing it in that case, and that removing these snapshots allows migration. This matches the hint in the migration task log since qemu-server commit a4efa5f9ad2a ("partially fix #4012: migrate: mention snapshots referencing a local ISO image"). The plain message is kept if the CD/DVD is still attached, like in the backend. Signed-off-by: Michal Fox --- www/manager6/window/Migrate.js | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/www/manager6/window/Migrate.js b/www/manager6/window/Migrate.js index 8cac54ea..b5067d7b 100644 --- a/www/manager6/window/Migrate.js +++ b/www/manager6/window/Migrate.js @@ -366,11 +366,22 @@ Ext.define('PVE.window.Migrate', { migrateStats.local_disks.forEach(function (disk) { if (disk.cdrom && disk.cdrom === 1) { if (!disk.volid.includes('vm-' + vm.get('vmid') + '-cloudinit')) { + let text = gettext('Cannot migrate VM with local CD/DVD'); + let snapshots = Object.keys(disk.referenced_in_snapshot ?? {}).sort(); + if (!disk.is_attached && snapshots.length) { + text = Ext.String.format( + ngettext( + 'Cannot migrate VM with local CD/DVD ({0}) referenced in snapshot {1}. Remove the snapshot to allow migration.', + 'Cannot migrate VM with local CD/DVD ({0}) referenced in snapshots {1}. Remove the snapshots to allow migration.', + snapshots.length, + ), + disk.volid, + snapshots.join(', '), + ); + } + migration.possible = false; - migration.preconditions.push({ - text: gettext('Cannot migrate VM with local CD/DVD'), - severity: 'error', - }); + migration.preconditions.push({ text, severity: 'error' }); } } else { let size = disk.size -- 2.43.0