From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [IPv6:2a01:7e0:0:424::9]) by lore.proxmox.com (Postfix) with ESMTPS id 803C61FF13C for ; Thu, 25 Jun 2026 15:32:30 +0200 (CEST) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 4CB8B12352; Thu, 25 Jun 2026 15:32:28 +0200 (CEST) From: Nicolas Reinecke To: pve-devel@lists.proxmox.com Subject: [PATCH container] esxi plugin: keep uuid inside vm the same as in esxi Date: Thu, 25 Jun 2026 14:05:28 +0200 Message-ID: <20260625120528.291048-1-nr@das-labor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 BAYES_00 -1.9 Bayes spam probability is 0 to 1% DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record X-MailFrom: nr@das-labor.org X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation Message-ID-Hash: YH3VA4GWIDRAZGWE7JJ2WGOU7XAROQZW X-Message-ID-Hash: YH3VA4GWIDRAZGWE7JJ2WGOU7XAROQZW X-Mailman-Approved-At: Thu, 25 Jun 2026 15:32:32 +0200 CC: Nicolas Reinecke X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: There needs to be done some byte swapping in the first 3 parts to keep the uuid the same. RegEx Group Mapping to Bytes: $1-$4 : 1st section (4 bytes) -> Reversed to $4$3$2$1 $5-$6 : 2nd section (2 bytes) -> Reversed to $6$5 $7-$8 : 3rd section (2 bytes) -> Reversed to $8$7 $9 : 4th section (2 bytes) -> Kept as-is $10 : 5th section (6 bytes) -> Kept as-is Signed-off-by: Nicolas Reinecke --- src/PVE/Storage/ESXiPlugin.pm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/PVE/Storage/ESXiPlugin.pm b/src/PVE/Storage/ESXiPlugin.pm index 19f23bb..fd0ef0a 100644 --- a/src/PVE/Storage/ESXiPlugin.pm +++ b/src/PVE/Storage/ESXiPlugin.pm @@ -1010,14 +1010,19 @@ sub smbios1_uuid { if ( $uuid =~ /^ - ([0-9a-fA-F]{8}) - ([0-9a-fA-F]{4}) - ([0-9a-fA-F]{4}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) + ([0-9a-fA-F]{2}) ([0-9a-fA-F]{4}) ([0-9a-fA-F]{12}) $/x ) { - return "$1-$2-$3-$4-$5"; + return "$4$3$2$1-$6$5-$8$7-$9-$10"; } return; } -- 2.54.0