From: Nicolas Frey <n.frey@proxmox.com>
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 [thread overview]
Message-ID: <20260922123325.498271-2-n.frey@proxmox.com> (raw)
In-Reply-To: <20260922123325.498271-1-n.frey@proxmox.com>
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 <n.frey@proxmox.com>
---
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) =>
'<ul style="margin: 0; padding-left: 20px;">' +
@@ -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
next prev parent reply other threads:[~2026-09-22 12:33 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-22 12:33 [PATCH manager/storage 0/2] fix #6202: warn if sockets exceed target node Nicolas Frey
2026-09-22 12:33 ` Nicolas Frey [this message]
2026-09-22 12:33 ` [PATCH pve-storage 2/2] esxi: guard against zero 'cpuid.coresPerSocket' Nicolas Frey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260922123325.498271-2-n.frey@proxmox.com \
--to=n.frey@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox