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 A15541FF0AA for ; Tue, 22 Sep 2026 14:33:41 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 0A0E92159F; Tue, 22 Sep 2026 14:33:31 +0200 (CEST) From: Nicolas Frey To: pve-devel@lists.proxmox.com Subject: [PATCH pve-manager 1/2] fix #6202: ui: guest import: warn if sockets exceed target node Date: Tue, 22 Sep 2026 14:33:24 +0200 Message-ID: <20260922123325.498271-2-n.frey@proxmox.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260922123325.498271-1-n.frey@proxmox.com> References: <20260922123325.498271-1-n.frey@proxmox.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 1 AWL -0.931 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) KAM_LAZY_DOMAIN_SECURITY 1 Sending domain does not have any anti-forgery methods RDNS_NONE 1.274 Delivered to internal network by a host with no rDNS SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_NONE 0.001 SPF: sender does not publish an SPF Record Message-ID-Hash: LR5MAB4LLWXH72LSKGKHYFNFDDNCH5P3 X-Message-ID-Hash: LR5MAB4LLWXH72LSKGKHYFNFDDNCH5P3 X-MailFrom: nfrey@miso.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: ESXi and PVE model CPU topology differently, so the socket count taken from the source VM can exceed the number of sockets the target node actually has. The import then succeeds but yields a guest whose topology does not match the hardware. Query the node status and show a hint next to the socket field when the configured count is higher, suggesting cores instead. Signed-off-by: Nicolas Frey --- www/manager6/window/GuestImport.js | 33 ++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/www/manager6/window/GuestImport.js b/www/manager6/window/GuestImport.js index 1013fe14..896cd9ac 100644 --- a/www/manager6/window/GuestImport.js +++ b/www/manager6/window/GuestImport.js @@ -310,6 +310,7 @@ Ext.define('PVE.window.GuestImport', { data: { coreCount: 1, socketCount: 1, + nodeSockets: 0, liveImport: false, os: 'l26', maxCdDrives: false, @@ -320,6 +321,20 @@ Ext.define('PVE.window.GuestImport', { formulas: { totalCoreCount: (get) => get('socketCount') * get('coreCount'), + // ESXi and PVE model CPU topology differently, so an imported socket count can + // exceed what the target node physically has. + socketCountHint: (get) => { + let nodeSockets = get('nodeSockets'); + if (!nodeSockets || get('socketCount') <= nodeSockets) { + return ''; + } + return Ext.String.format( + gettext( + 'Target node has only {0} CPU socket(s), consider using cores instead.', + ), + nodeSockets, + ); + }, hideWarnings: (get) => get('warnings').length === 0, warningsText: (get) => '
    ' + @@ -500,6 +515,15 @@ Ext.define('PVE.window.GuestImport', { value: '{socketCount}', }, }, + { + xtype: 'displayfield', + userCls: 'pmx-hint', + hidden: true, + bind: { + value: '{socketCountHint}', + hidden: '{!socketCountHint}', + }, + }, { xtype: 'proxmoxintegerfield', fieldLabel: gettext('Cores'), @@ -1010,6 +1034,15 @@ Ext.define('PVE.window.GuestImport', { me.lookup('defaultBridge').setNodename(me.nodename); me.lookup('extractionStorage').setNodename(me.nodename); + Proxmox.Utils.API2Request({ + url: `/nodes/${me.nodename}/status`, + method: 'GET', + autoErrorAlert: false, + success: function (response) { + me.getViewModel().set('nodeSockets', response.result.data.cpuinfo?.sockets ?? 0); + }, + }); + let renderWarning = (w) => { const warningsCatalogue = { 'cdrom-image-ignored': gettext( -- 2.47.3