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 2E6F31FF0E1 for ; Mon, 27 Jul 2026 17:18:41 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id BABA521400; Mon, 27 Jul 2026 17:18:40 +0200 (CEST) From: Nicolas Reinecke To: pve-devel@lists.proxmox.com Subject: [PATCH pve-storage] esxi plugin: keep uuid inside vm the same as in esxi Date: Mon, 27 Jul 2026 17:17:59 +0200 Message-ID: <20260727151800.13685-1-nr@das-labor.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 DMARC_PASS -0.1 DMARC pass policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) 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: 72Z4OUY7EX6LKXJF6YIM3CIPEGQ7Y5OS X-Message-ID-Hash: 72Z4OUY7EX6LKXJF6YIM3CIPEGQ7Y5OS X-MailFrom: nr@das-labor.org 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 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